public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 5/8] scan: parse station count from BSS load IE
Date: Tue, 19 Nov 2024 06:24:27 -0800	[thread overview]
Message-ID: <20241119142430.323074-5-prestwoj@gmail.com> (raw)
In-Reply-To: <20241119142430.323074-1-prestwoj@gmail.com>

This will be used in BSS ranking
---
 src/scan.c | 4 ++--
 src/scan.h | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/scan.c b/src/scan.c
index 2ffbef6d..64de57d2 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -1343,8 +1343,8 @@ static bool scan_parse_bss_information_elements(struct scan_bss *bss,
 								iter.len + 2);
 			break;
 		case IE_TYPE_BSS_LOAD:
-			if (ie_parse_bss_load(&iter, NULL, &bss->utilization,
-						NULL) < 0)
+			if (ie_parse_bss_load(&iter, &bss->sta_count,
+						&bss->utilization, NULL) < 0)
 				l_warn("Unable to parse BSS Load IE for "
 					MAC, MAC_STR(bss->addr));
 			else
diff --git a/src/scan.h b/src/scan.h
index 50adca7c..4c1ebc21 100644
--- a/src/scan.h
+++ b/src/scan.h
@@ -67,6 +67,7 @@ struct scan_bss {
 	uint8_t ssid[SSID_MAX_SIZE];
 	uint8_t ssid_len;
 	uint8_t utilization;
+	uint16_t sta_count;
 	uint8_t cc[3];
 	uint16_t rank;
 	uint64_t time_stamp;
-- 
2.34.1


  parent reply	other threads:[~2024-11-19 14:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19 14:24 [PATCH 1/8] util: add util_linear_map James Prestwood
2024-11-19 14:24 ` [PATCH 2/8] unit: add linear mapping test James Prestwood
2024-11-19 14:24 ` [PATCH 3/8] util: add util_exponential_decay James Prestwood
2024-11-20 17:52   ` Denis Kenzior
2024-11-19 14:24 ` [PATCH 4/8] network: use util_exponential_decay James Prestwood
2024-11-19 14:24 ` James Prestwood [this message]
2024-11-19 14:24 ` [PATCH 6/8] scan: add ranking modifiers for utilization/station count James Prestwood
2024-11-19 14:24 ` [PATCH 7/8] doc: document [Rank].HighUtilization/StationCount thresholds James Prestwood
2024-11-19 14:24 ` [PATCH 8/8] station: print client count in scan results James Prestwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241119142430.323074-5-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox