summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelvaraj, Sridhar <sselvara@codeaurora.org>2016-06-24 12:37:04 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-09-11 17:36:34 -0700
commitfd889b56fdc2d64750060d750f4256f83e4216da (patch)
tree684696c8491e57bcba1104a0ebc9cd532ba6d8bf
parenta2c939423770ffc418203b7851d191f0567f710c (diff)
qcacld-3.0: Avoid race between user triggered disconnect and OTA disconnect
qcacld-2.0 to qcacld-3.0 propagation Due to race between user triggered disconnect and OTA disconnect, On receiving OTA disconnect PE sends DISCONNECT_IND to SME and waits for conformation from SME. By the time if SME already received disconnect from user it will give PE DEAUTH_REQ instead of DIASSOC_CNF messgae. Upon receiving this PE will do the clean up and will send DEAUTH_RSP message. SME will also process DISASSOC_IND and will send eSmeCommandWmStatusChange. But this will be in pending queue as user triggered deauth is in progress as a SME active command. If this is processed after user initiated disconnect command, HDD will get two disconnects which cause mess up of eConnectionState_Disconnecting/eConnectionState_NotConnected states in hdd disconnect handler. Fix is to remove pending eSmeCommandWmStatusChange command after DEAUTH_RSP from SME. Git-commit: 7f0986129d00270d1b7bba3d671bba79ba323933 Change-Id: I004834785491ab7cf3e90371dfd1910c25d0bbef CRs-Fixed: 1003374 (cherry picked from commit 2b4f56c8dcbc292391d705993c7cd874c3dea008)
-rw-r--r--core/sme/src/csr/csr_api_roam.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index d4f0d1bf113c..6508f2158e22 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -9340,9 +9340,18 @@ void csr_roaming_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf)
break;
case eWNI_SME_DEAUTH_RSP:
/* or the Deauthentication response message... */
- if (CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, pSmeRsp->sessionId))
+ if (CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, pSmeRsp->sessionId)) {
+ csr_remove_cmd_with_session_id_from_pending_list(pMac,
+ pSmeRsp->sessionId,
+ &pMac->sme.smeCmdPendingList,
+ eSmeCommandWmStatusChange);
+ csr_remove_cmd_with_session_id_from_pending_list(pMac,
+ pSmeRsp->sessionId,
+ &pMac->roam.roamCmdPendingList,
+ eSmeCommandWmStatusChange);
csr_roam_roaming_state_deauth_rsp_processor(pMac,
(tSirSmeDeauthRsp *) pSmeRsp);
+ }
break;
case eWNI_SME_START_BSS_RSP:
/* or the Start BSS response message... */