From 2ae28d65eb36ce4fd426762235cda692648dd4e2 Mon Sep 17 00:00:00 2001 From: Gokul Sivakumar Date: Tue, 30 Jan 2024 12:10:50 -0600 Subject: [PATCH 237/296] brcmfmac: set authorized flag in CONNECT event for all 4way HS offload case The 2.11-devel wpa_supplicant expects the driver to notify userpsace about port authorization after successful 4-way handshake completion if it was offloaded to the Driver. Set the authorized flag in CONNECT event even for Open/SAE Authentication case along with the 802.1X authentication case. The cfg80211 on receiving connect result event with this flag, adds the NL80211_ATTR_PORT_AUTHORIZED attribute in the NL80211_CMD_CONNECT event sent to userpsace. Signed-off-by: Gokul Sivakumar --- .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 66de76411e9a..efa6f3578b63 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -7849,9 +7849,11 @@ brcmf_bss_connect_done(struct brcmf_cfg80211_info *cfg, conn_params.resp_ie = conn_info->resp_ie; conn_params.resp_ie_len = conn_info->resp_ie_len; - if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_1X && - brcmf_has_pmkid(conn_params.req_ie, conn_params.req_ie_len, NULL)) - conn_params.authorized = true; + if ((profile->use_fwsup == BRCMF_PROFILE_FWSUP_1X && + brcmf_has_pmkid(conn_params.req_ie, conn_params.req_ie_len, NULL)) || + profile->use_fwsup == BRCMF_PROFILE_FWSUP_PSK || + profile->use_fwsup == BRCMF_PROFILE_FWSUP_SAE) + conn_params.authorized = completed; cfg80211_connect_done(ndev, &conn_params, GFP_KERNEL); brcmf_dbg(CONN, "Report connect result - connection %s\n", -- 2.25.1