瀏覽代碼

qcacld-3.0: Don't process disassoc in disconnecting state

-If disconnection is in progress then don't process the
new disassoc frame.
-Limit the number of logs message related to disassoc
frame dropping.

Change-Id: Ia4d612ec67d4a6b80991a6e0e6393bc59ba76617
CRs-Fixed: 2035813
Sandeep Puligilla 8 年之前
父節點
當前提交
f4810705cf
共有 3 個文件被更改,包括 17 次插入9 次删除
  1. 1 0
      core/mac/inc/ani_global.h
  2. 1 0
      core/mac/src/pe/lim/lim_api.c
  3. 15 9
      core/mac/src/pe/lim/lim_process_disassoc_frame.c

+ 1 - 0
core/mac/inc/ani_global.h

@@ -813,6 +813,7 @@ typedef struct sAniSirLim {
 	uint8_t deferredMsgCnt;
 	tSirDFSChannelList dfschannelList;
 	uint8_t deauthMsgCnt;
+	uint8_t disassocMsgCnt;
 	uint8_t gLimIbssStaLimit;
 
 	/* Number of channel switch IEs sent so far */

+ 1 - 0
core/mac/src/pe/lim/lim_api.c

@@ -790,6 +790,7 @@ tSirRetStatus pe_open(tpAniSirGlobal pMac, struct cds_config_info *cds_cfg)
 		goto pe_open_lock_fail;
 	}
 	pMac->lim.deauthMsgCnt = 0;
+	pMac->lim.disassocMsgCnt = 0;
 	pMac->lim.retry_packet_cnt = 0;
 	pMac->lim.ibss_retry_cnt = 0;
 

+ 15 - 9
core/mac/src/pe/lim/lim_process_disassoc_frame.c

@@ -108,16 +108,18 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
 	}
 
 	if (LIM_IS_STA_ROLE(psessionEntry) &&
-		(eLIM_SME_WT_DISASSOC_STATE == psessionEntry->limSmeState)) {
-		if (pHdr->fc.retry > 0) {
-			/*
-			 * This can happen when first disassoc frame is received
-			 * but ACK from this STA is lost, in this case 2nd
-			 * disassoc frame is already in transmission queue
-			 */
-			pe_err("AP is sending disassoc after ACK lost");
-			return;
+		((eLIM_SME_WT_DISASSOC_STATE == psessionEntry->limSmeState) ||
+		(eLIM_SME_WT_DEAUTH_STATE == psessionEntry->limSmeState))) {
+		if (!(pMac->lim.disassocMsgCnt & 0xF)) {
+			pe_info("received Disassoc frame in %s"
+				"(already processing previously received Disassoc frame)"
+				"Dropping this.. Disassoc Failed %d",
+						lim_sme_state_str(psessionEntry->limSmeState),
+					   ++pMac->lim.disassocMsgCnt);
+		} else {
+			pMac->lim.disassocMsgCnt++;
 		}
+		return;
 	}
 #ifdef WLAN_FEATURE_11W
 	/* PMF: If this session is a PMF session, then ensure that this frame was protected */
@@ -185,6 +187,10 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
 		return;
 	}
 
+	if (pMac->lim.disassocMsgCnt != 0) {
+		pMac->lim.disassocMsgCnt = 0;
+	}
+
 	/** If we are in the Wait for ReAssoc Rsp state */
 	if (lim_is_reassoc_in_progress(pMac, psessionEntry)) {
 		/** If we had received the DisAssoc from,