qcacld-2.0: Avoid queuing multiple WM status change cmd for same peer

propagation from qcacld-3.0 to qcacld-2.0

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.

Change-Id: Ib87fa7496d4adb6e25c30de657ce62101ca6f263
CRs-Fixed: 2589737
This commit is contained in:
hqu 2019-12-19 16:42:23 +08:00 committed by syphyr
parent 7950bc21b7
commit 1f47112c47
3 changed files with 16 additions and 10 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2014, 2016-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@ -483,20 +483,23 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p
}
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 Deauthentication frame. Log and Ignore.
*/
PELOGE(limLog(pMac, LOGE,
FL("received Deauth frame from peer that is in state %X, addr "
FL("Deletion is in progress : %d for peer that is in state %X, addr "
MAC_ADDRESS_STR", isDisassocDeauthInProgress : %d\n"),
pStaDs->mlmStaContext.mlmState,MAC_ADDR_ARRAY(pHdr->sa),
pStaDs->sta_deletion_in_progress,
pStaDs->mlmStaContext.mlmState, MAC_ADDR_ARRAY(pHdr->sa),
pStaDs->isDisassocDeauthInProgress);)
return;
}
pStaDs->mlmStaContext.disassocReason = (tSirMacReasonCodes)reasonCode;
pStaDs->mlmStaContext.cleanupTrigger = eLIM_PEER_ENTITY_DEAUTH;
pStaDs->sta_deletion_in_progress = true;
/// Issue Deauth Indication to SME.
vos_mem_copy((tANI_U8 *) &mlmDeauthInd.peerMacAddr,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@ -286,19 +286,22 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession
}
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.
*/
PELOGE(limLog(pMac, LOGE,
FL("received Disassoc frame in state %d from "MAC_ADDRESS_STR
",isDisassocDeauthInProgress : %d\n"),
FL("Deletion is in progress : %d for peer that is in state %d "
"addr "MAC_ADDRESS_STR", isDisassocDeauthInProgress : %d\n"),
pStaDs->sta_deletion_in_progress,
pStaDs->mlmStaContext.mlmState, MAC_ADDR_ARRAY(pHdr->sa),
pStaDs->isDisassocDeauthInProgress);)
return;
}
pStaDs->sta_deletion_in_progress = true;
#ifdef FEATURE_WLAN_TDLS
/* Delete all the TDLS peers only if Disassoc is received from the AP */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@ -9907,7 +9907,7 @@ tANI_BOOLEAN csrRoamIssueWmStatusChange( tpAniSirGlobal pMac, tANI_U32 sessionId
pSmeRsp,
sizeof( pCommand->u.wmStatusChangeCmd.u.DeauthIndMsg ));
}
if( HAL_STATUS_SUCCESS( csrQueueSmeCommand(pMac, pCommand, eANI_BOOLEAN_TRUE) ) )
if( HAL_STATUS_SUCCESS( csrQueueSmeCommand(pMac, pCommand, eANI_BOOLEAN_FALSE) ) )
{
fCommandQueued = eANI_BOOLEAN_TRUE;
}