mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
wiphy: Use wiphy_select_akm in wiphy_can_connect
Commit6e8b76527
added a switch statement for AKM suites which was not correct as this is a bitmask and may contain multiple values. Intead we can rely on wiphy_select_akm which is a more robust check anyways. Fixes:6e8b765278
("wiphy: add check for CMD_AUTH/CMD_ASSOC support")
This commit is contained in:
parent
19ce2d86dd
commit
b5b815ef16
19
src/wiphy.c
19
src/wiphy.c
@ -407,24 +407,7 @@ bool wiphy_can_connect(struct wiphy *wiphy, struct scan_bss *bss)
|
||||
rsn_info.group_management_cipher))
|
||||
return false;
|
||||
|
||||
|
||||
switch (rsn_info.akm_suites) {
|
||||
case IE_RSN_AKM_SUITE_SAE_SHA256:
|
||||
case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256:
|
||||
if (!wiphy_can_connect_sae(wiphy))
|
||||
return false;
|
||||
|
||||
break;
|
||||
case IE_RSN_AKM_SUITE_OWE:
|
||||
case IE_RSN_AKM_SUITE_FILS_SHA256:
|
||||
case IE_RSN_AKM_SUITE_FILS_SHA384:
|
||||
case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256:
|
||||
case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384:
|
||||
if (!wiphy->support_cmds_auth_assoc)
|
||||
return false;
|
||||
|
||||
break;
|
||||
}
|
||||
return wiphy_select_akm(wiphy, bss, false);
|
||||
} else if (r != -ENOENT)
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user