diff options
| -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 ) |
