3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 04:32:37 +01:00

scan: parse password identifier/exclusive bits

These bits are used to communicate to the station that SAE password
identifiers are used or required.
This commit is contained in:
James Prestwood 2023-12-05 07:46:38 -08:00 committed by Denis Kenzior
parent 195d1f8720
commit 2d26304663
2 changed files with 19 additions and 3 deletions

View File

@ -1404,10 +1404,24 @@ static bool scan_parse_bss_information_elements(struct scan_bss *bss,
* Currently only Proxy ARP bit (12) is checked, and if
* not found, this is not a fatal error.
*/
if (iter.len < 2)
break;
if (iter.len >= 2)
bss->proxy_arp = test_bit(iter.data, 12);
/*
* 802.11-2020 Table 9-153
*
* The spec merely mentions the "exclusive" bit and
* doesn't enforce a requirement to check it anywhere.
* But if set it would indicate the AP will only accept
* auths when a password ID is used so store this in
* order to fail early if no ID is set.
*/
if (iter.len >= 11) {
bss->sae_pw_id_used = test_bit(iter.data, 81);
bss->sae_pw_id_exclusive =
test_bit(iter.data, 82);
}
bss->proxy_arp = test_bit(iter.data, 12);
}
}

View File

@ -88,6 +88,8 @@ struct scan_bss {
uint8_t cost_level : 3;
uint8_t cost_flags : 4;
bool dpp_configurator : 1;
bool sae_pw_id_used : 1;
bool sae_pw_id_exclusive : 1;
};
struct scan_parameters {