wlan: Fix peer leak in UMAC
It was seen in the code that when DUT is operating in SAP mode,
there is a possibility of peer leak in UMAC, where UMAC does not
do a proper clean-up. This happens when a STA which is trying to
associate to the SAP sends a disassoc when the SAP is waiting for
ASSOC confirmation. UMAC is not doing a DelSTA when processing the
disassoc from the STA. Hence now added a change which will ensure
proper clean-up is done upon receiving a disassoc from the STA.
Change-Id: I08d4bebe57463b88a1a8802d28ebe8e2d38ae460
CRs-Fixed: 659131
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
index b7d4e53..40d9e74 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
@@ -1070,7 +1070,6 @@
pStaDs->propCapability &= pAssocReq->propIEinfo.capability;
}
- pStaDs->mlmStaContext.mlmState = eLIM_MLM_WT_ASSOC_CNF_STATE;
pStaDs->valid = 0;
pStaDs->mlmStaContext.authType = authType;
pStaDs->staType = STA_ENTRY_PEER;
diff --git a/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c b/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c
index a5774cf..f347e4f 100644
--- a/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c
@@ -287,10 +287,14 @@
* Requesting STA is in some 'transient' state?
* Log error.
*/
+ if (pStaDs->mlmStaContext.mlmState == eLIM_MLM_WT_ASSOC_CNF_STATE)
+ pStaDs->mlmStaContext.updateContext = 1;
+
PELOGE(limLog(pMac, LOGE,
FL("received Disassoc frame from peer that is in state %X, addr "
MAC_ADDRESS_STR),
pStaDs->mlmStaContext.mlmState, MAC_ADDR_ARRAY(pHdr->sa));)
+
} // if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE)
pStaDs->mlmStaContext.cleanupTrigger = eLIM_PEER_ENTITY_DISASSOC;