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

scan: Keep track of SHA256 support over PSK/8021X

This commit is contained in:
Denis Kenzior 2016-02-10 12:56:11 -06:00
parent 7b1e70f5ff
commit 76c62b0843
2 changed files with 8 additions and 0 deletions

View File

@ -63,6 +63,7 @@ struct scan_bss {
struct l_uintset *supported_rates;
uint8_t utilization;
uint16_t rank;
bool sha256:1;
};
const char *scan_ssid_security_to_str(enum scan_ssid_security ssid_security);

View File

@ -1685,6 +1685,13 @@ static void process_bss(struct netdev *netdev, struct scan_bss *bss)
}
ssid_security = scan_get_ssid_security(bss->capability, &rsne);
if (ssid_security == SCAN_SSID_SECURITY_PSK)
bss->sha256 =
rsne.akm_suites & IE_RSN_AKM_SUITE_PSK_SHA256;
else if (ssid_security == SCAN_SSID_SECURITY_8021X)
bss->sha256 =
rsne.akm_suites & IE_RSN_AKM_SUITE_8021X_SHA256;
} else if (bss->wpa) {
struct ie_rsn_info wpa;
int res = ie_parse_wpa_from_data(bss->wpa, bss->wpa[1] + 2,