From fae4cf8ee1766c43721286d013a666ea578135a4 Mon Sep 17 00:00:00 2001 From: Carter Chen Date: Mon, 31 Jul 2023 04:09:16 -0500 Subject: [PATCH 186/296] non-upstream: update sae_password for potential roaming use brcmfmac: update sae_password for potential roaming use WPA3 CERT 5.8.3 requires the STAUT has PSK and SAE password. when the lower layer has annourced SAE offload by firmware wpa_supplicant uses psk as the sae_password and passes to driver, for the potential roaming from WAP2PSK to SAE bss. driver passes the sae_password to firmware as well. otherwise the firmware will crash dues to sae_password is null. Signed-off-by: Carter Chen --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 59d03c38afff..97ca9ff49e43 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2914,7 +2914,11 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev, if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_PSK) err = brcmf_set_pmk(ifp, sme->crypto.psk, BRCMF_WSEC_MAX_PSK_LEN); - else if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_SAE) { + + /* if upper layer has passed sae_password, + * set it to firmware for the potential transit up roaming use. + */ + if (sme->crypto.sae_pwd && brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SAE)) { /* clean up user-space RSNE */ if (brcmf_fil_iovar_data_set(ifp, "wpaie", NULL, 0)) { bphy_err(drvr, "failed to clean up user-space RSNE\n"); -- 2.25.1