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)
This commit is contained in:
Selvaraj, Sridhar 2016-06-24 12:37:04 +05:30 • committed by Gerrit - the friendly Code Review server
commit fd889b56fd

View file

@ -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... */