diff options
| author | Edhar,Mahesh Kumar <c_medhar@qti.qualcomm.com> | 2014-06-04 20:43:41 +0530 |
|---|---|---|
| committer | Pitani Venkata Rajesh Kumar <c_vpitan@qti.qualcomm.com> | 2014-06-07 00:56:23 +0530 |
| commit | 342b59e2156be2dbcdddc2e06c91cb85c15c1ffc (patch) | |
| tree | 46b6c982f0f09065ae5af19a8d89e2bc65a3dd77 | |
| parent | e07f7155b61789d652ccdf2aa7a51b36902ddea5 (diff) | |
qcacld:Flush BSS entry in scan cache on receiving CSA event.
Having stale BSS entry after receivng CSA event from firmware
resulting in sending directed probe request on DFS channel in an
attempt to join the BSS.
Changes made to flush the BSS entry in scan list on receiving CSA
event from firmware.
Change-Id: Ic713c20ca575e4310adf91a9825025837e706cfd
CRs-Fixed: 675536
| -rw-r--r-- | CORE/MAC/inc/sirApi.h | 6 | ||||
| -rw-r--r-- | CORE/MAC/inc/wniApi.h | 1 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limSendSmeRspMessages.c | 21 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limUtils.c | 2 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiScan.c | 31 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrInsideApi.h | 2 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 7 |
7 files changed, 70 insertions, 0 deletions
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index f747f50d6041..f348c283c6a3 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -3021,6 +3021,12 @@ typedef struct sSmeMaxAssocInd tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached } tSmeMaxAssocInd, *tpSmeMaxAssocInd; +typedef struct sSmeCsaOffloadInd +{ + tANI_U16 mesgType; // eWNI_SME_CSA_OFFLOAD_EVENT + tANI_U16 mesgLen; + tSirMacAddr bssId; // BSSID +} tSmeCsaOffloadInd, *tpSmeCsaOffloadInd; /*--------------------------------------------------------------------*/ /* BootLoader message definition */ /*--------------------------------------------------------------------*/ diff --git a/CORE/MAC/inc/wniApi.h b/CORE/MAC/inc/wniApi.h index 939780c48ad0..a7cfb60577b1 100644 --- a/CORE/MAC/inc/wniApi.h +++ b/CORE/MAC/inc/wniApi.h @@ -394,6 +394,7 @@ enum eWniMsgTypes //update in beacons/probe rsp eWNI_SME_STATS_EXT_EVENT, eWNI_SME_LINK_SPEED_IND,//Indicate linkspeed response from WMA + eWNI_SME_CSA_OFFLOAD_EVENT, eWNI_SME_MSG_TYPES_END }; diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c index fdfa6ed85ff1..7ea3c291f6e2 100644 --- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c +++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c @@ -2874,7 +2874,9 @@ void limSendExitBmpsInd(tpAniSirGlobal pMac, tExitBmpsReason reasonCode, void limHandleCSAoffloadMsg(tpAniSirGlobal pMac,tpSirMsgQ MsgQ) { tpPESession psessionEntry; + tSirMsgQ mmhMsg; tpCSAOffloadParams csa_params = (tpCSAOffloadParams)(MsgQ->bodyptr); + tpSmeCsaOffloadInd pCsaOffloadInd; tpDphHashNode pStaDs = NULL ; tANI_U16 aid = 0 ; @@ -2942,6 +2944,25 @@ void limHandleCSAoffloadMsg(tpAniSirGlobal pMac,tpSirMsgQ MsgQ) psessionEntry->gLimChannelSwitch.secondarySubBand); limPrepareFor11hChannelSwitch(pMac, psessionEntry); + pCsaOffloadInd = vos_mem_malloc(sizeof(tSmeCsaOffloadInd)); + if (NULL == pCsaOffloadInd) { + limLog(pMac, LOGE, + FL("AllocateMemory failed for eWNI_SME_CSA_OFFLOAD_EVENT")); + goto err; + } + + vos_mem_set(pCsaOffloadInd, sizeof(tSmeCsaOffloadInd), 0); + pCsaOffloadInd->mesgType = eWNI_SME_CSA_OFFLOAD_EVENT; + pCsaOffloadInd->mesgLen = sizeof(tSmeCsaOffloadInd); + vos_mem_copy(pCsaOffloadInd->bssId, psessionEntry->bssId, + sizeof(tSirMacAddr)); + mmhMsg.type = eWNI_SME_CSA_OFFLOAD_EVENT; + mmhMsg.bodyptr = pCsaOffloadInd; + mmhMsg.bodyval = 0; + PELOG1(limLog(pMac, LOG1, FL("Sending eWNI_SME_CSA_OFFLOAD_EVENT to SME. "));) + MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type)); + limReInitScanResults(pMac); + limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT); } err: diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c index 20d191f422f3..e8654318f657 100644 --- a/CORE/MAC/src/pe/lim/limUtils.c +++ b/CORE/MAC/src/pe/lim/limUtils.c @@ -682,6 +682,8 @@ char *limMsgStr(tANI_U32 msgType) case eWNI_SME_GET_TSM_STATS_RSP: return "eWNI_SME_GET_TSM_STATS_RSP"; #endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */ + case eWNI_SME_CSA_OFFLOAD_EVENT: + return "eWNI_SME_CSA_OFFLOAD_EVENT"; default: return "INVALID SME message"; } diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c index 3b4adbf7fc75..16c45fcaacef 100644 --- a/CORE/SME/src/csr/csrApiScan.c +++ b/CORE/SME/src/csr/csrApiScan.c @@ -2469,6 +2469,37 @@ eHalStatus csrScanFlushSelectiveResult(tpAniSirGlobal pMac, v_BOOL_t flushP2P) return (status); } +void csrScanFlushBssEntry(tpAniSirGlobal pMac, + tpSmeCsaOffloadInd pCsaOffloadInd) +{ + tListElem *pEntry,*pFreeElem; + tCsrScanResult *pBssDesc; + tDblLinkList *pList = &pMac->scan.scanResultList; + + csrLLLock(pList); + + pEntry = csrLLPeekHead( pList, LL_ACCESS_NOLOCK ); + while( pEntry != NULL) + { + pBssDesc = GET_BASE_ADDR( pEntry, tCsrScanResult, Link ); + if( vos_mem_compare(pBssDesc->Result.BssDescriptor.bssId, + pCsaOffloadInd->bssId, sizeof(tSirMacAddr)) ) + { + pFreeElem = pEntry; + pEntry = csrLLNext(pList, pEntry, LL_ACCESS_NOLOCK); + csrLLRemoveEntry(pList, pFreeElem, LL_ACCESS_NOLOCK); + csrFreeScanResultEntry( pMac, pBssDesc ); + smsLog( pMac, LOG1, FL("Removed BSS entry:%pM"), + pCsaOffloadInd->bssId); + continue; + } + + pEntry = csrLLNext(pList, pEntry, LL_ACCESS_NOLOCK); + } + + csrLLUnlock(pList); +} + /** * csrCheck11dChannel * diff --git a/CORE/SME/src/csr/csrInsideApi.h b/CORE/SME/src/csr/csrInsideApi.h index a75536733e13..2db987d33d1a 100644 --- a/CORE/SME/src/csr/csrInsideApi.h +++ b/CORE/SME/src/csr/csrInsideApi.h @@ -600,6 +600,8 @@ eHalStatus csrScanGetBaseChannels( tpAniSirGlobal pMac, tCsrChannelInfo * pChann eHalStatus csrQueueSmeCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand, tANI_BOOLEAN fHighPriority ); tSmeCmd *csrGetCommandBuffer( tpAniSirGlobal pMac ); void csrReleaseCommand(tpAniSirGlobal pMac, tSmeCmd *pCommand); +void csrScanFlushBssEntry(tpAniSirGlobal pMac, + tpSmeCsaOffloadInd pCsaOffloadInd); #ifdef FEATURE_WLAN_WAPI tANI_BOOLEAN csrIsProfileWapi( tCsrRoamProfile *pProfile ); #endif /* FEATURE_WLAN_WAPI */ diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 268f0a530600..1e2e68623073 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -2661,6 +2661,13 @@ eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg) vos_mem_free(pMsg->bodyptr); } break; + case eWNI_SME_CSA_OFFLOAD_EVENT: + if (pMsg->bodyptr) + { + csrScanFlushBssEntry(pMac, pMsg->bodyptr); + vos_mem_free(pMsg->bodyptr); + } + break; default: if ( ( pMsg->type >= eWNI_SME_MSG_TYPES_BEGIN ) |
