diff options
| author | Chandrasekaran, Manishekar <cmshekar@qti.qualcomm.com> | 2014-09-10 17:14:52 +0530 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-09-11 18:07:45 -0700 |
| commit | e45f5e4fb886d5a2560665b7cc7a1daa2868751c (patch) | |
| tree | 44abff4fb5d91742f890e83d0a1574afaafecaa2 | |
| parent | 2f2d79cd629df180965f667b7d78a6bd795eba88 (diff) | |
qcacld: Delete stale STA entry in AP+AP during DISASSOC miss
In AP (Main)+AP (Guest) scenario, STA is connected to the
Main AP and then disconnects from it. But sometimes, this
disconnect is not received by the Host. In such a scenario,
when STA tries to connect to the Guest AP, for the same STA
two entires exist: One stale entry of the main AP and one
that of the Guest AP. So, the EAPOL packets on the Guest AP
get encrypted.
This is fixed in this change by deauthenticating the stale
STA entry and removing the STA entry from the DUT before
associating with the Guest AP.
Change-Id: Idd26cc0e3d61b164d046c06edb6a414be73b078f
CRs-Fixed: 720615
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c index 63473d321e4d..1ff33a47ae19 100644 --- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c @@ -156,6 +156,47 @@ limConvertSupportedChannels(tpAniSirGlobal pMac, pMlmAssocInd->supportedChannels.numChnl);) } +/**--------------------------------------------------------------- +\fn lim_check_sta_in_pe_entries +\brief This function is called by limProcessAssocReqFrame() +\ to check if STA entry already exists in any of the +\ PE entries of the AP. If it exists, deauth will be +\ sent on that session and the STA deletion will +\ happen. After this, the ASSOC request will be +\ processed +\ +\param pMac - A pointer to Global MAC structure +\param pHdr - A pointer to the MAC header +\return None +------------------------------------------------------------------*/ +void lim_check_sta_in_pe_entries(tpAniSirGlobal pMac, tpSirMacMgmtHdr pHdr) +{ + tANI_U8 i; + tANI_U16 assocId = 0; + tpDphHashNode pStaDs = NULL; + tpPESession psessionEntry=NULL; + + for(i = 0; i < pMac->lim.maxBssId; i++) + { + if( (pMac->lim.gpSession[i].valid) && + (pMac->lim.gpSession[i].pePersona == VOS_STA_SAP_MODE) && + ((psessionEntry = &pMac->lim.gpSession[i]) != NULL)) { + + pStaDs = dphLookupHashEntry(pMac, pHdr->sa, &assocId, + &psessionEntry->dph.dphHashTable); + if (pStaDs) { + limLog(pMac, LOGE, + FL("Sending Deauth and Deleting existing STA entry: " + MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(psessionEntry->selfMacAddr)); + limSendDeauthMgmtFrame(pMac, eSIR_MAC_UNSPEC_FAILURE_REASON, + (tANI_U8 *) pHdr->sa, psessionEntry, FALSE); + limTriggerSTAdeletion(pMac, pStaDs, psessionEntry); + break; + } + } + } +} /**--------------------------------------------------------------- \fn limProcessAssocReqFrame @@ -213,6 +254,8 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, psessionEntry->peSessionId, psessionEntry->limSystemRole, psessionEntry->limMlmState, MAC_ADDR_ARRAY(pHdr->sa)); + lim_check_sta_in_pe_entries(pMac, pHdr); + if (psessionEntry->limSystemRole == eLIM_STA_ROLE || psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE ) { limLog(pMac, LOGE, FL("received unexpected ASSOC REQ on sessionid: %d " |
