From a6914dc0dc3cba65e245fbe40076626ea2bcd5a3 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Fri, 31 Jan 2020 14:45:03 +0100 Subject: iwinfo: add BSS load element to scan result This adds support for the BSS load information element. With this patch, the BSS load information is visible when using the CLI as well as when accessing scan results using the LUA binding. Signed-off-by: David Bauer --- iwinfo_utils.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'iwinfo_utils.c') diff --git a/iwinfo_utils.c b/iwinfo_utils.c index b4f98a9..425492e 100644 --- a/iwinfo_utils.c +++ b/iwinfo_utils.c @@ -324,6 +324,14 @@ static void iwinfo_parse_rsn_cipher(uint8_t idx, uint8_t *ciphers) } } +void iwinfo_parse_bss_load(struct iwinfo_scanlist_entry *e, uint8_t *data) +{ + e->has_bss_load = 1; + e->station_count = ((data[1] << 8) | data[0]); + e->channel_utilization = data[2]; + e->admission_capacity = ((data[4] << 8) | data[3]); +} + void iwinfo_parse_rsn(struct iwinfo_crypto_entry *c, uint8_t *data, uint8_t len, uint8_t defcipher, uint8_t defauth) { -- cgit v1.2.1