From dfb6f7f0252c003c22ba949390af780fd6ab5b98 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Mon, 4 May 2020 08:24:20 -0700 Subject: [PATCH] wiphy: restrict FT AKMs when not supported Some full mac cards don't like being given a FT AKM when connecting. From an API perspective this should be supported, but in practice these cards behave differently and some do no accept FT AKMs. Until this becomes more stable any cards not supporting Auth/Assoc commands (full mac) will not connect using FT AKMs. --- src/wiphy.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/wiphy.c b/src/wiphy.c index 9821da0e..aef39549 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -157,7 +157,8 @@ enum ie_rsn_akm_suite wiphy_select_akm(struct wiphy *wiphy, } if ((info.akm_suites & IE_RSN_AKM_SUITE_FT_OVER_8021X) && - bss->rsne && bss->mde_present) + bss->rsne && bss->mde_present && + wiphy->support_cmds_auth_assoc) return IE_RSN_AKM_SUITE_FT_OVER_8021X; if (info.akm_suites & IE_RSN_AKM_SUITE_8021X_SHA256) @@ -175,8 +176,9 @@ enum ie_rsn_akm_suite wiphy_select_akm(struct wiphy *wiphy, if (wiphy->supported_ciphers & IE_RSN_CIPHER_SUITE_BIP && wiphy_has_feature(wiphy, NL80211_FEATURE_SAE) && info.mfpr) { - if (info.akm_suites & - IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256) + if ((info.akm_suites & + IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256) && + wiphy->support_cmds_auth_assoc) return IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256; if (info.akm_suites & IE_RSN_AKM_SUITE_SAE_SHA256) @@ -184,7 +186,8 @@ enum ie_rsn_akm_suite wiphy_select_akm(struct wiphy *wiphy, } if ((info.akm_suites & IE_RSN_AKM_SUITE_FT_USING_PSK) && - bss->rsne && bss->mde_present) + bss->rsne && bss->mde_present && + wiphy->support_cmds_auth_assoc) return IE_RSN_AKM_SUITE_FT_USING_PSK; if (info.akm_suites & IE_RSN_AKM_SUITE_PSK_SHA256)