brcmfmac: fix WPA/WPA2-PSK 4-way handshake offload and SAE offload failures
An incorrect value of use_fwsup is set for 4-way handshake offload for WPA//WPA2-PSK, caused by commit3b1e0a7bdf
("brcmfmac: add support for SAE authentication offload"). It results in missing bit BRCMF_VIF_STATUS_EAP_SUCCESS set in brcmf_is_linkup() and causes the failure. This patch correct the value for the case. Also setting bit BRCMF_VIF_STATUS_EAP_SUCCESS for SAE offload case in brcmf_is_linkup() to fix SAE offload failure. Fixes:3b1e0a7bdf
("brcmfmac: add support for SAE authentication offload") Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1589277788-119966-1-git-send-email-chi-hsien.lin@cypress.com
This commit is contained in:
parent
5bb4e12581
commit
b2fe11f077
|
@ -1820,6 +1820,10 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
|
|||
switch (sme->crypto.akm_suites[0]) {
|
||||
case WLAN_AKM_SUITE_SAE:
|
||||
val = WPA3_AUTH_SAE_PSK;
|
||||
if (sme->crypto.sae_pwd) {
|
||||
brcmf_dbg(INFO, "using SAE offload\n");
|
||||
profile->use_fwsup = BRCMF_PROFILE_FWSUP_SAE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
bphy_err(drvr, "invalid cipher group (%d)\n",
|
||||
|
@ -2105,11 +2109,6 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (sme->crypto.sae_pwd) {
|
||||
brcmf_dbg(INFO, "using SAE offload\n");
|
||||
profile->use_fwsup = BRCMF_PROFILE_FWSUP_SAE;
|
||||
}
|
||||
|
||||
if (sme->crypto.psk &&
|
||||
profile->use_fwsup != BRCMF_PROFILE_FWSUP_SAE) {
|
||||
if (WARN_ON(profile->use_fwsup != BRCMF_PROFILE_FWSUP_NONE)) {
|
||||
|
@ -5548,7 +5547,8 @@ static bool brcmf_is_linkup(struct brcmf_cfg80211_vif *vif,
|
|||
u32 event = e->event_code;
|
||||
u32 status = e->status;
|
||||
|
||||
if (vif->profile.use_fwsup == BRCMF_PROFILE_FWSUP_PSK &&
|
||||
if ((vif->profile.use_fwsup == BRCMF_PROFILE_FWSUP_PSK ||
|
||||
vif->profile.use_fwsup == BRCMF_PROFILE_FWSUP_SAE) &&
|
||||
event == BRCMF_E_PSK_SUP &&
|
||||
status == BRCMF_E_STATUS_FWSUP_COMPLETED)
|
||||
set_bit(BRCMF_VIF_STATUS_EAP_SUCCESS, &vif->sme_state);
|
||||
|
|
Loading…
Reference in New Issue