diff mbox series

[5/8] scan: parse station count from BSS load IE

Message ID 20241119142430.323074-5-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [1/8] util: add util_linear_map | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood Nov. 19, 2024, 2:24 p.m. UTC
This will be used in BSS ranking
---
 src/scan.c | 4 ++--
 src/scan.h | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

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;