wlan: LFR+BTC does not work due to premature POSTASSOC
POST_ASSOC link state is set correctly.
CxM module uses POSTASSOC to perform flow control
(by sending null data).However, POST_ASSOC link
state is sent ahead of time to configure the Rx
filters so that data packets following
assoc/reassoc response are not discarded. So,
when POSTASSOC is handled by the HAL, there is no
guarantee yet that assoc/reassoc exchange has
completed. Due to the flow control, it is
possible to transmit a null data frame prior to
(re-)association, thereby inviting a deauth with
reason code 7 (Class 3 frame from non-associated
station) from the AP.Following changes have been
made to address this problem:
1) Resurrect forwarding of link state request
with PREASSOC state to HAL.This is done by not
ignoring link state request with PREASSOC in
WDA_IsHandleSetLinkStateReq.
2) Upon receiving link request to configure
with PREASSOC state,HAL configures Rx filters
to be the same as POSTASSOC. This requires a
Riva change (CL) which configures
rxpDisableFrameStaPreAssocModeHi
nd rxpDisableFrameStaPreAssocModeLow to be the
same as rxpDisableFrameStaPostAssocModeHi and
rxpDisableFrameStaPostAssocModeLow.
3) Send link state request with POSTASSOC after
the successful reception of assoc/reassoc
response with status code 0. This will address
the LFR+BTC issue so that flow control is done
only AFTER successful
CRs-Fixed: 412789
Change-Id: If728bfdeae742cd8a1fd7328f1950031cb0d3cb1
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
index 66f508b..84b2401 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
@@ -629,7 +629,22 @@
goto assocReject;
}
// Association Response received with success code
-
+ /*
+ * Set the link state to POSTASSOC now that we have received
+ * assoc/reassoc response
+ * NOTE: for BTAMP case, it is being handled in limProcessMlmAssocReq
+ */
+ if (!((psessionEntry->bssType == eSIR_BTAMP_STA_MODE) ||
+ ((psessionEntry->bssType == eSIR_BTAMP_AP_MODE) &&
+ (psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE))))
+ {
+ if (limSetLinkState(pMac, eSIR_LINK_POSTASSOC_STATE, psessionEntry->bssId,
+ psessionEntry->selfMacAddr, NULL, NULL) != eSIR_SUCCESS)
+ {
+ PELOGE(limLog(pMac, LOGE, FL("Set link state to POSTASSOC failed\n"));)
+ return;
+ }
+ }
if (subType == LIM_REASSOC)
{
// Log success
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
index 5f17edb..41b8617 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
@@ -2518,10 +2518,6 @@
if(limSetLinkState(pMac, eSIR_LINK_BTAMP_POSTASSOC_STATE, currentBssId,
psessionEntry->selfMacAddr, NULL, NULL) != eSIR_SUCCESS)
PELOGE(limLog(pMac, LOGE, FL("Failed to set the LinkState\n"));)
- } else {
- if(limSetLinkState(pMac, eSIR_LINK_POSTASSOC_STATE, currentBssId,
- psessionEntry->selfMacAddr, NULL, NULL) != eSIR_SUCCESS)
- PELOGE(limLog(pMac, LOGE, FL("Failed to set the LinkState\n"));)
}
/// Start association failure timer
MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_ASSOC_FAIL_TIMER));
diff --git a/CORE/TL/src/wlan_qct_tl.c b/CORE/TL/src/wlan_qct_tl.c
index 6c52f39..260cb9b 100644
--- a/CORE/TL/src/wlan_qct_tl.c
+++ b/CORE/TL/src/wlan_qct_tl.c
@@ -4330,7 +4330,7 @@
In case the SIG does not match - this is a packet for a potentially new
associated station
-------------------------------------------------------------------------*/
- if ( bOldSTAPkt )
+ if ( bOldSTAPkt || bBcast )
{
TLLOG2(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO_HIGH,
"WLAN TL:Data packet matches old sig for sig DPU: %d UC: %d, "
diff --git a/CORE/WDA/src/wlan_qct_wda.c b/CORE/WDA/src/wlan_qct_wda.c
index 0cddfa0..75117bb 100644
--- a/CORE/WDA/src/wlan_qct_wda.c
+++ b/CORE/WDA/src/wlan_qct_wda.c
@@ -4726,7 +4726,6 @@
}
//populate linkState info in WDACbCtxt
pWDA->linkState = linkStateParams->state;
- status = WDA_IGNORE_SET_LINK_STATE;
break;
default:
if(pWDA->wdaState != WDA_READY_STATE)