From a3d3940521837c609f9edcb3556ddf4c3d2aef29 Mon Sep 17 00:00:00 2001 From: avishad verma Date: Fri, 4 Oct 2024 07:52:54 -0500 Subject: [PATCH 296/296] brcmfmac: CERT-OCE: Fix EAPOL Timeout issue. The OCE-5.5.1 test is experiencing an initial connection failure caused by an EAPOL timeout. After conducting a thorough debugging process, we discovered that the ASSOC EVENT is received in the supplicant after the buffered EAPOL packets have already timed out. Further investigation into the FMAC driver revealed that for the first connection Connect done event (ASSOC EVENT) is sent to the supplicant when the driver receives the SET SSID event from the Firmware. According to the Firmware design, the SET SSID event is triggered after adopting the BSS. In this specific scenario, the beacon interval is 8000TU, which causes a delay in sending the SET SSID event. As a result, the buffered EAPOL packet times out. To resolve this issue, we have decided to utilize the LINKUP event for sending the ASSOC EVENT notification to the supplicant. This approach is expected to mitigate the delay and prevent the EAPOL packet timeout, thereby ensuring a successful initial connection. Signed-off-by: avishad verma --- .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index d7c9b30bcd3a..7201c4e79b4e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -7468,10 +7468,8 @@ static bool brcmf_is_linkup(struct brcmf_cfg80211_vif *vif, event == BRCMF_E_PSK_SUP && status == BRCMF_E_STATUS_FWSUP_COMPLETED) set_bit(BRCMF_VIF_STATUS_EAP_SUCCESS, &vif->sme_state); - if ((event == BRCMF_E_SET_SSID && status == BRCMF_E_STATUS_SUCCESS) || - (event == BRCMF_E_LINK && status == BRCMF_E_STATUS_SUCCESS && - ((e->reason != BRCMF_E_REASON_INITIAL_ASSOC) && - (e->flags & BRCMF_EVENT_MSG_LINK)))) { + if (event == BRCMF_E_LINK && status == BRCMF_E_STATUS_SUCCESS && + (e->flags & BRCMF_EVENT_MSG_LINK)) { brcmf_dbg(CONN, "Processing set ssid\n"); memcpy(vif->profile.bssid, e->addr, ETH_ALEN); if (vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_PSK && @@ -7495,10 +7493,12 @@ static bool brcmf_is_linkdown(struct brcmf_cfg80211_vif *vif, { u32 event = e->event_code; u16 flags = e->flags; + u32 status = e->status; if ((event == BRCMF_E_DEAUTH) || (event == BRCMF_E_DEAUTH_IND) || (event == BRCMF_E_DISASSOC_IND) || - ((event == BRCMF_E_LINK) && (!(flags & BRCMF_EVENT_MSG_LINK)))) { + ((event == BRCMF_E_LINK) && (!(flags & BRCMF_EVENT_MSG_LINK))) || + (event == BRCMF_E_SET_SSID && status != BRCMF_E_STATUS_SUCCESS)) { brcmf_dbg(CONN, "Processing link down\n"); clear_bit(BRCMF_VIF_STATUS_EAP_SUCCESS, &vif->sme_state); clear_bit(BRCMF_VIF_STATUS_ASSOC_SUCCESS, &vif->sme_state); -- 2.25.1