summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasti, Narayanraddi <c_nmasti@qti.qualcomm.com>2016-04-14 13:08:02 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-04-18 12:58:17 +0530
commit7f0986129d00270d1b7bba3d671bba79ba323933 (patch)
tree14dd077637873253864c39f57d745e0f043d330f
parent40585715fd380ab1049ee4c3bac5a572a3aa4c52 (diff)
qcacld-2.0: Avoid race between user triggered disconnect and OTA disconnect
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. Change-Id: I004834785491ab7cf3e90371dfd1910c25d0bbef CRs-Fixed: 1003374
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 461ef1fd4687..3cfdd834d532 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -9196,6 +9196,16 @@ void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
case eWNI_SME_DEAUTH_RSP: // or the Deauthentication response message...
if ( CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ( pMac, pSmeRsp->sessionId ) )
{
+ /*
+ * Lets remove eSmeCommandWmStatusChange command from pending
+ * list as SME got DEAUTH_RSP msg from PE which means that PE
+ * already has deleted the session and there is no need to
+ * send Diassoc/Deauth CNF mesg to PE
+ */
+ csrRemoveCmdWithSessionIdFromPendingList(pMac,
+ pSmeRsp->sessionId,
+ &pMac->sme.smeScanCmdPendingList,
+ eSmeCommandWmStatusChange);
csrRoamRoamingStateDeauthRspProcessor( pMac, (tSirSmeDeauthRsp *)pSmeRsp );
}
break;