summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeshwanth Sriram Guntuka <ysriramg@codeaurora.org>2018-07-31 18:28:32 +0530
committerIsaac Chiou <isaacchiou@google.com>2019-12-06 03:25:44 +0000
commit022fab7cb97b18237c68aefcc70bdcd2f58cffc1 (patch)
tree4b2b02e2a454ca5dbf6a4c12960018afeea41e52
parentf8f6cc6cfc95261f411d5538b38d79838304b2db (diff)
downloadqcacld-022fab7cb97b18237c68aefcc70bdcd2f58cffc1.tar.gz
qcacld-3.0: Avoid queuing multiple WM status change cmd for same peer
In SAP mode, one peer sends multiple deauth frames which results in queuing multiple WM status change cmd which is added at head of queue. WM status change cmd is added at head of queue for other peers which results in delay in processing the cmd for first peer. The WM status cmd is processed and peer is deleted and connection is initiated by the same peer. The remaining WM status change cmd is now processed and del_sta is triggered. On receiving del_sta response, cleanup_trigger in sta_ds is checked and eWNI_SME_DISASSOC_RSP message is posted to SME instead of eWNI_SME_DISCONNECT_DONE_IND since the sta_ds entry is added newly. This will result in active command timeout since WM status change cmd is not removed from active queue. Fix is to drop deauth or disassoc frame after the first one is processed and use normal priority to queue WM status change cmd. bug: 141690880 Change-Id: Ib87fa7496d4adb6e25c30de657ce62101ca6f263 CRs-Fixed: 2291442 Signed-off-by: Isaac Chiou <isaacchiou@google.com>
-rw-r--r--core/mac/src/pe/lim/lim_process_deauth_frame.c10
-rw-r--r--core/mac/src/pe/lim/lim_process_disassoc_frame.c10
-rw-r--r--core/sme/src/csr/csr_api_roam.c2
3 files changed, 13 insertions, 9 deletions
diff --git a/core/mac/src/pe/lim/lim_process_deauth_frame.c b/core/mac/src/pe/lim/lim_process_deauth_frame.c
index 7f654b5d0d..46b2f93997 100644
--- a/core/mac/src/pe/lim/lim_process_deauth_frame.c
+++ b/core/mac/src/pe/lim/lim_process_deauth_frame.c
@@ -510,18 +510,20 @@ void lim_perform_deauth(tpAniSirGlobal mac_ctx, tpPESession pe_session,
}
if ((sta_ds->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_STA_RSP_STATE) ||
- (sta_ds->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_BSS_RSP_STATE)) {
+ (sta_ds->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_BSS_RSP_STATE) ||
+ sta_ds->sta_deletion_in_progress) {
/**
* Already in the process of deleting context for the peer
* and received Deauthentication frame. Log and Ignore.
*/
- pe_err("received Deauth frame from peer that is in state %X, addr "
- MAC_ADDRESS_STR, sta_ds->mlmStaContext.mlmState,
- MAC_ADDR_ARRAY(addr));
+ pe_debug("Deletion is in progress (%d) for peer:%pM in mlmState %d",
+ sta_ds->sta_deletion_in_progress, addr,
+ sta_ds->mlmStaContext.mlmState);
return;
}
sta_ds->mlmStaContext.disassocReason = (tSirMacReasonCodes) rc;
sta_ds->mlmStaContext.cleanupTrigger = eLIM_PEER_ENTITY_DEAUTH;
+ sta_ds->sta_deletion_in_progress = true;
/* / Issue Deauth Indication to SME. */
qdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr,
diff --git a/core/mac/src/pe/lim/lim_process_disassoc_frame.c b/core/mac/src/pe/lim/lim_process_disassoc_frame.c
index e36ecc939f..4742b88b36 100644
--- a/core/mac/src/pe/lim/lim_process_disassoc_frame.c
+++ b/core/mac/src/pe/lim/lim_process_disassoc_frame.c
@@ -290,16 +290,18 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
}
if ((pStaDs->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_STA_RSP_STATE) ||
- (pStaDs->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_BSS_RSP_STATE)) {
+ (pStaDs->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_BSS_RSP_STATE) ||
+ pStaDs->sta_deletion_in_progress) {
/**
* Already in the process of deleting context for the peer
* and received Disassociation frame. Log and Ignore.
*/
- pe_err("received Disassoc frame in state: %d from"
- MAC_ADDRESS_STR, pStaDs->mlmStaContext.mlmState,
- MAC_ADDR_ARRAY(pHdr->sa));
+ pe_debug("Deletion is in progress (%d) for peer:%pM in mlmState %d",
+ pStaDs->sta_deletion_in_progress, pHdr->sa,
+ pStaDs->mlmStaContext.mlmState);
return;
}
+ pStaDs->sta_deletion_in_progress = true;
lim_disassoc_tdls_peers(pMac, psessionEntry, pHdr->sa);
if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) {
/**
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index a137c90a09..1c924e08fc 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -11348,7 +11348,7 @@ bool csr_roam_issue_wm_status_change(tpAniSirGlobal pMac, uint32_t sessionId,
DeauthIndMsg));
}
if (QDF_IS_STATUS_SUCCESS
- (csr_queue_sme_command(pMac, pCommand, true))) {
+ (csr_queue_sme_command(pMac, pCommand, false))) {
fCommandQueued = true;
} else {
sme_err(" fail to send message ");