summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Girigowda <sgirigow@qca.qualcomm.com>2014-07-21 13:06:03 -0700
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-07-25 10:36:54 -0700
commit96757b2e2b6a1da744dcfc88178349a9d83493bb (patch)
treefdeed9aff2e6836e30a8e0676503dd38ba8e967f
parent3846b82cbfefec857a9faa63211934fb31758c9e (diff)
qcacld: UMAC: Neighbor roam sessionization
As a part of the STA+STA roaming feature, the requirement is to disable roaming on both interfaces when both STA+STA are connected. If any of the interface disconnects, roaming need to be re-enabled on the connected interface. Address this requirement by sessionizing the CSR neighbor roam functions. Change-Id: Iafcdac64bdf6befd78ed9af207f56d0b0232eaaf CRs-Fixed: 683120
-rw-r--r--CORE/MAC/inc/sirApi.h7
-rw-r--r--CORE/MAC/src/pe/include/rrmGlobal.h2
-rw-r--r--CORE/MAC/src/pe/lim/limAssocUtils.c85
-rw-r--r--CORE/MAC/src/pe/lim/limFT.c13
-rw-r--r--CORE/MAC/src/pe/lim/limProcessActionFrame.c2
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMessageQueue.c18
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c11
-rw-r--r--CORE/MAC/src/pe/lim/limSendSmeRspMessages.c10
-rw-r--r--CORE/MAC/src/pe/rrm/rrmApi.c1
-rw-r--r--CORE/SAP/src/sapApiLinkCntl.c1
-rw-r--r--CORE/SAP/src/sapInternal.h2
-rw-r--r--CORE/SME/inc/csrApi.h8
-rw-r--r--CORE/SME/inc/csrInternal.h17
-rw-r--r--CORE/SME/inc/csrNeighborRoam.h71
-rw-r--r--CORE/SME/inc/smeInside.h25
-rw-r--r--CORE/SME/inc/sme_Api.h222
-rw-r--r--CORE/SME/inc/sme_FTApi.h9
-rw-r--r--CORE/SME/src/QoS/sme_Qos.c23
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c406
-rw-r--r--CORE/SME/src/csr/csrApiScan.c291
-rw-r--r--CORE/SME/src/csr/csrCmdProcess.c4
-rw-r--r--CORE/SME/src/csr/csrInsideApi.h21
-rw-r--r--CORE/SME/src/csr/csrNeighborRoam.c1538
-rw-r--r--CORE/SME/src/rrm/sme_rrm.c40
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c574
-rw-r--r--CORE/SME/src/sme_common/sme_FTApi.c31
26 files changed, 2202 insertions, 1230 deletions
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 15e92a5eb459..c1979f0308b8 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -3920,6 +3920,7 @@ typedef struct
/* Length of the beacon or probe response
* corresponding to the candidate found by PNO */
tANI_U32 frameLength;
+ tANI_U8 sessionId;
/* Index to memory location where the contents of
* beacon or probe response frame will be copied */
tANI_U8 data[1];
@@ -4015,6 +4016,12 @@ typedef struct sSirRoamOffloadScanReq
tSirAcUapsd AcUapsd;
#endif
} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
+
+typedef struct sSirRoamOffloadScanRsp
+{
+ tANI_U8 sessionId;
+ tANI_U32 reason;
+} tSirRoamOffloadScanRsp, *tpSirRoamOffloadScanRsp;
#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
#define SIR_NOCHANGE_POWER_VALUE 0xFFFFFFFF
diff --git a/CORE/MAC/src/pe/include/rrmGlobal.h b/CORE/MAC/src/pe/include/rrmGlobal.h
index 810a385c1525..e774964078eb 100644
--- a/CORE/MAC/src/pe/include/rrmGlobal.h
+++ b/CORE/MAC/src/pe/include/rrmGlobal.h
@@ -142,9 +142,9 @@ typedef struct sSirNeighborReportInd
{
tANI_U16 messageType; // eWNI_SME_NEIGHBOR_REPORT_IND
tANI_U16 length;
+ tANI_U8 sessionId;
tANI_U16 numNeighborReports;
tSirMacAddr bssId; //For the session.
- //tSirResultCodes statusCode;
tSirNeighborBssDescription sNeighborBssDescription[1];
} tSirNeighborReportInd, * tpSirNeighborReportInd;
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c
index d6937494d624..9e9404e89eec 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.c
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.c
@@ -2744,7 +2744,7 @@ limAddSta(
msgQ.bodyptr = pAddStaParams;
msgQ.bodyval = 0;
- limLog( pMac, LOG1, FL( "Sending SIR_HAL_ADD_STA_REQ for assocId %d" ),
+ limLog(pMac, LOG1, FL("Sending WDA_ADD_STA_REQ for assocId %d"),
pStaDs->assocId);
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
@@ -2910,35 +2910,34 @@ limDelSta(
*/
tSirRetStatus limAddFTStaSelf(tpAniSirGlobal pMac, tANI_U16 assocId, tpPESession psessionEntry)
{
- tpAddStaParams pAddStaParams = NULL;
+ tpAddStaParams pAddStaParams = NULL;
+ tSirRetStatus retCode = eSIR_SUCCESS;
tSirMsgQ msgQ;
- tSirRetStatus retCode = eSIR_SUCCESS;
pAddStaParams = psessionEntry->ftPEContext.pAddStaReq;
pAddStaParams->assocId = assocId;
pAddStaParams->smesessionId = psessionEntry->smeSessionId;
- msgQ.type = SIR_HAL_ADD_STA_REQ;
+ msgQ.type = WDA_ADD_STA_REQ;
msgQ.reserved = 0;
msgQ.bodyptr = pAddStaParams;
msgQ.bodyval = 0;
-
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
- limLog( pMac, LOG1, FL( "Sending SIR_HAL_ADD_STA_REQ... (aid %d)" ), pAddStaParams->assocId);
+ limLog(pMac, LOGE,
+ FL("Sending WDA_ADD_STA_REQ (aid %d)"), pAddStaParams->assocId);
#endif
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
psessionEntry->limPrevMlmState = psessionEntry->limMlmState;
- MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, eLIM_MLM_WT_ADD_STA_RSP_STATE));
+ MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId,
+ eLIM_MLM_WT_ADD_STA_RSP_STATE));
psessionEntry->limMlmState = eLIM_MLM_WT_ADD_STA_RSP_STATE;
- if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
- {
- limLog( pMac, LOGE, FL("Posting ADD_STA_REQ to HAL failed, reason=%X"), retCode );
+ if (eSIR_SUCCESS != (retCode = wdaPostCtrlMsg(pMac, &msgQ))) {
+ limLog(pMac, LOGE,
+ FL("Posting WDA_ADD_STA_REQ to HAL failed, reason=%X"), retCode);
vos_mem_free(pAddStaParams);
}
- //
- // Dont need it any more
psessionEntry->ftPEContext.pAddStaReq = NULL;
return retCode;
}
@@ -2991,15 +2990,6 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio
limLog( pMac, LOG1, FL("SGI 20 %d"),(int)selfTxWidth);
limLog( pMac, LOG1, FL("Roam Channel Bonding Mode %d"),(int)pMac->roam.configParam.uCfgDot11Mode);
- #if 0
- retCode =wlan_cfgGetStr(pMac, WNI_CFG_STA_ID, staMac, &cfg);
- if (retCode != eSIR_SUCCESS)
- {
- /// Could not get BSSID from CFG. Log error.
- limLog(pMac, LOGP, FL("could not retrieve STA MAC"));
- return retCode;
- }
- #endif //TO SUPPORT BT-AMP
sirCopyMacAddr(staMac,psessionEntry->selfMacAddr);
limLog(pMac, LOG1, FL(MAC_ADDRESS_STR": "),MAC_ADDR_ARRAY(staMac));
pAddStaParams = vos_mem_malloc(sizeof(tAddStaParams));
@@ -3041,9 +3031,6 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio
#else
limPopulateOwnRateSet(pMac, &pAddStaParams->supportedRates, NULL, false,psessionEntry);
#endif
-// if( psessionEntry->htCapability)---> old check
- /*We used to check if the session is htCapable before setting the htCapable
- * flag. The check limited us from operating */
if ( IS_DOT11_MODE_HT(selfStaDot11Mode) )
{
pAddStaParams->htCapable = TRUE ;
@@ -3065,7 +3052,6 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio
pAddStaParams->greenFieldCapable = limGetHTCapability( pMac, eHT_GREENFIELD, psessionEntry);
pAddStaParams->txChannelWidthSet =
pMac->roam.configParam.channelBondingMode5GHz;
- // pAddStaParams->txChannelWidthSet = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET, psessionEntry);
pAddStaParams->mimoPS = limGetHTCapability( pMac, eHT_MIMO_POWER_SAVE, psessionEntry );
pAddStaParams->rifsMode = limGetHTCapability( pMac, eHT_RIFS_MODE, psessionEntry );
pAddStaParams->lsigTxopProtection = limGetHTCapability( pMac, eHT_LSIG_TXOP_PROTECTION, psessionEntry );
@@ -3086,9 +3072,6 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio
{
pAddStaParams->fShortGI20Mhz =
WNI_CFG_SHORT_GI_20MHZ_STAMAX;
- //pAddStaParams->fShortGI20Mhz =
- //limGetHTCapability(pMac, eHT_SHORT_GI_20MHZ,
- // psessionEntry);
}
else
{
@@ -3114,9 +3097,6 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio
{
pAddStaParams->fShortGI40Mhz =
WNI_CFG_SHORT_GI_40MHZ_STAMAX;
- //pAddStaParams->fShortGI40Mhz =
- //limGetHTCapability(pMac, eHT_SHORT_GI_40MHZ,
- // psessionEntry);
}
else
{
@@ -3187,8 +3167,8 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio
pAddStaParams->p2pCapableSta = 1;
}
- //limFillSupportedRatesInfo(pMac, NULL, &pAddStaParams->supportedRates,psessionEntry);
- pAddStaParams->supportedRates.opRateMode = limGetStaRateMode((tANI_U8)selfStaDot11Mode);
+ pAddStaParams->supportedRates.opRateMode =
+ limGetStaRateMode((tANI_U8)selfStaDot11Mode);
limLog(pMac, LOG2, FL(" StaIdx: %d updateSta = %d htcapable = %d "),
pAddStaParams->staIdx,pAddStaParams->updateSta,
@@ -3199,31 +3179,26 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio
pAddStaParams->htLdpcCapable,pAddStaParams->vhtLdpcCapable,
pAddStaParams->p2pCapableSta);
- limLog(pMac, LOG2, FL(" sessionid: %d Assoc ID: %d listenInterval = %d"
- " shortPreambleSupported: %d "), psessionEntry->smeSessionId,
- pAddStaParams->assocId, pAddStaParams->listenInterval,
- pAddStaParams->shortPreambleSupported);
+ limLog(pMac, LOG2, FL("sessionid: %d Assoc ID: %d listenInterval = %d "
+ "shortPreambleSupported: %d"), psessionEntry->smeSessionId,
+ pAddStaParams->assocId, pAddStaParams->listenInterval,
+ pAddStaParams->shortPreambleSupported);
msgQ.type = WDA_ADD_STA_REQ;
- //
- // FIXME_GEN4
- // A global counter (dialog token) is required to keep track of
- // all PE <-> HAL communication(s)
- //
msgQ.reserved = 0;
msgQ.bodyptr = pAddStaParams;
msgQ.bodyval = 0;
- limLog( pMac, LOGW, FL(MAC_ADDRESS_STR":Sessionid %d : "
- "Sending SIR_HAL_ADD_STA_REQ... (aid %d)" ),
- MAC_ADDR_ARRAY(pAddStaParams->staMac),
- pAddStaParams->sessionId,
- pAddStaParams->assocId);
- MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
+ limLog(pMac, LOG1, FL(MAC_ADDRESS_STR":Sessionid %d : "
+ "Sending WDA_ADD_STA_REQ. (aid %d)"),
+ MAC_ADDR_ARRAY(pAddStaParams->staMac),
+ pAddStaParams->sessionId,
+ pAddStaParams->assocId);
+ MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
- if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
- {
- limLog( pMac, LOGE, FL("Posting ADD_STA_REQ to HAL failed, reason=%X"), retCode );
+ if (eSIR_SUCCESS != (retCode = wdaPostCtrlMsg(pMac, &msgQ))) {
+ limLog(pMac, LOGE,
+ FL("Posting WDA_ADD_STA_REQ to HAL failed, reason=%X"), retCode);
vos_mem_free(pAddStaParams);
}
return retCode;
@@ -4198,8 +4173,8 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
msgQ.bodyptr = pAddBssParams;
msgQ.bodyval = 0;
- limLog( pMac, LOG1, FL("SessionId:%d Sending SIR_HAL_ADD_BSS_REQ" ),
- psessionEntry->peSessionId);
+ limLog(pMac, LOG1, FL("SessionId:%d Sending WDA_ADD_BSS_REQ"),
+ psessionEntry->peSessionId);
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
retCode = wdaPostCtrlMsg( pMac, &msgQ );
@@ -4636,8 +4611,8 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry
msgQ.bodyptr = pAddBssParams;
msgQ.bodyval = 0;
- limLog( pMac, LOG1, FL("SessionId:%d Sending SIR_HAL_ADD_BSS_REQ" ),
- psessionEntry->peSessionId);
+ limLog(pMac, LOG1, FL("SessionId:%d Sending WDA_ADD_BSS_REQ"),
+ psessionEntry->peSessionId);
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
retCode = wdaPostCtrlMsg( pMac, &msgQ );
diff --git a/CORE/MAC/src/pe/lim/limFT.c b/CORE/MAC/src/pe/lim/limFT.c
index 0bfa7e34ec40..e3fc7131d362 100644
--- a/CORE/MAC/src/pe/lim/limFT.c
+++ b/CORE/MAC/src/pe/lim/limFT.c
@@ -320,18 +320,17 @@ int limProcessFTPreAuthReq(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
/* Dont need to suspend if APs are in same channel */
if (psessionEntry->currentOperChannel !=
- psessionEntry->ftPEContext.pFTPreAuthReq->preAuthchannelNum) {
+ psessionEntry->ftPEContext.pFTPreAuthReq->preAuthchannelNum) {
/* Need to suspend link only if the channels are different */
PELOG2(limLog(pMac, LOG2, FL("Performing pre-auth on different"
- " channel (session %p)"), psessionEntry);)
+ " channel (session %p)"), psessionEntry);)
limSuspendLink(pMac, eSIR_CHECK_ROAMING_SCAN,
limFTPreAuthSuspendLinkHandler,
(tANI_U32 *)psessionEntry);
- }
- else {
+ } else {
PELOG2(limLog(pMac, LOG2, FL("Performing pre-auth on same"
" channel (session %p)"), psessionEntry);)
- /* We are in the same channel. Perform pre-auth */
+ /* We are in the same channel. Perform pre-auth */
limPerformFTPreAuth(pMac, eHAL_STATUS_SUCCESS, NULL, psessionEntry);
}
@@ -790,6 +789,7 @@ tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
pAddBssParams->respReqd = true;
pAddBssParams->staContext.sessionId = pftSessionEntry->peSessionId;
+ pAddBssParams->staContext.smesessionId = pftSessionEntry->smeSessionId;
pAddBssParams->sessionId = pftSessionEntry->peSessionId;
// Set a new state for MLME
@@ -849,7 +849,7 @@ void limFillFTSession(tpAniSirGlobal pMac,
// Fields to be filled later
pftSessionEntry->pLimJoinReq = NULL;
- pftSessionEntry->smeSessionId = 0;
+ pftSessionEntry->smeSessionId = psessionEntry->smeSessionId;
pftSessionEntry->transactionId = 0;
limExtractApCapabilities( pMac,
@@ -1075,7 +1075,6 @@ void limFTProcessPreAuthResult(tpAniSirGlobal pMac, eHalStatus status,
limPostFTPreAuthRsp(pMac, psessionEntry->ftPEContext.ftPreAuthStatus,
psessionEntry->ftPEContext.saved_auth_rsp,
psessionEntry->ftPEContext.saved_auth_rsp_length, psessionEntry);
-
}
/*------------------------------------------------------------------
diff --git a/CORE/MAC/src/pe/lim/limProcessActionFrame.c b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
index b09e89d7b5d8..0f17cd205f0c 100644
--- a/CORE/MAC/src/pe/lim/limProcessActionFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
@@ -96,7 +96,7 @@ void limStopTxAndSwitchChannel(tpAniSirGlobal pMac, tANI_U8 sessionId)
if( NULL == psessionEntry )
{
- limLog(pMac, LOGE, FL("Session %d not active\n "), sessionId);
+ limLog(pMac, LOGE, FL("Session %d not active"), sessionId);
return;
}
diff --git a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
index 8e4e6fa63647..287511773064 100644
--- a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
+++ b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
@@ -567,9 +567,8 @@ limHandle80211Frames(tpAniSirGlobal pMac, tpSirMsgQ limMsg, tANI_U8 *pDeferMsg)
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if ( WDA_GET_ROAMCANDIDATEIND(pRxPacketInfo))
{
- limLog( pMac, LOG2, FL("Notify SME with candidate ind"));
- //send a session 0 for now - TBD
- limSendSmeCandidateFoundInd(pMac, 0);
+ limLog(pMac, LOG2, FL("Notify SME with candidate ind"));
+ limSendSmeCandidateFoundInd(pMac, WDA_GET_SESSIONID(pRxPacketInfo));
goto end;
}
if (WDA_GET_OFFLOADSCANLEARN(pRxPacketInfo))
@@ -1518,14 +1517,14 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
tANI_U8 sessionId;
if((psessionEntry = peFindSessionByStaId(pMac,pTdlsInd->staIdx,&sessionId))== NULL)
{
- limLog(pMac, LOG1, FL("session does not exist for given bssId\n"));
+ limLog(pMac, LOG1, FL("session does not exist for given bssId"));
vos_mem_free(limMsg->bodyptr);
limMsg->bodyptr = NULL;
return;
}
if ((pStaDs = dphGetHashEntry(pMac, pTdlsInd->assocId, &psessionEntry->dph.dphHashTable)) == NULL)
{
- limLog(pMac, LOG1, FL("pStaDs Does not exist for given staId\n"));
+ limLog(pMac, LOG1, FL("pStaDs Does not exist for given staId"));
vos_mem_free(limMsg->bodyptr);
limMsg->bodyptr = NULL;
return;
@@ -2110,10 +2109,11 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
pTdlsLinkEstablishParams->staIdx,
&sessionId))== NULL)
{
- limLog(pMac, LOGE, FL("session %u does not exist.\n"), sessionId);
- /* Still send the eWNI_SME_TDLS_LINK_ESTABLISH_RSP message to SME
- with session id as zero and status as FAILURE so, that message
- queued in SME queue can be freed to prevent the SME cmd buffer leak */
+ limLog(pMac, LOGE, FL("session %u does not exist"), sessionId);
+ /* Still send the eWNI_SME_TDLS_LINK_ESTABLISH_RSP message to
+ * SME with session id as zero and status as FAILURE so,
+ * that message queued in SME queue can be freed to prevent
+ * the SME cmd buffer leak */
limSendSmeTdlsLinkEstablishReqRsp(pMac,
0,
NULL,
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
index df30b64f84c6..cbfbd82bfb3f 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
@@ -2846,11 +2846,6 @@ limProcessStaMlmAddBssRspFT(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, tpPESession
PELOGE(limLog(pMac, LOGE, FL("Invalid parameters"));)
goto end;
}
- if((psessionEntry = peFindSessionBySessionId(pMac,pAddBssParams->sessionId))== NULL)
- {
- limLog( pMac, LOGE, FL( "Session Does not exist for given sessionId" ));
- goto end;
- }
if ( eLIM_MLM_WT_ADD_BSS_RSP_FT_REASSOC_STATE != psessionEntry->limMlmState )
{
goto end;
@@ -2951,6 +2946,7 @@ limProcessStaMlmAddBssRspFT(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, tpPESession
/* Update PE session ID */
pAddStaParams->sessionId = psessionEntry->peSessionId;
+ pAddStaParams->smesessionId = psessionEntry->smeSessionId;
// This will indicate HAL to "allocate" a new STA index
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
@@ -5039,13 +5035,14 @@ limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry){
*
* @return None
*/
-void limSendSmeScanCacheUpdatedInd(void)
+void limSendSmeScanCacheUpdatedInd(tANI_U8 sessionId)
{
vos_msg_t msg;
msg.type = WDA_SME_SCAN_CACHE_UPDATED;
msg.reserved = 0;
msg.bodyptr = NULL;
+ msg.bodyval = sessionId;
if (!VOS_IS_STATUS_SUCCESS(vos_mq_post_message(VOS_MODULE_ID_WDA, &msg)))
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
@@ -5074,7 +5071,7 @@ void limSendScanOffloadComplete(tpAniSirGlobal pMac,
pScanEvent->sessionId,
0);
#ifdef FEATURE_WLAN_SCAN_PNO
- limSendSmeScanCacheUpdatedInd();
+ limSendSmeScanCacheUpdatedInd(pScanEvent->sessionId);
#endif
}
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
index 613210bef9fc..917f2a2a9cc2 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
@@ -3219,20 +3219,20 @@ void limSendSmeMaxAssocExceededNtf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
\sa
----------------------------------------------------------------- */
void
-limSendSmeCandidateFoundInd(tpAniSirGlobal pMac, tANI_U8 sessionId)
+limSendSmeCandidateFoundInd(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
tSirMsgQ mmhMsg;
tSirSmeCandidateFoundInd *pSirSmeCandidateFoundInd;
pSirSmeCandidateFoundInd = vos_mem_malloc(sizeof(tSirSmeCandidateFoundInd));
- if ( NULL == pSirSmeCandidateFoundInd )
- {
- limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_CANDIDATE_FOUND_IND\n"));
+ if (NULL == pSirSmeCandidateFoundInd) {
+ limLog(pMac, LOGP,
+ FL("AllocateMemory failed for eWNI_SME_CANDIDATE_FOUND_IND"));
return;
}
pSirSmeCandidateFoundInd->messageType = eWNI_SME_CANDIDATE_FOUND_IND;
- pSirSmeCandidateFoundInd->length = sizeof(tSirSmeDisassocInd);
+ pSirSmeCandidateFoundInd->length = sizeof(tSirSmeCandidateFoundInd);
pSirSmeCandidateFoundInd->sessionId = sessionId;
diff --git a/CORE/MAC/src/pe/rrm/rrmApi.c b/CORE/MAC/src/pe/rrm/rrmApi.c
index 38398b321cc2..a914254167e2 100644
--- a/CORE/MAC/src/pe/rrm/rrmApi.c
+++ b/CORE/MAC/src/pe/rrm/rrmApi.c
@@ -411,6 +411,7 @@ rrmProcessNeighborReportResponse( tpAniSirGlobal pMac,
pSmeNeighborRpt->messageType = eWNI_SME_NEIGHBOR_REPORT_IND;
pSmeNeighborRpt->length = length;
+ pSmeNeighborRpt->sessionId = pSessionEntry->smeSessionId;
pSmeNeighborRpt->numNeighborReports = pNeighborRep->num_NeighborReport;
vos_mem_copy(pSmeNeighborRpt->bssId, pSessionEntry->bssId, sizeof(tSirMacAddr));
diff --git a/CORE/SAP/src/sapApiLinkCntl.c b/CORE/SAP/src/sapApiLinkCntl.c
index 315c1cc3932b..3695bc3eae50 100644
--- a/CORE/SAP/src/sapApiLinkCntl.c
+++ b/CORE/SAP/src/sapApiLinkCntl.c
@@ -128,6 +128,7 @@ WLANSAP_ScanCallback
(
tHalHandle halHandle,
void *pContext, /* Opaque SAP handle */
+ v_U8_t sessionId,
v_U32_t scanID,
eCsrScanStatus scanStatus
)
diff --git a/CORE/SAP/src/sapInternal.h b/CORE/SAP/src/sapInternal.h
index 6056e9507637..24e71ab3ff57 100644
--- a/CORE/SAP/src/sapInternal.h
+++ b/CORE/SAP/src/sapInternal.h
@@ -291,6 +291,7 @@ typedef struct sWLAN_SAPEvent {
tHalHandle: the tHalHandle passed in with the scan request
*p2: the second context pass in for the caller, opaque sap Handle here
scanID:
+ sessionId: Session identifier
status: Status of scan -success, failure or abort
RETURN VALUE
@@ -306,6 +307,7 @@ WLANSAP_ScanCallback
(
tHalHandle halHandle,
void *pContext,
+ v_U8_t sessionId,
v_U32_t scanID,
eCsrScanStatus scanStatus
);
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h
index 8ab4f4374f4c..bbd68f35bb73 100644
--- a/CORE/SME/inc/csrApi.h
+++ b/CORE/SME/inc/csrApi.h
@@ -1577,7 +1577,10 @@ typedef struct tagCsrEseBeaconReq
//void *p2 -- the second context pass in for the caller
//***what if callback is called before requester gets the scanId??
-typedef eHalStatus (*csrScanCompleteCallback)(tHalHandle, void *p2, tANI_U32 scanID, eCsrScanStatus status);
+typedef eHalStatus (*csrScanCompleteCallback)(tHalHandle, void *p2,
+ tANI_U8 sessionId,
+ tANI_U32 scanID,
+ eCsrScanStatus status);
@@ -1747,10 +1750,11 @@ eHalStatus csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId, tpSirBs
\param hHal - handle to Hal context
\param eBand - band value
+ \param sessionId - Session Identifier
\return eHalStatus
---------------------------------------------------------------------------*/
-eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand);
+eHalStatus csrSetBand(tHalHandle hHal, tANI_U8 sessionId, eCsrBand eBand);
/*---------------------------------------------------------------------------
This is the function to get the current operating band value
diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h
index be91541b4901..62cd46e31faa 100644
--- a/CORE/SME/inc/csrInternal.h
+++ b/CORE/SME/inc/csrInternal.h
@@ -802,7 +802,8 @@ typedef struct tagCsrScanStruct
#ifdef WLAN_AP_STA_CONCURRENCY
tDblLinkList scanCmdPendingList;
#endif
- tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found
+ /* This includes all channels on which candidate APs are found */
+ tCsrChannel occupiedChannels[CSR_ROAM_SESSION_MAX];
tANI_S8 inScanResultBestAPRssi;
eCsrBand scanBandPreference; //This defines the band perference for scan
csrScanCompleteCallback callback11dScanDone;
@@ -1067,7 +1068,7 @@ typedef struct tagCsrRoamStruct
tCsrRoamSession *roamSession;
tANI_U32 transactionId; // Current transaction ID for internal use.
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
- tCsrNeighborRoamControlInfo neighborRoamInfo;
+ tCsrNeighborRoamControlInfo neighborRoamInfo[CSR_ROAM_SESSION_MAX];
#endif
#ifdef FEATURE_WLAN_LFR
tANI_U8 isFastRoamIniFeatureEnabled;
@@ -1497,14 +1498,14 @@ eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac,
#ifdef WLAN_FEATURE_VOWIFI_11R
//Returns whether the current association is a 11r assoc or not
-tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac);
+tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac, tANI_U8 sessionId);
#endif
#ifdef FEATURE_WLAN_ESE
//Returns whether the current association is a ESE assoc or not
-tANI_BOOLEAN csrRoamIsESEAssoc(tpAniSirGlobal pMac);
+tANI_BOOLEAN csrRoamIsESEAssoc(tpAniSirGlobal pMac, tANI_U8 sessionId);
tANI_BOOLEAN csrRoamIsEseIniFeatureEnabled(tpAniSirGlobal pMac);
-tANI_BOOLEAN csrNeighborRoamIsESEAssoc(tpAniSirGlobal pMac);
+tANI_BOOLEAN csrNeighborRoamIsESEAssoc(tpAniSirGlobal pMac, tANI_U8 sessionId);
#endif
//Remove this code once SLM_Sessionization is supported
@@ -1522,8 +1523,10 @@ VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tA
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
eHalStatus csrScanRequestLfrResult(tpAniSirGlobal pMac, tANI_U32 sessionId,
csrScanCompleteCallback callback, void *pContext);
-eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac, tANI_U8 reason);
-eHalStatus csrHandoffRequest(tpAniSirGlobal pMac, tCsrHandoffRequest *pHandoffInfo);
+eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac,
+ tpSirRoamOffloadScanRsp scanOffloadRsp);
+eHalStatus csrHandoffRequest(tpAniSirGlobal pMac, tANI_U8 sessionId,
+ tCsrHandoffRequest *pHandoffInfo);
#endif
tANI_BOOLEAN csrRoamIsStaMode(tpAniSirGlobal pMac, tANI_U32 sessionId);
#endif
diff --git a/CORE/SME/inc/csrNeighborRoam.h b/CORE/SME/inc/csrNeighborRoam.h
index 4f865431cc31..77bc2cfcc5ba 100644
--- a/CORE/SME/inc/csrNeighborRoam.h
+++ b/CORE/SME/inc/csrNeighborRoam.h
@@ -213,57 +213,74 @@ typedef struct sCsrNeighborRoamControlInfo
tANI_U8 currentRoamBeaconRssiWeight;
} tCsrNeighborRoamControlInfo, *tpCsrNeighborRoamControlInfo;
-
/* All the necessary Function declarations are here */
eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac,
tANI_U8 sessionId, VOS_STATUS status);
eHalStatus csrNeighborRoamIndicateDisconnect(tpAniSirGlobal pMac,
tANI_U8 sessionId);
-tANI_BOOLEAN csrNeighborRoamIsHandoffInProgress(tpAniSirGlobal pMac);
-void csrNeighborRoamRequestHandoff(tpAniSirGlobal pMac);
-eHalStatus csrNeighborRoamInit(tpAniSirGlobal pMac);
-void csrNeighborRoamClose(tpAniSirGlobal pMac);
+tANI_BOOLEAN csrNeighborRoamIsHandoffInProgress(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
+void csrNeighborRoamRequestHandoff(tpAniSirGlobal pMac, tANI_U8 sessionId);
+eHalStatus csrNeighborRoamInit(tpAniSirGlobal pMac, tANI_U8 sessionId);
+void csrNeighborRoamClose(tpAniSirGlobal pMac, tANI_U8 sessionId);
void csrNeighborRoamPurgePreauthFailedList(tpAniSirGlobal pMac);
-VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac);
+VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
VOS_STATUS csrNeighborRoamTransitionToPreauthDone(tpAniSirGlobal pMac);
eHalStatus csrNeighborRoamPrepareScanProfileFilter(tpAniSirGlobal pMac,
- tCsrScanResultFilter *pScanFilter);
+ tCsrScanResultFilter *pScanFilter,
+ tANI_U8 sessionId);
void csrNeighborRoamGetHandoffAPInfo(tpAniSirGlobal pMac,
- tpCsrNeighborRoamBSSInfo pHandoffNode);
+ tpCsrNeighborRoamBSSInfo pHandoffNode,
+ tANI_U8 sessionId);
eHalStatus csrNeighborRoamPreauthRspHandler(tpAniSirGlobal pMac,
- tSirRetStatus limStatus);
+ tANI_U8 sessionId,
+ tSirRetStatus limStatus);
#ifdef WLAN_FEATURE_VOWIFI_11R
-tANI_BOOLEAN csrNeighborRoamIs11rAssoc(tpAniSirGlobal pMac);
+tANI_BOOLEAN csrNeighborRoamIs11rAssoc(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
#endif
-VOS_STATUS csrNeighborRoamCreateChanListFromNeighborReport(tpAniSirGlobal pMac);
+VOS_STATUS csrNeighborRoamCreateChanListFromNeighborReport(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
void csrNeighborRoamTranistionPreauthDoneToDisconnected(tpAniSirGlobal pMac,
- tANI_U32 sessionId);
-tANI_BOOLEAN csrNeighborRoamStatePreauthDone(tpAniSirGlobal pMac);
-tANI_BOOLEAN csrNeighborRoamScanRspPending(tHalHandle hHal);
-tANI_BOOLEAN csrNeighborMiddleOfRoaming(tHalHandle hHal);
+ tANI_U8 sessionId);
+tANI_BOOLEAN csrNeighborRoamStatePreauthDone(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
+tANI_BOOLEAN csrNeighborRoamScanRspPending(tHalHandle hHal,
+ tANI_U8 sessionId);
+tANI_BOOLEAN csrNeighborMiddleOfRoaming(tHalHandle hHal, tANI_U8 sessionId);
VOS_STATUS csrNeighborRoamSetLookupRssiThreshold(tpAniSirGlobal pMac,
- v_U8_t neighborLookupRssiThreshold);
+ tANI_U8 sessionId,
+ v_U8_t neighborLookupRssiThreshold);
VOS_STATUS
csrNeighborRoamSetOpportunisticScanThresholdDiff(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
v_U8_t nOpportunisticThresholdDiff);
VOS_STATUS
csrNeighborRoamSetRoamRescanRssiDiff(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
v_U8_t nRoamRescanRssiDiff);
VOS_STATUS
csrNeighborRoamSetRoamBmissFirstBcnt(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
v_U8_t nRoamBmissFirstBcnt);
VOS_STATUS
csrNeighborRoamSetRoamBmissFinalBcnt(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
v_U8_t nRoamBmissFinalBcnt);
VOS_STATUS
csrNeighborRoamSetRoamBeaconRssiWeight(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
v_U8_t nRoamBeaconRssiWeight);
VOS_STATUS csrNeighborRoamUpdateFastRoamingEnabled(tpAniSirGlobal pMac,
- const v_BOOL_t fastRoamEnabled);
+ tANI_U8 sessionId,
+ const v_BOOL_t fastRoamEnabled);
VOS_STATUS csrNeighborRoamUpdateEseModeEnabled(tpAniSirGlobal pMac,
- const v_BOOL_t eseMode);
+ tANI_U32 sessionId,
+ const v_BOOL_t eseMode);
VOS_STATUS csrNeighborRoamChannelsFilterByCurrentBand(
tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
tANI_U8* pInputChannelList,
tANI_U8 inputNumOfChannels,
tANI_U8* pOutputChannelList,
@@ -310,19 +327,25 @@ VOS_STATUS csrNeighborRoamMergeChannelLists(tpAniSirGlobal pMac,
#define REASON_ROAM_BEACON_RSSI_WEIGHT_CHANGED 22
#define REASON_ROAM_DFS_SCAN_MODE_CHANGED 23
#define REASON_ROAM_ABORT_ROAM_SCAN 24
-eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reason);
-eHalStatus csrNeighborRoamCandidateFoundIndHdlr(tpAniSirGlobal pMac, void* pMsg);
+eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 sessionId,
+ tANI_U8 command, tANI_U8 reason);
+eHalStatus csrNeighborRoamCandidateFoundIndHdlr(tpAniSirGlobal pMac,
+ void* pMsg);
eHalStatus csrNeighborRoamHandoffReqHdlr(tpAniSirGlobal pMac, void* pMsg);
-eHalStatus csrNeighborRoamProceedWithHandoffReq(tpAniSirGlobal pMac);
-eHalStatus csrNeighborRoamSssidScanDone(tpAniSirGlobal pMac, eHalStatus status);
-eHalStatus csrNeighborRoamStartLfrScan(tpAniSirGlobal pMac);
+eHalStatus csrNeighborRoamProceedWithHandoffReq(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
+eHalStatus csrNeighborRoamSssidScanDone(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ eHalStatus status);
+eHalStatus csrNeighborRoamStartLfrScan(tpAniSirGlobal pMac, tANI_U8 sessionId);
#endif
#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
VOS_STATUS csrSetCCKMIe(tpAniSirGlobal pMac, const tANI_U8 sessionId,
const tANI_U8 *pCckmIe,
const tANI_U8 ccKmIeLen);
-VOS_STATUS csrRoamReadTSF(tpAniSirGlobal pMac, tANI_U8 *pTimestamp);
+VOS_STATUS csrRoamReadTSF(tpAniSirGlobal pMac, tANI_U8 *pTimestamp,
+ const tANI_U8 sessionId);
#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
eHalStatus csrNeighborRoamOffloadSynchRspHandler(tpAniSirGlobal pMac,
diff --git a/CORE/SME/inc/smeInside.h b/CORE/SME/inc/smeInside.h
index be17a5892e80..a55264b65287 100644
--- a/CORE/SME/inc/smeInside.h
+++ b/CORE/SME/inc/smeInside.h
@@ -324,18 +324,23 @@ eHalStatus csrTdlsTeardownReq(tHalHandle hHal, tANI_U8 sessionId,
#endif /* FEATURE_WLAN_TDLS */
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
-eHalStatus csrFlushCfgBgScanRoamChannelList(tpAniSirGlobal pMac);
+eHalStatus csrFlushCfgBgScanRoamChannelList(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
eHalStatus csrCreateBgScanRoamChannelList(tpAniSirGlobal pMac,
- const tANI_U8 *pChannelList,
- const tANI_U8 numChannels);
-eHalStatus csrUpdateBgScanConfigIniChannelList(tpAniSirGlobal pMac, eCsrBand eBand);
+ tANI_U8 sessionId,
+ const tANI_U8 *pChannelList,
+ const tANI_U8 numChannels);
+eHalStatus csrUpdateBgScanConfigIniChannelList(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ eCsrBand eBand);
#endif
#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
eHalStatus csrCreateRoamScanChannelList(tpAniSirGlobal pMac,
- tANI_U8 *pChannelList,
- tANI_U8 numChannels,
- const eCsrBand eBand);
+ tANI_U8 sessionId,
+ tANI_U8 *pChannelList,
+ tANI_U8 numChannels,
+ const eCsrBand eBand);
#endif
ePhyChanBondState csrConvertCBIniValueToPhyCBState(v_U32_t cbIniValue);
@@ -345,12 +350,6 @@ eHalStatus csrPsOffloadIsFullPowerNeeded(tpAniSirGlobal pMac,
tRequestFullPowerReason *pReason,
tANI_BOOLEAN *pfNeedPower);
-#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
-eHalStatus csrCreateRoamScanChannelList(tpAniSirGlobal pMac,
- tANI_U8 *pChannelList,
- tANI_U8 numChannels,
- const eCsrBand eBand);
-#endif
void activeListCmdTimeoutHandle(void *userData);
#endif //#if !defined( __SMEINSIDE_H )
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index e31a1ec5e57a..7774d62be99e 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -2378,10 +2378,11 @@ tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
\fn sme_SetFreqBand
\brief Used to set frequency band.
\param hHal
+ \sessionId Session identifier
\eBand band value to be configured
\- return eHalStatus
-------------------------------------------------------------------------*/
-eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
+eHalStatus sme_SetFreqBand(tHalHandle hHal, tANI_U8 sessionId, eCsrBand eBand);
/* ---------------------------------------------------------------------------
\fn sme_GetFreqBand
@@ -2631,10 +2632,12 @@ eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
This function is called through dynamic setConfig callback function
to update roam scan N probes
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\param nProbes number of probe requests to be sent out
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
+eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, tANI_U8 sessionId,
+ const v_U8_t nProbes);
/* ---------------------------------------------------------------------------
\fn sme_UpdateRoamScanHomeAwayTime
@@ -2642,10 +2645,11 @@ eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
This function is called through dynamic setConfig callback function
to update roam scan home away time
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\param nRoamScanAwayTime Scan home away time
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
+eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal, tANI_U8 sessionId,
const v_U16_t nRoamScanHomeAwayTime,
const eAniBoolean bSendOffloadCmd);
@@ -2682,10 +2686,13 @@ v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
\param hHal - HAL handle for device
\param nImmediateRoamRssiDiff - minimum rssi difference between potential
candidate and current AP.
+ \param sessionId - Session identifier
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
+eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal,
+ v_U8_t nImmediateRoamRssiDiff,
+ tANI_U8 sessionId);
/* ---------------------------------------------------------------------------
\fn sme_UpdateRoamRssiDiff
@@ -2694,12 +2701,14 @@ eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoa
to configure RoamRssiDiff
Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\param RoamRssiDiff - minimum rssi difference between potential
candidate and current AP.
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
+eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, tANI_U8 sessionId,
+ v_U8_t RoamRssiDiff);
/*--------------------------------------------------------------------------
\brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
@@ -2722,9 +2731,11 @@ eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
to configure isWESModeEnabled
\param hHal - HAL handle for device
\param isWESModeEnabled - Enable/Disable WES Mode
+ \param sessionId - Session identifier
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
+eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled,
+ tANI_U8 sessionId);
/* ---------------------------------------------------------------------------
\fn sme_SetRoamScanControl
@@ -2733,10 +2744,12 @@ eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
if roam scan control is set to 0, roaming scan cache is cleared
any value other than 0 is treated as invalid value
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\return eHAL_STATUS_SUCCESS - SME update config successfully.
Other status means SME failure to update
-------------------------------------------------------------------------*/
-eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
+eHalStatus sme_SetRoamScanControl(tHalHandle hHal, tANI_U8 sessionId,
+ v_BOOL_t roamScanControl);
#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
#ifdef FEATURE_WLAN_LFR
@@ -2744,14 +2757,16 @@ eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
\brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
It is used at in the REG_DYNAMIC_VARIABLE macro definition of
isFastRoamIniFeatureEnabled.
- This is a synchronuous call
+ This is a synchronous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session identifier
\return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
Other status means SME is failed to update isFastRoamIniFeatureEnabled.
\sa
--------------------------------------------------------------------------*/
eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
+ tANI_U8 sessionId,
const v_BOOL_t isFastRoamIniFeatureEnabled);
/*--------------------------------------------------------------------------
@@ -2770,8 +2785,35 @@ eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
/*--------------------------------------------------------------------------
- \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
- This is a synchronuous call
+ \brief sme_stopRoaming() - Stop roaming for a given sessionId
+ This is a synchronous call
+ \param hHal - The handle returned by macOpen
+ \param sessionId - sessionId
+ \param reason - reason
+ \return eHAL_STATUS_SUCCESS on success
+ Other status on failure
+ \sa
+ --------------------------------------------------------------------------*/
+eHalStatus sme_stopRoaming(tHalHandle hHal, tANI_U8 sessionId,
+ tANI_U8 reason);
+
+/*--------------------------------------------------------------------------
+ \brief sme_startRoaming() - Start roaming for a given sessionId
+ This is a synchronous call
+ \param hHal - The handle returned by macOpen
+ \param sessionId - sessionId
+ \param reason - reason
+ \return eHAL_STATUS_SUCCESS on success
+ Other status on failure
+ \sa
+ --------------------------------------------------------------------------*/
+eHalStatus sme_startRoaming(tHalHandle hHal, tANI_U8 sessionId,
+ tANI_U8 reason);
+
+/*--------------------------------------------------------------------------
+ \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if
+ Concurrent session exists
+ This is a synchronous call
\param hHal - The handle returned by macOpen.
\return eHAL_STATUS_SUCCESS
Other status means SME is failed
@@ -2821,6 +2863,7 @@ eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
This function is called through dynamic setConfig callback function
to configure nRoamRescanRssiDiff
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\param nRoamRescanRssiDiff - Roam Rescan Rssi Diff
\return eHAL_STATUS_SUCCESS - SME update nRoamRescanRssiDiff config
successfully.
@@ -2828,6 +2871,7 @@ eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
-------------------------------------------------------------------------*/
eHalStatus sme_SetRoamRescanRssiDiff(tHalHandle hHal,
+ tANI_U8 sessionId,
const v_U8_t nRoamRescanRssiDiff);
/*--------------------------------------------------------------------------
@@ -2847,6 +2891,7 @@ v_U8_t sme_GetRoamRescanRssiDiff(tHalHandle hHal);
This function is called through dynamic setConfig callback function
to configure nOpportunisticThresholdDiff
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\param nOpportunisticThresholdDiff - Opportunistic Scan threshold diff
\return eHAL_STATUS_SUCCESS - SME update nOpportunisticThresholdDiff config
successfully.
@@ -2854,6 +2899,7 @@ v_U8_t sme_GetRoamRescanRssiDiff(tHalHandle hHal);
-------------------------------------------------------------------------*/
eHalStatus sme_SetRoamOpportunisticScanThresholdDiff(tHalHandle hHal,
+ tANI_U8 sessionId,
const v_U8_t nOpportunisticThresholdDiff);
/*--------------------------------------------------------------------------
@@ -2870,27 +2916,31 @@ v_U8_t sme_GetRoamOpportunisticScanThresholdDiff(tHalHandle hHal);
\brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
This is a synchronuous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session identifier
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
\sa
--------------------------------------------------------------------------*/
eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
- v_U8_t neighborLookupRssiThreshold);
+ tANI_U8 sessionId,
+ v_U8_t neighborLookupRssiThreshold);
/*--------------------------------------------------------------------------
\brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
- This is a synchronuous call
+ This is a synchronous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session identifier
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
\sa
--------------------------------------------------------------------------*/
eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
+ tANI_U8 sessionId,
v_U8_t neighborReassocRssiThreshold);
/*--------------------------------------------------------------------------
\brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
- This is a synchronuous call
+ This is a synchronous call
\param hHal - The handle returned by macOpen.
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
@@ -2902,11 +2952,13 @@ v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
\brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
This is a synchronuous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session identifier
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
\sa
--------------------------------------------------------------------------*/
eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
+ tANI_U8 sessionId,
v_U16_t neighborScanResultsRefreshPeriod);
/*--------------------------------------------------------------------------
@@ -2936,10 +2988,12 @@ v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
to configure nEmptyScanRefreshPeriod
Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\param nEmptyScanRefreshPeriod - scan period following empty scan results.
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
+eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal,tANI_U8 sessionId,
+ v_U16_t nEmptyScanRefreshPeriod);
/* ---------------------------------------------------------------------------
\fn sme_setNeighborScanMinChanTime
@@ -2949,9 +3003,12 @@ eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanR
Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
\param hHal - HAL handle for device
\param nNeighborScanMinChanTime - Channel minimum dwell time
+ \param sessionId - Session identifier
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
+eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal,
+ const v_U16_t nNeighborScanMinChanTime,
+ tANI_U8 sessionId);
/* ---------------------------------------------------------------------------
\fn sme_setNeighborScanMaxChanTime
@@ -2960,26 +3017,100 @@ eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighb
to configure gNeighborScanChannelMaxTime
Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\param nNeighborScanMinChanTime - Channel maximum dwell time
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
+eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, tANI_U8 sessionId,
+ const v_U16_t nNeighborScanMaxChanTime);
/* ---------------------------------------------------------------------------
\fn sme_getNeighborScanMinChanTime
\brief get neighbor scan min channel time
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session identifier
\return v_U16_t - channel min time value
-------------------------------------------------------------------------*/
-v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
+v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal, tANI_U8 sessionId);
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getNeighborRoamState
+ \brief get neighbor roam state
+ \param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \return v_U32_t - neighbor roam state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getNeighborRoamState(tHalHandle hHal, tANI_U8 sessionId);
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getCurrentRoamState
+ \brief get current roam state
+ \param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \return v_U32_t - current roam state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getCurrentRoamState(tHalHandle hHal, tANI_U8 sessionId);
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getCurrentRoamSubState
+ \brief get neighbor roam sub state
+ \param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \return v_U32_t - current roam sub state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getCurrentRoamSubState(tHalHandle hHal, tANI_U8 sessionId);
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getLimSmeState
+ \brief get Lim Sme state
+ \param hHal - The handle returned by macOpen.
+ \return v_U32_t - Lim Sme state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getLimSmeState(tHalHandle hHal);
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getLimMlmState
+ \brief get Lim Mlm state
+ \param hHal - The handle returned by macOpen.
+ \return v_U32_t - Lim Mlm state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getLimMlmState(tHalHandle hHal);
+
+/* ---------------------------------------------------------------------------
+ \fn sme_IsLimSessionValid
+ \brief is Lim session valid
+ \param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \return v_BOOL_t - true or false
+ -------------------------------------------------------------------------*/
+v_BOOL_t sme_IsLimSessionValid(tHalHandle hHal, tANI_U8 sessionId);
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getLimSmeSessionState
+ \brief get Lim Sme session state
+ \param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \return v_U32_t - Lim Sme session state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getLimSmeSessionState(tHalHandle hHal, tANI_U8 sessionId);
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getLimMlmSessionState
+ \brief get Lim Mlm session state
+ \param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \return v_U32_t - Lim Mlm session state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getLimMlmSessionState(tHalHandle hHal, tANI_U8 sessionId);
/* ---------------------------------------------------------------------------
\fn sme_getNeighborScanMaxChanTime
\brief get neighbor scan max channel time
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session identifier
\return v_U16_t - channel max time value
-------------------------------------------------------------------------*/
-v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
+v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal, tANI_U8 sessionId);
/* ---------------------------------------------------------------------------
\fn sme_setNeighborScanPeriod
@@ -2988,18 +3119,21 @@ v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
to configure nNeighborScanPeriod
Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\param nNeighborScanPeriod - neighbor scan period
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
+eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, tANI_U8 sessionId,
+ const v_U16_t nNeighborScanPeriod);
/* ---------------------------------------------------------------------------
\fn sme_getNeighborScanPeriod
\brief get neighbor scan period
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session identifier
\return v_U16_t - neighbor scan period
-------------------------------------------------------------------------*/
-v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
+v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal, tANI_U8 sessionId);
/* ---------------------------------------------------------------------------
\fn sme_SetRoamBmissFirstBcnt
@@ -3007,6 +3141,7 @@ v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
This function is called through dynamic setConfig callback function
to configure nRoamBmissFirstBcnt
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\param nRoamBmissFirstBcnt - Roam first bmiss count
\return eHAL_STATUS_SUCCESS - SME update nRoamBmissFirstBcnt
successfully.
@@ -3014,6 +3149,7 @@ v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
-------------------------------------------------------------------------*/
eHalStatus sme_SetRoamBmissFirstBcnt(tHalHandle hHal,
+ tANI_U8 sessionId,
const v_U8_t nRoamBmissFirstBcnt);
/*--------------------------------------------------------------------------
@@ -3032,13 +3168,14 @@ v_U8_t sme_GetRoamBmissFirstBcnt(tHalHandle hHal);
This function is called through dynamic setConfig callback function
to configure nRoamBmissFinalBcnt
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\param nRoamBmissFinalBcnt - Roam final bmiss count
\return eHAL_STATUS_SUCCESS - SME update nRoamBmissFinalBcnt
successfully.
else SME is failed to update nRoamBmissFinalBcnt
-------------------------------------------------------------------------*/
-eHalStatus sme_SetRoamBmissFinalBcnt(tHalHandle hHal,
+eHalStatus sme_SetRoamBmissFinalBcnt(tHalHandle hHal, tANI_U8 sessionId,
const v_U8_t nRoamBmissFinalBcnt);
/*--------------------------------------------------------------------------
@@ -3057,13 +3194,14 @@ v_U8_t sme_GetRoamBmissFinalBcnt(tHalHandle hHal);
This function is called through dynamic setConfig callback function
to configure nRoamBeaconRssiWeight
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\param nRoamBeaconRssiWeight - Roam beacon rssi weight
\return eHAL_STATUS_SUCCESS - SME update nRoamBeaconRssiWeight config
successfully.
else SME is failed to update nRoamBeaconRssiWeight
-------------------------------------------------------------------------*/
-eHalStatus sme_SetRoamBeaconRssiWeight(tHalHandle hHal,
+eHalStatus sme_SetRoamBeaconRssiWeight(tHalHandle hHal, tANI_U8 sessionId,
const v_U8_t nRoamBeaconRssiWeight);
/*--------------------------------------------------------------------------
@@ -3080,7 +3218,7 @@ v_U8_t sme_GetRoamBeaconRssiWeight(tHalHandle hHal);
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
/*--------------------------------------------------------------------------
\brief sme_getRoamRssiDiff() - get Roam rssi diff
- This is a synchronuous call
+ This is a synchronous call
\param hHal - The handle returned by macOpen.
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
@@ -3090,43 +3228,49 @@ v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
/*--------------------------------------------------------------------------
\brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
- This is a synchronuous call
+ This is a synchronous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session identifier
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
\sa
--------------------------------------------------------------------------*/
-eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
+eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 sessionId,
+ tANI_U8 *pChannelList,
tANI_U8 numChannels);
#ifdef FEATURE_WLAN_ESE_UPLOAD
/*--------------------------------------------------------------------------
\brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
- This is a synchronuous call
+ This is a synchronous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session identifier
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
\sa
--------------------------------------------------------------------------*/
-eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
+eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal, tANI_U8 sessionId,
tANI_U8 *pChannelList,
tANI_U8 numChannels);
#endif
/*--------------------------------------------------------------------------
\brief sme_getRoamScanChannelList() - get roam scan channel list
- This is a synchronuous call
+ This is a synchronous call
\param hHal - The handle returned by macOpen.
+ \param pChannelList - Output channel list
+ \param pNumChannels - Output number of channels
+ \param sessionId - Session identifier
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
\sa
--------------------------------------------------------------------------*/
eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
- tANI_U8 *pNumChannels);
+ tANI_U8 *pNumChannels, tANI_U8 sessionId);
/*--------------------------------------------------------------------------
\brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
- This is a synchronuous call
+ This is a synchronous call
\param hHal - The handle returned by macOpen.
\return TRUE (1) - if the ESE feature is enabled
FALSE (0) - if feature is disabled (compile or runtime)
@@ -3346,6 +3490,7 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 ch
from CSR.
This is a synchronous call
\param hHal - The handle returned by macOpen
+ \param sessionId - Session identifier
\param pHandoffInfo - info provided by HDD with the handoff request (namely:
BSSID, channel etc.)
\return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
@@ -3353,7 +3498,8 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 ch
\sa
--------------------------------------------------------------------------*/
-eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
+eHalStatus sme_HandoffRequest(tHalHandle hHal, tANI_U8 sessionId,
+ tCsrHandoffRequest *pHandoffInfo);
#endif
/*--------------------------------------------------------------------------
\brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
@@ -3427,7 +3573,8 @@ eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateP
*/
eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
tANI_U8 *bssid,
- tSmeFastRoamTrigger fastRoamTrig);
+ tSmeFastRoamTrigger fastRoamTrig,
+ tANI_U8 sessionId);
eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pBSSId );
@@ -3686,6 +3833,7 @@ eHalStatus sme_StatsExtEvent (tHalHandle hHal, void* pMsg);
This function is called through dynamic setConfig callback function
to configure allowDFSChannelRoam.
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\param allowDFSChannelRoam - DFS roaming scan mode 0 (disable),
1 (passive), 2 (active)
\return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
@@ -3693,7 +3841,9 @@ eHalStatus sme_StatsExtEvent (tHalHandle hHal, void* pMsg);
Other status means SME failed to update DFS roaming scan config.
\sa
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, v_U8_t allowDFSChannelRoam);
+eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal,
+ tANI_U8 sessionId,
+ v_U8_t allowDFSChannelRoam);
/*--------------------------------------------------------------------------
\brief sme_GetDFSScanMode() - get DFS roam scan mode
@@ -3708,9 +3858,10 @@ v_BOOL_t sme_GetDFSScanMode(tHalHandle hHal);
\fn sme_staInMiddleOfRoaming
\brief This function returns TRUE if STA is in the middle of roaming state
\param hHal - HAL handle for device
+ \param sessionId - Session identifier
\- return TRUE or FALSE
-------------------------------------------------------------------------*/
-tANI_BOOLEAN sme_staInMiddleOfRoaming(tHalHandle hHal);
+tANI_BOOLEAN sme_staInMiddleOfRoaming(tHalHandle hHal, tANI_U8 sessionId);
#ifdef FEATURE_WLAN_EXTSCAN
/* ---------------------------------------------------------------------------
@@ -3821,9 +3972,10 @@ eHalStatus sme_ExtScanRegisterCallback (tHalHandle hHal,
\fn sme_abortRoamScan
\brief API to abort current roam scan cycle by roam scan offload module.
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session identifier
\return eHalStatus
---------------------------------------------------------------------------*/
-eHalStatus sme_abortRoamScan(tHalHandle hHal);
+eHalStatus sme_abortRoamScan(tHalHandle hHal, tANI_U8 sessionId);
#endif //#if WLAN_FEATURE_ROAM_SCAN_OFFLOAD
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
diff --git a/CORE/SME/inc/sme_FTApi.h b/CORE/SME/inc/sme_FTApi.h
index 7d59573e5e42..24296caa251b 100644
--- a/CORE/SME/inc/sme_FTApi.h
+++ b/CORE/SME/inc/sme_FTApi.h
@@ -49,6 +49,12 @@ typedef enum eFTIEState
// supplicant. Waiting for the keys.
} tFTIEStates;
+/* FT neighbor roam callback user context */
+typedef struct sFTRoamCallbackUsrCtx
+{
+ tpAniSirGlobal pMac;
+ tANI_U8 sessionId;
+} tFTRoamCallbackUsrCtx, *tpFTRoamCallbackUsrCtx;
typedef struct sFTSMEContext
{
@@ -74,6 +80,9 @@ typedef struct sFTSMEContext
vos_timer_t preAuthReassocIntvlTimer;
v_BOOL_t addMDIE;
+
+ /* User context for the timer callback */
+ tpFTRoamCallbackUsrCtx pUsrCtx;
} tftSMEContext, *tpftSMEContext;
/*--------------------------------------------------------------------------
diff --git a/CORE/SME/src/QoS/sme_Qos.c b/CORE/SME/src/QoS/sme_Qos.c
index f47045eccbf3..8d7f2266f537 100644
--- a/CORE/SME/src/QoS/sme_Qos.c
+++ b/CORE/SME/src/QoS/sme_Qos.c
@@ -4597,20 +4597,20 @@ eHalStatus sme_QosProcessReassocSuccessEv(tpAniSirGlobal pMac, v_U8_t sessionId,
#ifdef WLAN_FEATURE_VOWIFI_11R
if (pSession->ftHandoffInProgress)
{
- if (csrRoamIs11rAssoc(pMac))
- {
- if (pCsrRoamSession && pCsrRoamSession->connectedInfo.nRICRspLength)
- {
- status = sme_QosProcessFTReassocRspEv(pMac, sessionId, pEvent_info);
+ if (csrRoamIs11rAssoc(pMac, sessionId)) {
+ if (pCsrRoamSession &&
+ pCsrRoamSession->connectedInfo.nRICRspLength) {
+ status = sme_QosProcessFTReassocRspEv(pMac, sessionId,
+ pEvent_info);
}
}
#ifdef FEATURE_WLAN_ESE
// If ESE association check for TSPEC IEs in the reassoc rsp frame
- if (csrRoamIsESEAssoc(pMac))
- {
- if (pCsrRoamSession && pCsrRoamSession->connectedInfo.nTspecIeLength)
- {
- status = sme_QosESEProcessReassocTspecRsp(pMac, sessionId, pEvent_info);
+ if (csrRoamIsESEAssoc(pMac, sessionId)) {
+ if (pCsrRoamSession &&
+ pCsrRoamSession->connectedInfo.nTspecIeLength) {
+ status = sme_QosESEProcessReassocTspecRsp(pMac, sessionId,
+ pEvent_info);
}
}
#endif
@@ -5183,8 +5183,7 @@ eHalStatus sme_QosProcessPreauthSuccessInd(tpAniSirGlobal pMac,
pSession->ftHandoffInProgress = VOS_TRUE;
// Check if its a 11R roaming before preparing the RIC IEs
- if (csrRoamIs11rAssoc(pMac))
- {
+ if (csrRoamIs11rAssoc(pMac, sessionId)) {
v_U16_t ricOffset = 0;
v_U32_t ricIELength = 0;
v_U8_t *ricIE;
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 10871a067293..a197989d1692 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -572,7 +572,8 @@ eHalStatus csrStart(tpAniSirGlobal pMac)
pMac->roam.sPendingCommands = 0;
csrScanEnable(pMac);
#if defined WLAN_FEATURE_NEIGHBOR_ROAMING
- status = csrNeighborRoamInit(pMac);
+ for (i = 0; i < CSR_ROAM_SESSION_MAX; i++)
+ status = csrNeighborRoamInit(pMac, i);
#endif /* WLAN_FEATURE_NEIGHBOR_ROAMING */
pMac->roam.tlStatsReqInfo.numClient = 0;
pMac->roam.tlStatsReqInfo.periodicity = 0;
@@ -602,7 +603,6 @@ eHalStatus csrStart(tpAniSirGlobal pMac)
eHalStatus csrStop(tpAniSirGlobal pMac, tHalStopType stopType)
{
tANI_U32 sessionId;
- tANI_U32 i;
for(sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++)
{
@@ -614,9 +614,13 @@ eHalStatus csrStop(tpAniSirGlobal pMac, tHalStopType stopType)
csrLLPurge( &pMac->roam.roamCmdPendingList, eANI_BOOLEAN_TRUE );
#if defined WLAN_FEATURE_NEIGHBOR_ROAMING
- csrNeighborRoamClose(pMac);
+ for (sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++)
+ csrNeighborRoamClose(pMac, sessionId);
#endif
- csrScanFlushResult(pMac); //Do we want to do this?
+ for (sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++)
+ if (CSR_IS_SESSION_VALID(pMac, sessionId))
+ csrScanFlushResult(pMac, sessionId);
+
// deregister from PMC since we register during csrStart()
// (ignore status since there is nothing we can do if it fails)
if(!pMac->psOffloadEnabled)
@@ -635,10 +639,9 @@ eHalStatus csrStop(tpAniSirGlobal pMac, tHalStopType stopType)
//Reset the domain back to the deault
pMac->scan.domainIdCurrent = pMac->scan.domainIdDefault;
- for( i = 0; i < CSR_ROAM_SESSION_MAX; i++ )
- {
- csrRoamStateChange( pMac, eCSR_ROAMING_STATE_STOP, i );
- pMac->roam.curSubState[i] = eCSR_ROAM_SUBSTATE_NONE;
+ for (sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++) {
+ csrRoamStateChange(pMac, eCSR_ROAMING_STATE_STOP, sessionId);
+ pMac->roam.curSubState[sessionId] = eCSR_ROAM_SUBSTATE_NONE;
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -1153,11 +1156,12 @@ eCsrBand csrGetCurrentBand(tHalHandle hHal)
/*
This function flushes the roam scan cache
*/
-eHalStatus csrFlushRoamScanRoamChannelList(tpAniSirGlobal pMac)
+eHalStatus csrFlushRoamScanRoamChannelList(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tpCsrNeighborRoamControlInfo pNeighborRoamInfo
- = &pMac->roam.neighborRoamInfo;
+ = &pMac->roam.neighborRoamInfo[sessionId];
/* Free up the memory first (if required) */
if (NULL !=
pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList)
@@ -1178,10 +1182,12 @@ eHalStatus csrFlushRoamScanRoamChannelList(tpAniSirGlobal pMac)
/*
This function flushes the roam scan cache
*/
-eHalStatus csrFlushCfgBgScanRoamChannelList(tpAniSirGlobal pMac)
+eHalStatus csrFlushCfgBgScanRoamChannelList(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
/* Free up the memory first (if required) */
if (NULL != pNeighborRoamInfo->cfgParams.channelInfo.ChannelList)
@@ -1200,11 +1206,13 @@ eHalStatus csrFlushCfgBgScanRoamChannelList(tpAniSirGlobal pMac)
based on the input channel list
*/
eHalStatus csrCreateBgScanRoamChannelList(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
const tANI_U8 *pChannelList,
const tANI_U8 numChannels)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels = numChannels;
@@ -1232,10 +1240,12 @@ eHalStatus csrCreateBgScanRoamChannelList(tpAniSirGlobal pMac,
if the band is 5G, then make sure channel list contains only 5G valid channels
*/
eHalStatus csrUpdateBgScanConfigIniChannelList(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
eCsrBand eBand)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tANI_U8 outNumChannels = 0;
tANI_U8 inNumChannels = 0;
tANI_U8 *inPtr = NULL;
@@ -1263,8 +1273,9 @@ eHalStatus csrUpdateBgScanConfigIniChannelList(tpAniSirGlobal pMac,
ChannelList[outNumChannels++] = inPtr[i];
}
}
- csrFlushCfgBgScanRoamChannelList(pMac);
- csrCreateBgScanRoamChannelList(pMac, ChannelList, outNumChannels);
+ csrFlushCfgBgScanRoamChannelList(pMac, sessionId);
+ csrCreateBgScanRoamChannelList(pMac, sessionId, ChannelList,
+ outNumChannels);
}
else if (eCSR_BAND_5G == eBand)
{
@@ -1278,8 +1289,9 @@ eHalStatus csrUpdateBgScanConfigIniChannelList(tpAniSirGlobal pMac,
ChannelList[outNumChannels++] = inPtr[i];
}
}
- csrFlushCfgBgScanRoamChannelList(pMac);
- csrCreateBgScanRoamChannelList(pMac, ChannelList, outNumChannels);
+ csrFlushCfgBgScanRoamChannelList(pMac, sessionId);
+ csrCreateBgScanRoamChannelList(pMac, sessionId, ChannelList,
+ outNumChannels);
}
else if (eCSR_BAND_ALL == eBand)
{
@@ -1291,8 +1303,9 @@ eHalStatus csrUpdateBgScanConfigIniChannelList(tpAniSirGlobal pMac,
ChannelList[outNumChannels++] = inPtr[i];
}
}
- csrFlushCfgBgScanRoamChannelList(pMac);
- csrCreateBgScanRoamChannelList(pMac, ChannelList, outNumChannels);
+ csrFlushCfgBgScanRoamChannelList(pMac, sessionId);
+ csrCreateBgScanRoamChannelList(pMac, sessionId, ChannelList,
+ outNumChannels);
}
else
{
@@ -1316,13 +1329,14 @@ eHalStatus csrUpdateBgScanConfigIniChannelList(tpAniSirGlobal pMac,
* only 5G valid channels
*/
eHalStatus csrCreateRoamScanChannelList(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
tANI_U8 *pChannelList,
tANI_U8 numChannels,
const eCsrBand eBand)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tpCsrNeighborRoamControlInfo pNeighborRoamInfo
- = &pMac->roam.neighborRoamInfo;
+ = &pMac->roam.neighborRoamInfo[sessionId];
tANI_U8 outNumChannels = 0;
tANI_U8 inNumChannels = numChannels;
tANI_U8 *inPtr = pChannelList;
@@ -1338,11 +1352,11 @@ eHalStatus csrCreateRoamScanChannelList(tpAniSirGlobal pMac,
* the DUT to get a candidate AP while roaming even if the Neighbor
* Report is not able to provide sufficient information.
*/
- if (pMac->scan.occupiedChannels.numChannels)
+ if (pMac->scan.occupiedChannels[sessionId].numChannels)
{
csrNeighborRoamMergeChannelLists(pMac,
- &pMac->scan.occupiedChannels.channelList[0],
- pMac->scan.occupiedChannels.numChannels,
+ &pMac->scan.occupiedChannels[sessionId].channelList[0],
+ pMac->scan.occupiedChannels[sessionId].numChannels,
inPtr,
inNumChannels,
&mergedOutputNumOfChannels);
@@ -1400,6 +1414,7 @@ eHalStatus csrCreateRoamScanChannelList(tpAniSirGlobal pMac,
{
csrNeighborRoamChannelsFilterByCurrentBand(
pMac,
+ sessionId,
ChannelList,
outNumChannels,
tmpChannelList,
@@ -1433,7 +1448,7 @@ eHalStatus csrCreateRoamScanChannelList(tpAniSirGlobal pMac,
}
#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
-eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand)
+eHalStatus csrSetBand(tHalHandle hHal, tANI_U8 sessionId, eCsrBand eBand)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -1464,8 +1479,10 @@ eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand)
pMac->roam.configParam.bandCapability = eBand;
csrScanGetSupportedChannels( pMac );
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
+#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (!csrRoamIsRoamOffloadScanEnabled(pMac))
- csrUpdateBgScanConfigIniChannelList( pMac, eBand );
+#endif
+ csrUpdateBgScanConfigIniChannelList(pMac, sessionId, eBand);
#endif
status = csrInitGetChannels( pMac );
if (eHAL_STATUS_SUCCESS == status)
@@ -2684,14 +2701,15 @@ eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
return (status);
}
// Returns whether handoff is currently in progress or not
-tANI_BOOLEAN csrRoamIsHandoffInProgress(tpAniSirGlobal pMac)
+tANI_BOOLEAN csrRoamIsHandoffInProgress(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
- return csrNeighborRoamIsHandoffInProgress(pMac);
+ return csrNeighborRoamIsHandoffInProgress(pMac, sessionId);
#else
return eANI_BOOLEAN_FALSE;
#endif
}
+
eHalStatus csrRoamIssueDisassociate( tpAniSirGlobal pMac, tANI_U32 sessionId,
eCsrRoamSubState NewSubstate, tANI_BOOLEAN fMICFailure )
{
@@ -2727,10 +2745,11 @@ eHalStatus csrRoamIssueDisassociate( tpAniSirGlobal pMac, tANI_U32 sessionId,
reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON;
}
#ifdef WLAN_FEATURE_VOWIFI_11R
- if ( (csrRoamIsHandoffInProgress(pMac)) &&
+ if ( (csrRoamIsHandoffInProgress(pMac, sessionId)) &&
(NewSubstate != eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF))
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
vos_mem_copy(&bssId,
pNeighborRoamInfo->csrNeighborRoamProfile.BSSIDs.bssid,
sizeof(tSirMacAddr));
@@ -4129,7 +4148,7 @@ eHalStatus csrRoamStopNetwork( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
)
{
tANI_BOOLEAN is11rRoamingFlag = eANI_BOOLEAN_FALSE;
- is11rRoamingFlag = csrRoamIs11rAssoc(pMac);
+ is11rRoamingFlag = csrRoamIs11rAssoc(pMac, sessionId);
// Set parameters for this Bss.
status = csrRoamSetBssConfigCfg(pMac, sessionId, pProfile,
pBssDesc, pBssConfig,
@@ -5306,10 +5325,10 @@ static void csrCheckAndUpdateACWeight( tpAniSirGlobal pMac, tDot11fBeaconIEs *pI
}
#ifdef WLAN_FEATURE_VOWIFI_11R
//Returns whether the current association is a 11r assoc or not
-tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac)
+tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
- return csrNeighborRoamIs11rAssoc(pMac);
+ return csrNeighborRoamIs11rAssoc(pMac, sessionId);
#else
return eANI_BOOLEAN_FALSE;
#endif
@@ -5317,10 +5336,10 @@ tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac)
#endif
#ifdef FEATURE_WLAN_ESE
//Returns whether the current association is a ESE assoc or not
-tANI_BOOLEAN csrRoamIsESEAssoc(tpAniSirGlobal pMac)
+tANI_BOOLEAN csrRoamIsESEAssoc(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
- return csrNeighborRoamIsESEAssoc(pMac);
+ return csrNeighborRoamIsESEAssoc(pMac, sessionId);
#else
return eANI_BOOLEAN_FALSE;
#endif
@@ -5365,13 +5384,14 @@ tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId)
is a ESE assoc or not
\param pMac - The handle returned by macOpen.
+ \param sessionId - Session Id
\return eANI_BOOLEAN_TRUE if current assoc is ESE, eANI_BOOLEAN_FALSE
otherwise
---------------------------------------------------------------------------*/
-tANI_BOOLEAN csrNeighborRoamIsESEAssoc(tpAniSirGlobal pMac)
+tANI_BOOLEAN csrNeighborRoamIsESEAssoc(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
- return pMac->roam.neighborRoamInfo.isESEAssoc;
+ return pMac->roam.neighborRoamInfo[sessionId].isESEAssoc;
}
#endif /* FEATURE_WLAN_ESE */
@@ -5870,7 +5890,10 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
}
if (!CSR_IS_INFRA_AP(pProfile))
{
- pScanResult = csrScanAppendBssDescription( pMac, pSirBssDesc, pIes, FALSE );
+ pScanResult = csrScanAppendBssDescription(pMac,
+ pSirBssDesc,
+ pIes, FALSE,
+ sessionId);
}
csrRoamSaveConnectedBssDesc(pMac, sessionId, pSirBssDesc);
csrRoamFreeConnectProfile(pMac, &pSession->connectedProfile);
@@ -6177,7 +6200,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
/* Defeaturize this later if needed */
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
/* If Join fails while Handoff is in progress, indicate disassociated event to supplicant to reconnect */
- if (csrRoamIsHandoffInProgress(pMac))
+ if (csrRoamIsHandoffInProgress(pMac, sessionId))
{
/* Should indicate neighbor roam algorithm about the connect failure here */
csrNeighborRoamIndicateConnect(pMac, (tANI_U8)sessionId, VOS_STATUS_E_FAILURE);
@@ -7664,7 +7687,7 @@ static void csrRoamJoinRspProcessor( tpAniSirGlobal pMac, tSirSmeJoinRsp *pSmeJo
smsLog( pMac, LOGW, "SmeJoinReq failed with statusCode= 0x%08X [%d]", pSmeJoinRsp->statusCode, pSmeJoinRsp->statusCode );
#if defined WLAN_FEATURE_NEIGHBOR_ROAMING
/* If Join fails while Handoff is in progress, indicate disassociated event to supplicant to reconnect */
- if (csrRoamIsHandoffInProgress(pMac))
+ if (csrRoamIsHandoffInProgress(pMac, pSmeJoinRsp->sessionId))
{
csrRoamCallCallback(pMac, pSmeJoinRsp->sessionId, NULL, roamId, eCSR_ROAM_DISASSOCIATED, eCSR_ROAM_RESULT_FORCED);
/* Should indicate neighbor roam algorithm about the connect failure here */
@@ -8083,8 +8106,8 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res
/* Reassoc request will be used only for ESE and 11r handoff whereas other legacy roaming should
* use join request */
#ifdef WLAN_FEATURE_VOWIFI_11R
- if (csrRoamIsHandoffInProgress(pMac) &&
- csrRoamIs11rAssoc(pMac))
+ if (csrRoamIsHandoffInProgress(pMac, sessionId) &&
+ csrRoamIs11rAssoc(pMac, sessionId))
{
status = csrRoamIssueReassociate(pMac, sessionId, pBssDesc,
(tDot11fBeaconIEs *)( pScanResult->Result.pvIes ), &pCommand->u.roamCmd.roamProfile);
@@ -8092,8 +8115,8 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res
else
#endif
#ifdef FEATURE_WLAN_ESE
- if (csrRoamIsHandoffInProgress(pMac) &&
- csrRoamIsESEAssoc(pMac))
+ if (csrRoamIsHandoffInProgress(pMac, sessionId) &&
+ csrRoamIsESEAssoc(pMac, sessionId))
{
// Now serialize the reassoc command.
status = csrRoamIssueReassociateCmd(pMac, sessionId);
@@ -8101,8 +8124,8 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res
else
#endif
#ifdef FEATURE_WLAN_LFR
- if (csrRoamIsHandoffInProgress(pMac) &&
- csrRoamIsFastRoamEnabled(pMac, sessionId))
+ if (csrRoamIsHandoffInProgress(pMac, sessionId) &&
+ csrRoamIsFastRoamEnabled(pMac, sessionId))
{
// Now serialize the reassoc command.
status = csrRoamIssueReassociateCmd(pMac, sessionId);
@@ -8182,7 +8205,8 @@ static void csrRoamRoamingStateAuthRspProcessor( tpAniSirGlobal pMac, tSirSmeAut
static void csrRoamRoamingStateReassocRspProcessor( tpAniSirGlobal pMac, tpSirSmeJoinRsp pSmeJoinRsp )
{
eCsrRoamCompleteResult result;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[pSmeJoinRsp->sessionId];
tCsrRoamInfo roamInfo;
tANI_U32 roamId = 0;
@@ -8195,7 +8219,7 @@ static void csrRoamRoamingStateReassocRspProcessor( tpAniSirGlobal pMac, tpSirSm
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
/* Since the neighbor roam algorithm uses reassoc req for handoff instead of join,
* we need the response contents while processing the result in csrRoamProcessResults() */
- if (csrRoamIsHandoffInProgress(pMac))
+ if (csrRoamIsHandoffInProgress(pMac, pSmeJoinRsp->sessionId))
{
/* Need to dig more on indicating events to SME QoS module */
sme_QosCsrEventInd(pMac, pSmeJoinRsp->sessionId, SME_QOS_CSR_HANDOFF_COMPLETE, NULL);
@@ -8294,6 +8318,7 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
#endif
tANI_U32 sessionId;
tCsrRoamSession *pSession;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo = NULL;
tSirSmeDisassocRsp SmeDisassocRsp;
@@ -8333,6 +8358,7 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
"CSR SmeDisassocReq due to HO on session %d", sessionId );
+ pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[sessionId];
#if defined (WLAN_FEATURE_NEIGHBOR_ROAMING)
/*
* First ensure if the roam profile is in the scan cache.
@@ -8347,7 +8373,8 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
{
vos_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
status = csrRoamPrepareFilterFromProfile(pMac,
- &pMac->roam.neighborRoamInfo.csrNeighborRoamProfile, pScanFilter);
+ &pNeighborRoamInfo->csrNeighborRoamProfile,
+ pScanFilter);
if(!HAL_STATUS_SUCCESS(status))
{
smsLog(pMac, LOGE, "%s: failed to prepare scan filter with status %d",
@@ -8419,7 +8446,7 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
roamInfo.reasonCode = eCsrRoamReasonBetterAP;
vos_mem_copy(roamInfo.bssid,
- pMac->roam.neighborRoamInfo.csrNeighborRoamProfile.BSSIDs.bssid,
+ pNeighborRoamInfo->csrNeighborRoamProfile.BSSIDs.bssid,
sizeof(tSirMacAddr));
csrRoamCallCallback(pMac,sessionId, &roamInfo, 0,
@@ -9774,27 +9801,24 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
// from current ap and then go to disconnected state
// This happens for ESE and 11r FT connections ONLY.
#ifdef WLAN_FEATURE_VOWIFI_11R
- if (csrRoamIs11rAssoc(pMac) &&
- (csrNeighborRoamStatePreauthDone(pMac)))
- {
+ if (csrRoamIs11rAssoc(pMac, sessionId) &&
+ (csrNeighborRoamStatePreauthDone(pMac, sessionId))) {
csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac,
- sessionId);
+ sessionId);
}
#endif
#ifdef FEATURE_WLAN_ESE
- if (csrRoamIsESEAssoc(pMac) &&
- (csrNeighborRoamStatePreauthDone(pMac)))
- {
+ if (csrRoamIsESEAssoc(pMac, sessionId) &&
+ (csrNeighborRoamStatePreauthDone(pMac, sessionId))) {
csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac,
- sessionId);
+ sessionId);
}
#endif
#ifdef FEATURE_WLAN_LFR
if (csrRoamIsFastRoamEnabled(pMac, sessionId) &&
- (csrNeighborRoamStatePreauthDone(pMac)))
- {
+ (csrNeighborRoamStatePreauthDone(pMac, sessionId))) {
csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac,
- sessionId);
+ sessionId);
}
#endif
pSession = CSR_GET_SESSION( pMac, sessionId );
@@ -9862,27 +9886,24 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
// from current ap and then go to disconnected state
// This happens for ESE and 11r FT connections ONLY.
#ifdef WLAN_FEATURE_VOWIFI_11R
- if (csrRoamIs11rAssoc(pMac) &&
- (csrNeighborRoamStatePreauthDone(pMac)))
- {
+ if (csrRoamIs11rAssoc(pMac, sessionId) &&
+ (csrNeighborRoamStatePreauthDone(pMac, sessionId))) {
csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac,
- sessionId);
+ sessionId);
}
#endif
#ifdef FEATURE_WLAN_ESE
- if (csrRoamIsESEAssoc(pMac) &&
- (csrNeighborRoamStatePreauthDone(pMac)))
- {
+ if (csrRoamIsESEAssoc(pMac, sessionId) &&
+ (csrNeighborRoamStatePreauthDone(pMac, sessionId))) {
csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac,
- sessionId);
+ sessionId);
}
#endif
#ifdef FEATURE_WLAN_LFR
if (csrRoamIsFastRoamEnabled(pMac, sessionId) &&
- (csrNeighborRoamStatePreauthDone(pMac)))
- {
+ (csrNeighborRoamStatePreauthDone(pMac, sessionId))) {
csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac,
- sessionId);
+ sessionId);
}
#endif
pSession = CSR_GET_SESSION( pMac, sessionId );
@@ -10616,8 +10637,8 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
break;
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
case eWNI_SME_CANDIDATE_FOUND_IND:
- smsLog( pMac, LOG2, FL("Candidate found indication from PE"));
- csrNeighborRoamCandidateFoundIndHdlr( pMac, pSirMsg );
+ smsLog(pMac, LOG2, FL("Candidate found indication from PE"));
+ csrNeighborRoamCandidateFoundIndHdlr(pMac, pSirMsg);
break;
case eWNI_SME_HANDOFF_REQ:
smsLog( pMac, LOG2, FL("Handoff Req from self"));
@@ -10817,14 +10838,14 @@ void csrRoamWaitForKeyTimeOutHandler(void *pv)
smsLog(pMac, LOGW, FL("WaitForKey timer expired in state=%s sub-state=%s"),
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState),
+ pMac->roam.neighborRoamInfo[pInfo->sessionId].neighborRoamState),
macTraceGetcsrRoamSubState(
pMac->roam.curSubState[pInfo->sessionId]));
if( CSR_IS_WAIT_FOR_KEY( pMac, pInfo->sessionId ) )
{
#ifdef FEATURE_WLAN_LFR
- if (csrNeighborRoamIsHandoffInProgress(pMac))
+ if (csrNeighborRoamIsHandoffInProgress(pMac, pInfo->sessionId))
{
/*
* Enable heartbeat timer when hand-off is in progress
@@ -10878,13 +10899,16 @@ void csrRoamWaitForKeyTimeOutHandler(void *pv)
eHalStatus csrRoamStartWaitForKeyTimer(tpAniSirGlobal pMac, tANI_U32 interval)
{
eHalStatus status;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[pMac->roam.WaitForKeyTimerInfo.sessionId];
#ifdef FEATURE_WLAN_LFR
- if (csrNeighborRoamIsHandoffInProgress(pMac))
+ if (csrNeighborRoamIsHandoffInProgress(pMac,
+ pMac->roam.WaitForKeyTimerInfo.sessionId))
{
/* Disable heartbeat timer when hand-off is in progress */
smsLog(pMac, LOG2, FL("disabling HB timer in state=%s sub-state=%s"),
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState),
+ pNeighborRoamInfo->neighborRoamState),
macTraceGetcsrRoamSubState(
pMac->roam.curSubState[pMac->roam.WaitForKeyTimerInfo.sessionId]
));
@@ -10899,13 +10923,17 @@ eHalStatus csrRoamStartWaitForKeyTimer(tpAniSirGlobal pMac, tANI_U32 interval)
eHalStatus csrRoamStopWaitForKeyTimer(tpAniSirGlobal pMac)
{
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[pMac->roam.WaitForKeyTimerInfo.sessionId];
+
smsLog(pMac, LOG2, FL("WaitForKey timer stopped in state=%s sub-state=%s"),
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState),
+ pNeighborRoamInfo->neighborRoamState),
macTraceGetcsrRoamSubState(
pMac->roam.curSubState[pMac->roam.WaitForKeyTimerInfo.sessionId]));
#ifdef FEATURE_WLAN_LFR
- if (csrNeighborRoamIsHandoffInProgress(pMac))
+ if (csrNeighborRoamIsHandoffInProgress(pMac,
+ pMac->roam.WaitForKeyTimerInfo.sessionId))
{
/*
* Enable heartbeat timer when hand-off is in progress
@@ -13765,7 +13793,7 @@ eHalStatus csrSendMBDisassocReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSi
Here we should not send the disassoc over the air to the AP */
if ( CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId)
#ifdef WLAN_FEATURE_VOWIFI_11R
- && csrRoamIs11rAssoc(pMac)
+ && csrRoamIs11rAssoc(pMac, sessionId)
#endif
)
{
@@ -14734,7 +14762,6 @@ eHalStatus csrSendMBAddSelfStaReqMsg( tpAniSirGlobal pMac,
pMsg->type = pAddStaReq->type;
pMsg->subType = pAddStaReq->subType;
pMsg->sessionId = sessionId;
- printk("session id - %d, AddSta session - %d\n", sessionId, pAddStaReq->sessionId);
smsLog( pMac, LOG1, FL("selfMac="MAC_ADDRESS_STR),
MAC_ADDR_ARRAY(pMsg->selfMacAddr));
@@ -14742,6 +14769,7 @@ eHalStatus csrSendMBAddSelfStaReqMsg( tpAniSirGlobal pMac,
} while( 0 );
return( status );
}
+
eHalStatus csrIssueAddStaForSessionReq(tpAniSirGlobal pMac, tANI_U32 sessionId,
tSirMacAddr sessionMacAddr,
tANI_U32 type, tANI_U32 subType)
@@ -15252,7 +15280,7 @@ static void csrRoamLinkDown(tpAniSirGlobal pMac, tANI_U32 sessionId)
if (csrRoamIsStaMode(pMac, sessionId)
&& !CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId)
#ifdef WLAN_FEATURE_VOWIFI_11R
- && !csrRoamIs11rAssoc(pMac)
+ && !csrRoamIs11rAssoc(pMac, sessionId)
#endif
) {
smsLog(pMac, LOG1, FL("Inform Link lost for session %d"), sessionId);
@@ -16065,7 +16093,7 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
return eHAL_STATUS_FAILURE;
}
- if (csrNeighborMiddleOfRoaming((tHalHandle)pMac))
+ if (csrNeighborMiddleOfRoaming((tHalHandle)pMac, sessionId))
{
smsLog(pMac, LOG1, FL("in the middle of roaming states"));
return eHAL_STATUS_FAILURE;
@@ -16451,6 +16479,7 @@ csrRoamScanOffloadPrepareProbeReqTemplate(tpAniSirGlobal pMac,
*pusLen = nPayload + sizeof(tSirMacMgmtHdr);
return eSIR_SUCCESS;
}
+
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
void csrRoamOffload(tpAniSirGlobal pMac, tSirRoamOffloadScanReq *pRequestBuf,
tCsrRoamSession *pSession)
@@ -16486,15 +16515,17 @@ void csrRoamOffload(tpAniSirGlobal pMac, tSirRoamOffloadScanReq *pRequestBuf,
SIR_UAPSD_GET(ACVO, pMac->lim.gUapsdPerAcBitmask);
}
#endif
-eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reason)
+
+eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 sessionId,
+ tANI_U8 command, tANI_U8 reason)
{
vos_msg_t msg;
tSirRoamOffloadScanReq *pRequestBuf;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tCsrRoamSession *pSession;
tANI_U8 i,j,num_channels = 0, ucDot11Mode;
tANI_U8 *ChannelList = NULL;
- tANI_U32 sessionId;
eHalStatus status = eHAL_STATUS_SUCCESS;
tpCsrChannelInfo currChannelListInfo;
tANI_U32 host_channels = 0;
@@ -16502,16 +16533,8 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reas
tANI_U8 ChannelCacheStr[128] = {0};
currChannelListInfo = &pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo;
- status = csrRoamGetSessionIdFromBSSID(pMac,
- (tCsrBssid *)pNeighborRoamInfo->currAPbssid,
- &sessionId);
- if (!HAL_STATUS_SUCCESS(status))
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "%s: Not able to find the sessionId",__func__);
- return eHAL_STATUS_FAILURE;
- }
pSession = CSR_GET_SESSION( pMac, sessionId );
+
if (NULL == pSession)
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
@@ -16546,21 +16569,24 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reas
* in a PREAUTH or REASSOC states.So, consider not sending the command down in INIT state.
* We also have to ensure that if there is a STOP command we always have to inform Riva,
* irrespective of whichever state we are in.*/
- if ((pMac->roam.neighborRoamInfo.neighborRoamState == eCSR_NEIGHBOR_ROAM_STATE_INIT) &&
+
+ if ((pMac->roam.neighborRoamInfo[sessionId].neighborRoamState ==
+ eCSR_NEIGHBOR_ROAM_STATE_INIT) &&
(command != ROAM_SCAN_OFFLOAD_STOP))
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
- FL("Scan Command not sent to FW with state = %s and cmd=%d "),
- macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState), command);
+ FL("Scan Command not sent to FW with state = %s and cmd=%d"),
+ macTraceGetNeighbourRoamState(
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState), command);
return eHAL_STATUS_FAILURE;
}
pRequestBuf = vos_mem_malloc(sizeof(tSirRoamOffloadScanReq));
if (NULL == pRequestBuf)
{
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: Not able to allocate memory for Roam Offload scan request", __func__);
- return eHAL_STATUS_FAILED_ALLOC;
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ FL("Not able to allocate memory for Roam Offload scan request)"));
+ return eHAL_STATUS_FAILED_ALLOC;
}
vos_mem_zero(pRequestBuf, sizeof(tSirRoamOffloadScanReq));
@@ -16623,73 +16649,74 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reas
eANI_BOOLEAN_FALSE)) ||
(pNeighborRoamInfo->isESEAssoc == eANI_BOOLEAN_FALSE) ||
#endif // ESE
- currChannelListInfo->numOfChannels == 0)
- {
-
- /*Retrieve the Channel Cache either from ini or from the Occupied Channels list.
- * Give Preference to INI Channels.*/
- if (pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels)
- {
- ChannelList = pNeighborRoamInfo->cfgParams.channelInfo.ChannelList;
- /* The INI channels need to be filtered with respect to the current
- * band that is supported.
- */
- eBand = pMac->roam.configParam.bandCapability;
- if ((eCSR_BAND_24 != eBand) && (eCSR_BAND_5G != eBand) && (eCSR_BAND_ALL != eBand))
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ currChannelListInfo->numOfChannels == 0) {
+ /* Retrieve the Channel Cache either from ini or from the Occupied
+ * Channels list. Give Preference to INI Channels.*/
+ if (pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels) {
+ ChannelList = pNeighborRoamInfo->cfgParams.channelInfo.ChannelList;
+ /* The INI channels need to be filtered with respect to the current
+ * band that is supported. */
+ eBand = pMac->roam.configParam.bandCapability;
+ if ((eCSR_BAND_24 != eBand) && (eCSR_BAND_5G != eBand) &&
+ (eCSR_BAND_ALL != eBand)) {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"Invalid band, No operation carried out (Band %d)", eBand);
- vos_mem_free(pRequestBuf);
- return eHAL_STATUS_FAILURE;
- }
- for (i=0; i<pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels ;i++)
- {
- if (((eCSR_BAND_24 == eBand) && CSR_IS_CHANNEL_24GHZ(*ChannelList)) ||
- ((eCSR_BAND_5G == eBand) && CSR_IS_CHANNEL_5GHZ(*ChannelList)) ||
- (eCSR_BAND_ALL == eBand))
- {
- /*Allow DFS channels only if the DFS channel roam flag is enabled */
- if(((pMac->roam.configParam.allowDFSChannelRoam
+ vos_mem_free(pRequestBuf);
+ return eHAL_STATUS_FAILURE;
+ }
+
+ for (i = 0;
+ i < pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels;
+ i++) {
+ if (((eCSR_BAND_24 == eBand) &&
+ CSR_IS_CHANNEL_24GHZ(*ChannelList)) ||
+ ((eCSR_BAND_5G == eBand) &&
+ CSR_IS_CHANNEL_5GHZ(*ChannelList)) ||
+ (eCSR_BAND_ALL == eBand)) {
+ /* Allow DFS channels only if the DFS channel
+ * roam flag is enabled */
+ if (((pMac->roam.configParam.allowDFSChannelRoam
!= CSR_ROAMING_DFS_CHANNEL_DISABLED) ||
- (!CSR_IS_CHANNEL_DFS(*ChannelList))) &&
- csrRoamIsChannelValid(pMac, *ChannelList) &&
- *ChannelList && (num_channels < SIR_ROAM_MAX_CHANNELS))
- {
- pRequestBuf->ConnectedNetwork.ChannelCache[num_channels++] = *ChannelList;
- }
- ChannelList++;
- }
- }
- pRequestBuf->ConnectedNetwork.ChannelCount = num_channels;
- pRequestBuf->ChannelCacheType = CHANNEL_LIST_STATIC;
- }
- else
- {
- ChannelList = pMac->scan.occupiedChannels.channelList;
- for(i=0; i<pMac->scan.occupiedChannels.numChannels; i++)
- {
- if(((pMac->roam.configParam.allowDFSChannelRoam
+ (!CSR_IS_CHANNEL_DFS(*ChannelList))) &&
+ csrRoamIsChannelValid(pMac, *ChannelList) &&
+ *ChannelList &&
+ (num_channels < SIR_ROAM_MAX_CHANNELS)) {
+ pRequestBuf->ConnectedNetwork.ChannelCache[
+ num_channels++] = *ChannelList;
+ }
+ ChannelList++;
+ }
+ }
+ pRequestBuf->ConnectedNetwork.ChannelCount = num_channels;
+ pRequestBuf->ChannelCacheType = CHANNEL_LIST_STATIC;
+ } else {
+ ChannelList = pMac->scan.occupiedChannels[sessionId].channelList;
+ for (i = 0;
+ i < pMac->scan.occupiedChannels[sessionId].numChannels;
+ i++) {
+ if(((pMac->roam.configParam.allowDFSChannelRoam
!= CSR_ROAMING_DFS_CHANNEL_DISABLED) ||
- (!CSR_IS_CHANNEL_DFS(*ChannelList))) && *ChannelList &&
- (num_channels < SIR_ROAM_MAX_CHANNELS))
- {
- pRequestBuf->ConnectedNetwork.ChannelCache[num_channels++] = *ChannelList;
+ (!CSR_IS_CHANNEL_DFS(*ChannelList))) && *ChannelList &&
+ (num_channels < SIR_ROAM_MAX_CHANNELS)) {
+ pRequestBuf->ConnectedNetwork.ChannelCache[num_channels++] =
+ *ChannelList;
}
ChannelList++;
- }
- pRequestBuf->ConnectedNetwork.ChannelCount = num_channels;
- /* If the profile changes as to what it was earlier, inform the FW through
- * FLUSH as ChannelCacheType in which case, the FW will flush the occupied channels
- * for the earlier profile and try to learn them afresh.*/
- if (reason == REASON_FLUSH_CHANNEL_LIST)
- pRequestBuf->ChannelCacheType = CHANNEL_LIST_DYNAMIC_FLUSH;
- else {
- if (csrNeighborRoamIsNewConnectedProfile(pMac))
- pRequestBuf->ChannelCacheType = CHANNEL_LIST_DYNAMIC_INIT;
- else
- pRequestBuf->ChannelCacheType = CHANNEL_LIST_DYNAMIC_UPDATE;
- }
}
+ pRequestBuf->ConnectedNetwork.ChannelCount = num_channels;
+ /* If the profile changes as to what it was earlier, inform the
+ * FW through FLUSH as ChannelCacheType in which case,
+ * the FW will flush the occupied channels for the earlier profile and
+ * try to learn them afresh.*/
+ if (reason == REASON_FLUSH_CHANNEL_LIST)
+ pRequestBuf->ChannelCacheType = CHANNEL_LIST_DYNAMIC_FLUSH;
+ else {
+ if (csrNeighborRoamIsNewConnectedProfile(pMac, sessionId))
+ pRequestBuf->ChannelCacheType = CHANNEL_LIST_DYNAMIC_INIT;
+ else
+ pRequestBuf->ChannelCacheType = CHANNEL_LIST_DYNAMIC_UPDATE;
+ }
+ }
}
#ifdef FEATURE_WLAN_ESE
else
@@ -16826,18 +16853,23 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reas
return status;
}
-eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac, tANI_U8 reason)
+eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac,
+ tpSirRoamOffloadScanRsp scanOffloadRsp)
{
- switch(reason)
- {
- case 0:
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, "Rsp for Roam Scan Offload with failure status");
- break;
- case REASON_OS_REQUESTED_ROAMING_NOW:
- csrNeighborRoamProceedWithHandoffReq(pMac);
- break;
- default:
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "Rsp for Roam Scan Offload with reason %d", reason);
+ switch (scanOffloadRsp->reason) {
+ case 0:
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
+ "Rsp for Roam Scan Offload with failure status");
+ break;
+ case REASON_OS_REQUESTED_ROAMING_NOW:
+ csrNeighborRoamProceedWithHandoffReq(pMac,
+ scanOffloadRsp->sessionId);
+ break;
+
+ default:
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
+ "Rsp for Roam Scan Offload with reason %d",
+ scanOffloadRsp->reason);
}
return eHAL_STATUS_SUCCESS;
}
@@ -17759,7 +17791,7 @@ eHalStatus csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId, tpSirBs
(void *)pBssDescription->bssId, sizeof(tSirMacAddr));
#ifdef WLAN_FEATURE_VOWIFI_11R
- if (csrRoamIs11rAssoc(pMac) &&
+ if (csrRoamIs11rAssoc(pMac, sessionId) &&
(pMac->roam.roamSession[sessionId].connectedProfile.AuthType != eCSR_AUTH_TYPE_OPEN_SYSTEM))
{
pftPreAuthReq->ft_ies_length =
@@ -17802,7 +17834,8 @@ void csrRoamFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuth
}
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
- status = csrNeighborRoamPreauthRspHandler(pMac, pFTPreAuthRsp->status);
+ status = csrNeighborRoamPreauthRspHandler(pMac, pFTPreAuthRsp->smeSessionId,
+ pFTPreAuthRsp->status);
if (status != eHAL_STATUS_SUCCESS) {
/*
* Bail out if pre-auth was not even processed.
@@ -17821,7 +17854,7 @@ void csrRoamFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuth
// Indicate SME QoS module the completion of Preauth success. This will trigger the creation of RIC IEs
pSession->ftSmeContext.psavedFTPreAuthRsp = pFTPreAuthRsp;
/* No need to notify qos module if this is a non 11r roam*/
- if (csrRoamIs11rAssoc(pMac))
+ if (csrRoamIs11rAssoc(pMac, pFTPreAuthRsp->smeSessionId))
{
sme_QosCsrEventInd(pMac,
pSession->ftSmeContext.smeSessionId,
@@ -17839,7 +17872,7 @@ void csrRoamFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuth
// Save the received response
vos_mem_copy((void *)&pSession->ftSmeContext.preAuthbssId,
(void *)pFTPreAuthRsp->preAuthbssId, sizeof(tCsrBssid));
- if (csrRoamIs11rAssoc(pMac))
+ if (csrRoamIs11rAssoc(pMac, pFTPreAuthRsp->smeSessionId))
csrRoamCallCallback(pMac, pFTPreAuthRsp->smeSessionId, NULL, 0,
eCSR_ROAM_FT_RESPONSE, eCSR_ROAM_RESULT_NONE);
@@ -17847,7 +17880,8 @@ void csrRoamFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuth
if (csrRoamIsESEAssoc(pMac))
{
/* read TSF */
- csrRoamReadTSF(pMac, (tANI_U8 *)roamInfo.timestamp);
+ csrRoamReadTSF(pMac, (tANI_U8 *)roamInfo.timestamp,
+ pFTPreAuthRsp->smeSessionId);
// Save the bssid from the received response
vos_mem_copy((void *)&roamInfo.bssid,
(void *)pFTPreAuthRsp->preAuthbssId, sizeof(tCsrBssid));
@@ -17859,7 +17893,7 @@ void csrRoamFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuth
#ifdef FEATURE_WLAN_LFR
// If Legacy Fast Roaming is enabled, signal the supplicant
// So he can send us a PMK-ID for this candidate AP.
- if (csrRoamIsFastRoamEnabled(pMac, CSR_SESSION_ID_INVALID))
+ if (csrRoamIsFastRoamEnabled(pMac, pFTPreAuthRsp->smeSessionId))
{
// Save the bssid from the received response
vos_mem_copy((void *)&roamInfo.bssid,
@@ -17875,8 +17909,8 @@ void csrRoamFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuth
pMac->roam.roamSession[sessionId].connectedProfile.AuthType;
pSession->ftSmeContext.addMDIE = FALSE;
- if( csrRoamIs11rAssoc(pMac) &&
- (conn_Auth_type == eCSR_AUTH_TYPE_OPEN_SYSTEM))
+ if (csrRoamIs11rAssoc(pMac, pFTPreAuthRsp->smeSessionId) &&
+ (conn_Auth_type == eCSR_AUTH_TYPE_OPEN_SYSTEM))
{
tANI_U16 ft_ies_length;
ft_ies_length = pFTPreAuthRsp->ric_ies_length;
@@ -18101,6 +18135,7 @@ tANI_BOOLEAN csrRoamIsStaMode(tpAniSirGlobal pMac, tANI_U32 sessionId)
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
eHalStatus csrHandoffRequest(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
tCsrHandoffRequest *pHandoffInfo)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -18115,7 +18150,7 @@ eHalStatus csrHandoffRequest(tpAniSirGlobal pMac,
}
pMsg->msgType = pal_cpu_to_be16((tANI_U16)eWNI_SME_HANDOFF_REQ);
pMsg->msgLen = (tANI_U16)sizeof(tAniHandoffReq);
- pMsg->sessionId = pMac->roam.neighborRoamInfo.csrSessionId;
+ pMsg->sessionId = sessionId;
pMsg->channel = pHandoffInfo->channel;
#ifndef QCA_WIFI_ISOC
pMsg->handoff_src = pHandoffInfo->src;
@@ -18174,14 +18209,15 @@ VOS_STATUS csrSetCCKMIe(tpAniSirGlobal pMac, const tANI_U8 sessionId,
\param pTimestamp - output TSF timestamp
\- return Success or failure
-------------------------------------------------------------------------*/
-VOS_STATUS csrRoamReadTSF(tpAniSirGlobal pMac, tANI_U8 *pTimestamp)
+VOS_STATUS csrRoamReadTSF(tpAniSirGlobal pMac, tANI_U8 *pTimestamp,
+ tANI_U8 sessionId)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tCsrNeighborRoamBSSInfo handoffNode;
tANI_U32 timer_diff = 0;
tANI_U32 timeStamp[2];
tpSirBssDescription pBssDescription = NULL;
- csrNeighborRoamGetHandoffAPInfo(pMac, &handoffNode);
+ csrNeighborRoamGetHandoffAPInfo(pMac, &handoffNode, sessionId);
pBssDescription = handoffNode.pBssDescription;
// Get the time diff in milli seconds
timer_diff = vos_timer_get_system_time() - pBssDescription->scanSysTimeMsec;
diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c
index ac3330170aa9..2daaa835eed8 100644
--- a/CORE/SME/src/csr/csrApiScan.c
+++ b/CORE/SME/src/csr/csrApiScan.c
@@ -365,7 +365,8 @@ static void csrSetDefaultScanTiming( tpAniSirGlobal pMac, tSirScanType scanType,
#ifdef WLAN_AP_STA_CONCURRENCY
//Return SUCCESS is the command is queued, else returns eHAL_STATUS_FAILURE
-eHalStatus csrQueueScanRequest( tpAniSirGlobal pMac, tSmeCmd *pScanCmd )
+eHalStatus csrQueueScanRequest(tpAniSirGlobal pMac, tANI_U8 sessionId,
+ tSmeCmd *pScanCmd)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -401,7 +402,7 @@ eHalStatus csrQueueScanRequest( tpAniSirGlobal pMac, tSmeCmd *pScanCmd )
#ifdef FEATURE_WLAN_LFR
(csrIsConcurrentInfraConnected(pMac) ||
((pScanCmd->u.scanCmd.reason != eCsrScanBgScan) &&
- (pMac->roam.neighborRoamInfo.neighborRoamState !=
+ (pMac->roam.neighborRoamInfo[sessionId].neighborRoamState !=
eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN))) &&
#endif
(pScanCmd->u.scanCmd.u.scanRequest.p2pSearch != 1)) ||
@@ -573,7 +574,7 @@ eHalStatus csrQueueScanRequest( tpAniSirGlobal pMac, tSmeCmd *pScanCmd )
smsLog( pMac, LOG2, FL("Queuing scan command (reason=%d, roamState=%d"
" numOfChannels=%d)"),
pScanCmd->u.scanCmd.reason,
- pMac->roam.neighborRoamInfo.neighborRoamState,
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState,
pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels);
return csrQueueSmeCommand(pMac, pScanCmd, eANI_BOOLEAN_FALSE);
}
@@ -862,7 +863,8 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId,
//Start process the command
#ifdef WLAN_AP_STA_CONCURRENCY
if (!pMac->fScanOffload)
- status = csrQueueScanRequest(pMac, p11dScanCmd);
+ status = csrQueueScanRequest(pMac, sessionId,
+ p11dScanCmd);
else
status = csrQueueSmeCommand(pMac, p11dScanCmd,
eANI_BOOLEAN_FALSE);
@@ -934,7 +936,7 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId,
//Start process the command
#ifdef WLAN_AP_STA_CONCURRENCY
if (!pMac->fScanOffload)
- status = csrQueueScanRequest(pMac,pScanCmd);
+ status = csrQueueScanRequest(pMac, sessionId, pScanCmd);
else
status = csrQueueSmeCommand(pMac, pScanCmd,
eANI_BOOLEAN_FALSE);
@@ -1699,13 +1701,13 @@ eHalStatus csrScanHandleSearchForSSID(tpAniSirGlobal pMac, tSmeCmd *pCommand)
do
{
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
- //if this scan is for LFR
- if(pMac->roam.neighborRoamInfo.uOsRequestedHandoff)
- {
- //notify LFR state m/c
- if(eHAL_STATUS_SUCCESS != csrNeighborRoamSssidScanDone(pMac, eHAL_STATUS_SUCCESS))
- {
- csrNeighborRoamStartLfrScan(pMac);
+ /* If this scan is for LFR */
+ if (pMac->roam.neighborRoamInfo[sessionId].uOsRequestedHandoff) {
+ /* Notify LFR state m/c */
+ if (eHAL_STATUS_SUCCESS != csrNeighborRoamSssidScanDone(pMac,
+ sessionId,
+ eHAL_STATUS_SUCCESS)) {
+ csrNeighborRoamStartLfrScan(pMac, sessionId);
}
status = eHAL_STATUS_SUCCESS;
break;
@@ -1787,13 +1789,13 @@ eHalStatus csrScanHandleSearchForSSIDFailure(tpAniSirGlobal pMac, tSmeCmd *pComm
tCsrRoamProfile *pProfile = pCommand->u.scanCmd.pToRoamProfile;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
- //if this scan is for LFR
- if(pMac->roam.neighborRoamInfo.uOsRequestedHandoff)
- {
- //notify LFR state m/c
- if(eHAL_STATUS_SUCCESS != csrNeighborRoamSssidScanDone(pMac, eHAL_STATUS_FAILURE))
- {
- csrNeighborRoamStartLfrScan(pMac);
+ /* If this scan is for LFR */
+ if (pMac->roam.neighborRoamInfo[sessionId].uOsRequestedHandoff) {
+ /* Notify LFR state m/c */
+ if (eHAL_STATUS_SUCCESS != csrNeighborRoamSssidScanDone(pMac,
+ sessionId,
+ eHAL_STATUS_FAILURE)) {
+ csrNeighborRoamStartLfrScan(pMac, sessionId);
}
return eHAL_STATUS_SUCCESS;
}
@@ -2079,6 +2081,7 @@ static tANI_BOOLEAN csrIsBetterBss(tCsrScanResult *pBss1, tCsrScanResult *pBss2)
static void csrScanAddToOccupiedChannels(
tpAniSirGlobal pMac,
tCsrScanResult *pResult,
+ tANI_U8 sessionId,
tCsrChannel *pOccupiedChannels,
tDot11fBeaconIEs *pIes)
{
@@ -2090,14 +2093,14 @@ static void csrScanAddToOccupiedChannels(
channel = pResult->Result.BssDescriptor.channelId;
if (!csrIsChannelPresentInList(pOccupiedChannelList, numOccupiedChannels, channel)
- && csrNeighborRoamConnectedProfileMatch(pMac, pResult, pIes))
+ && csrNeighborRoamConnectedProfileMatch(pMac, sessionId, pResult, pIes))
{
status = csrAddToChannelListFront(pOccupiedChannelList, numOccupiedChannels, channel);
if(HAL_STATUS_SUCCESS(status))
{
pOccupiedChannels->numChannels++;
- smsLog(pMac, LOG2, FL("%s: added channel %d to the list (count=%d)"),
- __func__, channel, pOccupiedChannels->numChannels);
+ smsLog(pMac, LOG2, FL("Added channel %d to the list (count=%d)"),
+ channel, pOccupiedChannels->numChannels);
if (pOccupiedChannels->numChannels > CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN)
pOccupiedChannels->numChannels = CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN;
}
@@ -2107,21 +2110,27 @@ static void csrScanAddToOccupiedChannels(
//Put the BSS into the scan result list
//pIes can not be NULL
-static void csrScanAddResult(tpAniSirGlobal pMac, tCsrScanResult *pResult, tDot11fBeaconIEs *pIes)
+static void csrScanAddResult(tpAniSirGlobal pMac, tCsrScanResult *pResult,
+ tDot11fBeaconIEs *pIes, tANI_U32 sessionId)
{
#ifdef FEATURE_WLAN_LFR
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
#endif
- pResult->preferValue = csrGetBssPreferValue(pMac, (int)pResult->Result.BssDescriptor.rssi);
- pResult->capValue = csrGetBssCapValue(pMac, &pResult->Result.BssDescriptor, pIes);
+ pResult->preferValue =
+ csrGetBssPreferValue(pMac, (int)pResult->Result.BssDescriptor.rssi);
+ pResult->capValue =
+ csrGetBssCapValue(pMac, &pResult->Result.BssDescriptor, pIes);
csrLLInsertTail( &pMac->scan.scanResultList, &pResult->Link, LL_ACCESS_LOCK );
#ifdef FEATURE_WLAN_LFR
if(0 == pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels)
{
/* Build the occupied channel list, only if "gNeighborScanChannelList" is
NOT set in the cfg.ini file */
- csrScanAddToOccupiedChannels(pMac, pResult, &pMac->scan.occupiedChannels, pIes);
+ csrScanAddToOccupiedChannels(pMac, pResult, sessionId,
+ &pMac->scan.occupiedChannels[sessionId],
+ pIes);
}
#endif
}
@@ -2427,22 +2436,22 @@ eHalStatus csrScanGetResult(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter,
* csrScanGetResult returns with a failure because
* of not being able to find the roaming BSS.
*/
-tANI_U8 csrScanFlushDenied(tpAniSirGlobal pMac)
+tANI_U8 csrScanFlushDenied(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
- switch(pMac->roam.neighborRoamInfo.neighborRoamState) {
+ switch(pMac->roam.neighborRoamInfo[sessionId].neighborRoamState) {
case eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN:
case eCSR_NEIGHBOR_ROAM_STATE_PREAUTHENTICATING:
case eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE:
case eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING:
- return (pMac->roam.neighborRoamInfo.neighborRoamState);
+ return (pMac->roam.neighborRoamInfo[sessionId].neighborRoamState);
default:
return 0;
}
}
-eHalStatus csrScanFlushResult(tpAniSirGlobal pMac)
+eHalStatus csrScanFlushResult(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
- tANI_U8 isFlushDenied = csrScanFlushDenied(pMac);
+ tANI_U8 isFlushDenied = csrScanFlushDenied(pMac, sessionId);
eHalStatus status = eHAL_STATUS_SUCCESS;
tSirMbMsg *pMsg;
tANI_U16 msgLen;
@@ -2976,43 +2985,42 @@ eHalStatus csrAddPMKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId,
//This function checks whether new AP is found for the current connected profile
//If it is found, it return the sessionId, else it return invalid sessionID
-tANI_U32 csrProcessBSSDescForPMKIDList(tpAniSirGlobal pMac,
- tSirBssDescription *pBssDesc,
- tDot11fBeaconIEs *pIes)
+eHalStatus csrProcessBSSDescForPMKIDList(tpAniSirGlobal pMac,
+ tSirBssDescription *pBssDesc,
+ tDot11fBeaconIEs *pIes,
+ tANI_U8 sessionId)
{
- tANI_U32 i, bRet = CSR_SESSION_ID_INVALID;
tCsrRoamSession *pSession;
tDot11fBeaconIEs *pIesLocal = pIes;
+ eHalStatus status = eHAL_STATUS_FAILURE;
- if( pIesLocal || HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs(pMac, pBssDesc, &pIesLocal)) )
- {
- for( i = 0; i < CSR_ROAM_SESSION_MAX; i++ )
- {
- if( CSR_IS_SESSION_VALID( pMac, i ) )
- {
- pSession = CSR_GET_SESSION( pMac, i );
- if( csrIsConnStateConnectedInfra( pMac, i ) &&
- ( eCSR_AUTH_TYPE_RSN == pSession->connectedProfile.AuthType ) )
- {
- if(csrMatchBSSToConnectProfile(pMac, &pSession->connectedProfile, pBssDesc, pIesLocal))
- {
- //this new BSS fits the current profile connected
- if(HAL_STATUS_SUCCESS(csrAddPMKIDCandidateList(pMac, i, pBssDesc, pIesLocal)))
- {
- bRet = i;
- }
- break;
+ if (pIesLocal ||
+ HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs(
+ pMac, pBssDesc, &pIesLocal))) {
+ if (CSR_IS_SESSION_VALID(pMac, sessionId)) {
+ pSession = CSR_GET_SESSION(pMac, sessionId);
+ if (csrIsConnStateConnectedInfra(pMac, sessionId) &&
+ (eCSR_AUTH_TYPE_RSN == pSession->connectedProfile.AuthType)) {
+ if (csrMatchBSSToConnectProfile(pMac,
+ &pSession->connectedProfile,
+ pBssDesc, pIesLocal)) {
+ /* This new BSS fits the current profile connected */
+ if (!HAL_STATUS_SUCCESS(csrAddPMKIDCandidateList(pMac,
+ sessionId, pBssDesc, pIesLocal))) {
+ smsLog(pMac, LOGE,
+ FL("csrAddPMKIDCandidateList failed"));
+ } else {
+ status = eHAL_STATUS_SUCCESS;
}
}
}
}
- if( !pIes )
- {
+
+ if (!pIes) {
vos_mem_free(pIesLocal);
}
}
-
- return (tANI_U8)bRet;
+ return status;
}
#ifdef FEATURE_WLAN_WAPI
@@ -3107,7 +3115,9 @@ tANI_BOOLEAN csrProcessBSSDescForBKIDList(tpAniSirGlobal pMac, tSirBssDescriptio
#endif
-static void csrMoveTempScanResultsToMainList( tpAniSirGlobal pMac, tANI_U8 reason )
+static void csrMoveTempScanResultsToMainList(tpAniSirGlobal pMac,
+ tANI_U8 reason,
+ tANI_U8 sessionId)
{
tListElem *pEntry;
tListElem *pEntryTemp;
@@ -3120,7 +3130,6 @@ static void csrMoveTempScanResultsToMainList( tpAniSirGlobal pMac, tANI_U8 reaso
tANI_BOOLEAN fNewWapiBSSForCurConnection = eANI_BOOLEAN_FALSE;
#endif /* FEATURE_WLAN_WAPI */
tDot11fBeaconIEs *pIesLocal = NULL;
- tANI_U32 sessionId = CSR_SESSION_ID_INVALID;
tAniSSID tmpSsid;
v_TIME_t timer=0;
tCsrBssid bssid_temp = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
@@ -3169,11 +3178,10 @@ static void csrMoveTempScanResultsToMainList( tpAniSirGlobal pMac, tANI_U8 reaso
// check for duplicate scan results
if ( !fDupBss )
{
- //Found a new BSS
- sessionId = csrProcessBSSDescForPMKIDList(pMac,
- &pBssDescription->Result.BssDescriptor, pIesLocal);
- if( CSR_SESSION_ID_INVALID != sessionId)
- {
+ if (HAL_STATUS_SUCCESS(csrProcessBSSDescForPMKIDList(pMac,
+ &pBssDescription->Result.BssDescriptor,
+ pIesLocal, sessionId))) {
+ /* Found a new BSS */
csrRoamCallCallback(pMac, sessionId, NULL, 0,
eCSR_ROAM_SCAN_FOUND_NEW_BSS, eCSR_ROAM_RESULT_NONE);
}
@@ -3239,33 +3247,27 @@ static void csrMoveTempScanResultsToMainList( tpAniSirGlobal pMac, tANI_U8 reaso
// append to main list
- csrScanAddResult(pMac, pBssDescription, pIesLocal);
+ csrScanAddResult(pMac, pBssDescription, pIesLocal, sessionId);
if ( (pBssDescription->Result.pvIes == NULL) && pIesLocal )
{
vos_mem_free(pIesLocal);
}
}
- //we don't need to update CC while connected to an AP which is advertising CC already
+ /* We don't need to update CC while connected to an AP
+ which is advertising CC already */
if (csrIs11dSupported(pMac))
{
- tANI_U32 i;
tCsrRoamSession *pSession;
- for (i = 0; i < CSR_ROAM_SESSION_MAX; i++ )
- {
- if (CSR_IS_SESSION_VALID( pMac, i ) )
- {
- pSession = CSR_GET_SESSION( pMac, i );
- if (csrIsConnStateConnected(pMac, i))
- {
- if (csrIsBssidMatch(pMac, (tCsrBssid *)&pMac->scan.currentCountryBssid,
- &pSession->connectedProfile.bssid))
- {
- smsLog(pMac, LOGW, FL("No need for updating CC, we will"
- "continue with current AP's CC"));
- goto end;
- }
+ if (CSR_IS_SESSION_VALID(pMac, sessionId)) {
+ if (csrIsConnStateConnected(pMac, sessionId)) {
+ pSession = CSR_GET_SESSION(pMac, sessionId);
+ if (csrIsBssidMatch(pMac, &pMac->scan.currentCountryBssid,
+ &pSession->connectedProfile.bssid)) {
+ smsLog(pMac, LOGW, FL("No need for updating CC, we will "
+ "continue with current AP's CC"));
+ goto end;
}
}
}
@@ -3338,8 +3340,11 @@ end:
}
-static tCsrScanResult *csrScanSaveBssDescription( tpAniSirGlobal pMac, tSirBssDescription *pBSSDescription,
- tDot11fBeaconIEs *pIes)
+static tCsrScanResult *
+csrScanSaveBssDescription(tpAniSirGlobal pMac,
+ tSirBssDescription *pBSSDescription,
+ tDot11fBeaconIEs *pIes,
+ tANI_U8 sessionId)
{
tCsrScanResult *pCsrBssDescription = NULL;
tANI_U32 cbBSSDesc;
@@ -3364,16 +3369,19 @@ static tCsrScanResult *csrScanSaveBssDescription( tpAniSirGlobal pMac, tSirBssDe
return NULL;
}
#endif
- csrScanAddResult(pMac, pCsrBssDescription, pIes);
+ csrScanAddResult(pMac, pCsrBssDescription, pIes, sessionId);
}
return( pCsrBssDescription );
}
// Append a Bss Description...
-tCsrScanResult *csrScanAppendBssDescription( tpAniSirGlobal pMac,
- tSirBssDescription *pSirBssDescription,
- tDot11fBeaconIEs *pIes, tANI_BOOLEAN fForced )
+tCsrScanResult *
+csrScanAppendBssDescription(tpAniSirGlobal pMac,
+ tSirBssDescription *pSirBssDescription,
+ tDot11fBeaconIEs *pIes,
+ tANI_BOOLEAN fForced,
+ tANI_U8 sessionId)
{
tCsrScanResult *pCsrBssDescription = NULL;
tAniSSID tmpSsid;
@@ -3382,7 +3390,8 @@ tCsrScanResult *csrScanAppendBssDescription( tpAniSirGlobal pMac,
tmpSsid.length = 0;
result = csrRemoveDupBssDescription( pMac, pSirBssDescription, pIes, &tmpSsid, &timer, fForced );
- pCsrBssDescription = csrScanSaveBssDescription( pMac, pSirBssDescription, pIes );
+ pCsrBssDescription = csrScanSaveBssDescription(pMac, pSirBssDescription,
+ pIes, sessionId);
if (result && (pCsrBssDescription != NULL))
{
//Check if the new one has SSID it it, if not, use the older SSID if it exists.
@@ -4341,7 +4350,8 @@ tANI_BOOLEAN csrLearnCountryInformation( tpAniSirGlobal pMac, tSirBssDescription
}
-static void csrSaveScanResults( tpAniSirGlobal pMac, tANI_U8 reason )
+static void csrSaveScanResults(tpAniSirGlobal pMac, tANI_U8 reason,
+ tANI_U8 sessionId)
{
// initialize this to FALSE. profMoveInterimScanResultsToMainList() routine
// will set this to the channel where an .11d beacon is seen
@@ -4353,7 +4363,7 @@ static void csrSaveScanResults( tpAniSirGlobal pMac, tANI_U8 reason )
// only if the applied 11d info could be found in one of the scan results
pMac->scan.fCurrent11dInfoMatch = eANI_BOOLEAN_FALSE;
// move the scan results from interim list to the main scan list
- csrMoveTempScanResultsToMainList( pMac, reason );
+ csrMoveTempScanResultsToMainList(pMac, reason, sessionId);
// Now check if we gathered any domain/country specific information
// If so, we should update channel list and apply Tx power settings
@@ -4597,7 +4607,7 @@ tANI_BOOLEAN csrScanComplete( tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp )
pCommand->u.scanCmd.abortScanDueToBandChange
= eANI_BOOLEAN_FALSE;
}
- csrSaveScanResults(pMac, pCommand->u.scanCmd.reason);
+ csrSaveScanResults(pMac, pCommand->u.scanCmd.reason, sessionId);
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
{
@@ -5039,6 +5049,8 @@ static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCo
tANI_U32 cbBssDesc;
tANI_U32 cbScanResult = GET_FIELD_OFFSET( tSirSmeScanRsp, bssDescription )
+ sizeof(tSirBssDescription); //We need at least one CB
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[pScanRsp->sessionId];
// don't consider the scan rsp to be valid if the status code is Scan Failure. Scan Failure
// is returned when the scan could not find anything. so if we get scan failure return that
@@ -5190,15 +5202,15 @@ static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCo
* the scan is delaying the time it takes for LFR to find
* candidates and resulting in disconnects.
*/
- if ( (csrIsStaSessionConnected(pMac) &&
+ if ((csrIsStaSessionConnected(pMac) &&
#ifdef FEATURE_WLAN_LFR
- (csrIsConcurrentInfraConnected(pMac) ||
- ((pCommand->u.scanCmd.reason != eCsrScanBgScan) &&
- (pMac->roam.neighborRoamInfo.neighborRoamState !=
+ (csrIsConcurrentInfraConnected(pMac) ||
+ ((pCommand->u.scanCmd.reason != eCsrScanBgScan) &&
+ (pNeighborRoamInfo->neighborRoamState !=
eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN))) &&
#endif
- (pCommand->u.scanCmd.u.scanRequest.p2pSearch != 1)) ||
- (csrIsP2pSessionConnected(pMac)) )
+ (pCommand->u.scanCmd.u.scanRequest.p2pSearch != 1)) ||
+ (csrIsP2pSessionConnected(pMac)))
{
/* if active connected sessions present then continue to split scan
* with specified interval between consecutive scans */
@@ -5228,7 +5240,8 @@ tANI_BOOLEAN csrScanIsWildCardScan( tpAniSirGlobal pMac, tSmeCmd *pCommand )
}
#ifdef FEATURE_WLAN_SCAN_PNO
-eHalStatus csrSavePnoScanResults(tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp)
+eHalStatus csrSavePnoScanResults(tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp,
+ tANI_U8 sessionId)
{
tSirBssDescription *pSirBssDescription;
tANI_U32 cbScanResult = GET_FIELD_OFFSET( tSirSmeScanRsp, bssDescription )
@@ -5289,7 +5302,8 @@ eHalStatus csrSavePnoScanResults(tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp)
&tmpSsid , &timer, FALSE );
//Add to scan cache
csrScanAddResult(pMac, pScanResult,
- (tDot11fBeaconIEs *)pScanResult->Result.pvIes);
+ (tDot11fBeaconIEs *)pScanResult->Result.pvIes,
+ sessionId);
// skip over the BSS description to the next one...
cbParsed += cbBssDesc;
@@ -5389,7 +5403,9 @@ eHalStatus csrScanSmeScanResponse( tpAniSirGlobal pMac, void *pMsgBuf )
smeProcessPendingQueue( pMac );
}
#ifdef FEATURE_WLAN_SCAN_PNO
- else if (pMac->pnoOffload && !HAL_STATUS_SUCCESS(csrSavePnoScanResults(pMac, pScanRsp)))
+ else if (pMac->pnoOffload &&
+ !HAL_STATUS_SUCCESS(csrSavePnoScanResults(pMac, pScanRsp,
+ pScanRsp->sessionId)))
{
smsLog( pMac, LOGE, "CSR: Unable to store scan results for PNO" );
status = eHAL_STATUS_FAILURE;
@@ -5402,7 +5418,9 @@ eHalStatus csrScanSmeScanResponse( tpAniSirGlobal pMac, void *pMsgBuf )
}
}
#ifdef FEATURE_WLAN_SCAN_PNO
- else if (pMac->pnoOffload && !HAL_STATUS_SUCCESS(csrSavePnoScanResults(pMac, pScanRsp)))
+ else if (pMac->pnoOffload &&
+ !HAL_STATUS_SUCCESS(csrSavePnoScanResults(pMac, pScanRsp,
+ pScanRsp->sessionId)))
{
smsLog( pMac, LOGE, "CSR: Unable to store scan results for PNO" );
status = eHAL_STATUS_FAILURE;
@@ -6456,9 +6474,9 @@ void csrScanCallCallback(tpAniSirGlobal pMac, tSmeCmd *pCommand, eCsrScanStatus
{
if(pCommand->u.scanCmd.callback)
{
-// sme_ReleaseGlobalLock( &pMac->sme );
- pCommand->u.scanCmd.callback(pMac, pCommand->u.scanCmd.pContext, pCommand->u.scanCmd.scanID, scanStatus);
-// sme_AcquireGlobalLock( &pMac->sme );
+ pCommand->u.scanCmd.callback(pMac, pCommand->u.scanCmd.pContext,
+ pCommand->sessionId,
+ pCommand->u.scanCmd.scanID, scanStatus);
} else {
smsLog( pMac, LOG2, "%s:%d - Callback NULL!!!", __func__, __LINE__);
}
@@ -6516,6 +6534,7 @@ static void csrStaApConcTimerHandler(void *pv)
tpAniSirGlobal pMac = PMAC_STRUCT( pv );
tListElem *pEntry;
tSmeCmd *pScanCmd;
+ tANI_U32 sessionId = CSR_SESSION_ID_INVALID;
csrLLLock(&pMac->scan.scanCmdPendingList);
@@ -6532,6 +6551,7 @@ static void csrStaApConcTimerHandler(void *pv)
pScanCmd = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
numChn = pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels;
+ sessionId = pScanCmd->sessionId;
/* if any session is connected and the number of channels to scan is
* greater than 1 then split the scan into multiple scan operations
@@ -6564,7 +6584,7 @@ static void csrStaApConcTimerHandler(void *pv)
#ifdef FEATURE_WLAN_LFR
(csrIsConcurrentInfraConnected(pMac) ||
((pScanCmd->u.scanCmd.reason != eCsrScanBgScan) &&
- (pMac->roam.neighborRoamInfo.neighborRoamState !=
+ (pMac->roam.neighborRoamInfo[sessionId].neighborRoamState !=
eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN))) &&
#endif
(pScanCmd->u.scanCmd.u.scanRequest.p2pSearch != 1)) ||
@@ -7212,6 +7232,7 @@ tANI_BOOLEAN csrScanRemoveFreshScanCommand(tpAniSirGlobal pMac, tANI_U8 sessionI
* send response with status eCSR_SCAN_ABORT*/
pCommand->u.scanCmd.callback(pMac,
pCommand->u.scanCmd.pContext,
+ sessionId,
pCommand->u.scanCmd.scanID,
eCSR_SCAN_ABORT);
}
@@ -7306,8 +7327,10 @@ eHalStatus csrScanGetPMKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
while(((pScanResult = csrScanResultGetNext(pMac, hBSSList)) != NULL) && ( pSession->NumPmkidCandidate < nItems))
{
//NumPmkidCandidate adds up here
- csrProcessBSSDescForPMKIDList(pMac, &pScanResult->BssDescriptor,
- (tDot11fBeaconIEs *)( pScanResult->pvIes ));
+ csrProcessBSSDescForPMKIDList(pMac,
+ &pScanResult->BssDescriptor,
+ (tDot11fBeaconIEs *)(pScanResult->pvIes),
+ sessionId);
}
if(pSession->NumPmkidCandidate)
{
@@ -7397,6 +7420,8 @@ eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
tANI_U8 bAddr[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
tANI_U8 index = 0;
tANI_U32 numSsid = pProfile->SSIDs.numOfSSIDs;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
smsLog(pMac, LOG2, FL("called"));
//For WDS, we use the index 0. There must be at least one in there
@@ -7469,12 +7494,14 @@ eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
/* For one channel be good enpugh time to receive beacon atleast */
if( 1 == pProfile->ChannelInfo.numOfChannels )
{
-#ifndef QCA_WIFI_ISOC
- if(pMac->roam.neighborRoamInfo.handoffReqInfo.src == FASTREASSOC)
- {
- pScanCmd->u.scanCmd.u.scanRequest.maxChnTime = MAX_ACTIVE_SCAN_FOR_ONE_CHANNEL_FASTREASSOC;
- pScanCmd->u.scanCmd.u.scanRequest.minChnTime = MIN_ACTIVE_SCAN_FOR_ONE_CHANNEL_FASTREASSOC;
- pMac->roam.neighborRoamInfo.handoffReqInfo.src = 0; //reset this value
+#if !defined(QCA_WIFI_ISOC) && defined (WLAN_FEATURE_ROAM_SCAN_OFFLOAD)
+ if (pNeighborRoamInfo->handoffReqInfo.src == FASTREASSOC) {
+ pScanCmd->u.scanCmd.u.scanRequest.maxChnTime =
+ MAX_ACTIVE_SCAN_FOR_ONE_CHANNEL_FASTREASSOC;
+ pScanCmd->u.scanCmd.u.scanRequest.minChnTime =
+ MIN_ACTIVE_SCAN_FOR_ONE_CHANNEL_FASTREASSOC;
+ /* Reset this value */
+ pNeighborRoamInfo->handoffReqInfo.src = 0;
}
else
#endif
@@ -8436,7 +8463,8 @@ eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac,
return eHAL_STATUS_RESOURCES;
}
//Add to scan cache
- csrScanAddResult(pMac, pScanResult, pIesLocal);
+ csrScanAddResult(pMac, pScanResult, pIesLocal,
+ pPrefNetworkFoundInd->sessionId);
if( (pScanResult->Result.pvIes == NULL) && pIesLocal )
{
@@ -8450,31 +8478,32 @@ eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac,
#endif //FEATURE_WLAN_SCAN_PNO
#ifdef FEATURE_WLAN_LFR
-void csrInitOccupiedChannelsList(tpAniSirGlobal pMac)
+void csrInitOccupiedChannelsList(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
tListElem *pEntry = NULL;
tCsrScanResult *pBssDesc = NULL;
tDot11fBeaconIEs *pIes = NULL;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
if (0 != pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels)
{
- smsLog(pMac, LOG1, FL("%s: Ini file contains neighbor scan channel list,"
- " hence NO need to build occupied channel list (numChannels = %d)"),
- __func__, pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels);
+ smsLog(pMac, LOG1, FL("Ini file contains neighbor scan channel list, "
+ "hence NO need to build occupied channel list (numChannels = %d)"),
+ pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels);
return;
}
- if (!csrNeighborRoamIsNewConnectedProfile(pMac))
+ if (!csrNeighborRoamIsNewConnectedProfile(pMac, sessionId))
{
- smsLog(pMac, LOG2, FL("%s: donot flush occupied list since current roam profile"
- " matches previous (numChannels = %d)"),
- __func__, pMac->scan.occupiedChannels.numChannels);
+ smsLog(pMac, LOG2, FL("donot flush occupied list since current roam "
+ "profile matches previous (numChannels = %d)"),
+ pMac->scan.occupiedChannels[sessionId].numChannels);
return;
}
/* Empty occupied channels here */
- pMac->scan.occupiedChannels.numChannels = 0;
+ pMac->scan.occupiedChannels[sessionId].numChannels = 0;
csrLLLock(&pMac->scan.scanResultList);
pEntry = csrLLPeekHead( &pMac->scan.scanResultList, LL_ACCESS_NOLOCK );
@@ -8490,7 +8519,9 @@ void csrInitOccupiedChannelsList(tpAniSirGlobal pMac)
continue;
}
- csrScanAddToOccupiedChannels(pMac, pBssDesc, &pMac->scan.occupiedChannels, pIes);
+ csrScanAddToOccupiedChannels(pMac, pBssDesc, sessionId,
+ &pMac->scan.occupiedChannels[sessionId],
+ pIes);
/*
* Free the memory allocated for pIes in csrGetParsedBssDescriptionIEs
@@ -8503,7 +8534,6 @@ void csrInitOccupiedChannelsList(tpAniSirGlobal pMac)
pEntry = csrLLNext( &pMac->scan.scanResultList, pEntry, LL_ACCESS_NOLOCK );
}//while
csrLLUnlock(&pMac->scan.scanResultList);
-
}
#endif
@@ -8562,10 +8592,9 @@ eHalStatus csrScanCreateEntryInScanCache(tpAniSirGlobal pMac, tANI_U32 sessionId
//change the BSSID & channel as passed
vos_mem_copy(pNewBssDescriptor->bssId, bssid, sizeof(tSirMacAddr));
pNewBssDescriptor->channelId = channel;
- if(NULL == csrScanAppendBssDescription( pMac, pNewBssDescriptor, pNewIes, TRUE ))
- {
- smsLog(pMac, LOGE, FL("%s: csrScanAppendBssDescription failed"),
- __func__);
+ if (NULL == csrScanAppendBssDescription(pMac, pNewBssDescriptor,
+ pNewIes, TRUE, sessionId)) {
+ smsLog(pMac, LOGE, FL("csrScanAppendBssDescription failed"));
status = eHAL_STATUS_FAILURE;
break;
}
diff --git a/CORE/SME/src/csr/csrCmdProcess.c b/CORE/SME/src/csr/csrCmdProcess.c
index 9e6cdb3da86c..dd3b97fe0126 100644
--- a/CORE/SME/src/csr/csrCmdProcess.c
+++ b/CORE/SME/src/csr/csrCmdProcess.c
@@ -54,11 +54,11 @@ eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
#endif
smsLog(pMac, LOG2, FL("Message %d[0x%04X] received in curState %s"
- " and substate %s"),
+ " and substate %s sessionId (%d)"),
pSmeRsp->messageType, pSmeRsp->messageType,
macTraceGetcsrRoamState(pMac->roam.curState[pSmeRsp->sessionId]),
macTraceGetcsrRoamSubState(
- pMac->roam.curSubState[pSmeRsp->sessionId]));
+ pMac->roam.curSubState[pSmeRsp->sessionId]), pSmeRsp->sessionId);
#ifdef FEATURE_WLAN_SCAN_PNO
/*
diff --git a/CORE/SME/src/csr/csrInsideApi.h b/CORE/SME/src/csr/csrInsideApi.h
index d6fc72f0cbc4..f3a3410703a3 100644
--- a/CORE/SME/src/csr/csrInsideApi.h
+++ b/CORE/SME/src/csr/csrInsideApi.h
@@ -247,9 +247,11 @@ eHalStatus csrScanRequestLostLink3( tpAniSirGlobal pMac, tANI_U32 sessionId );
eHalStatus csrScanHandleFailedLostlink1(tpAniSirGlobal pMac, tANI_U32 sessionId);
eHalStatus csrScanHandleFailedLostlink2(tpAniSirGlobal pMac, tANI_U32 sessionId);
eHalStatus csrScanHandleFailedLostlink3(tpAniSirGlobal pMac, tANI_U32 sessionId);
-tCsrScanResult *csrScanAppendBssDescription( tpAniSirGlobal pMac,
- tSirBssDescription *pSirBssDescription,
- tDot11fBeaconIEs *pIes, tANI_BOOLEAN fForced);
+tCsrScanResult *csrScanAppendBssDescription(tpAniSirGlobal pMac,
+ tSirBssDescription *pSirBssDescription,
+ tDot11fBeaconIEs *pIes,
+ tANI_BOOLEAN fForced,
+ tANI_U8 sessionId);
void csrScanCallCallback(tpAniSirGlobal pMac, tSmeCmd *pCommand, eCsrScanStatus scanStatus);
eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCsrScanRequest *pSrcReq);
eHalStatus csrScanFreeRequest(tpAniSirGlobal pMac, tCsrScanRequest *pReq);
@@ -481,9 +483,11 @@ eHalStatus csrScanGetResult(tpAniSirGlobal, tCsrScanResultFilter *pFilter, tScan
/* ---------------------------------------------------------------------------
\fn csrScanFlushResult
\brief Clear scan results.
+ \param pMac - pMac global pointer
+ \param sessionId - Session Identifier
\return eHalStatus
-------------------------------------------------------------------------------*/
-eHalStatus csrScanFlushResult(tpAniSirGlobal);
+eHalStatus csrScanFlushResult(tpAniSirGlobal, tANI_U8 sessionId);
/* ---------------------------------------------------------------------------
* \fn csrScanFilterResults
* \brief Filter scan results based on valid channel list.
@@ -1002,9 +1006,12 @@ eHalStatus csrRoamEnqueuePreauth(tpAniSirGlobal pMac, tANI_U32 sessionId, tpSirB
eCsrRoamReason reason, tANI_BOOLEAN fImmediate);
eHalStatus csrDequeueRoamCommand(tpAniSirGlobal pMac, eCsrRoamReason reason);
#ifdef FEATURE_WLAN_LFR
-void csrInitOccupiedChannelsList(tpAniSirGlobal pMac);
-tANI_BOOLEAN csrNeighborRoamIsNewConnectedProfile(tpAniSirGlobal pMac);
-tANI_BOOLEAN csrNeighborRoamConnectedProfileMatch(tpAniSirGlobal pMac, tCsrScanResult *pResult,
+void csrInitOccupiedChannelsList(tpAniSirGlobal pMac, tANI_U8 sessionId);
+tANI_BOOLEAN csrNeighborRoamIsNewConnectedProfile(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
+tANI_BOOLEAN csrNeighborRoamConnectedProfileMatch(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ tCsrScanResult *pResult,
tDot11fBeaconIEs *pIes);
#endif
eHalStatus csrSetTxPower(tpAniSirGlobal pMac, v_U8_t sessionId, v_U8_t mW);
diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c
index 625fa03a6681..1274cd4fabd6 100644
--- a/CORE/SME/src/csr/csrNeighborRoam.c
+++ b/CORE/SME/src/csr/csrNeighborRoam.c
@@ -78,22 +78,27 @@
#endif
static void csrNeighborRoamResetChannelInfo(tpCsrNeighborRoamChannelInfo rChInfo);
-static void csrNeighborRoamResetCfgListChanScanControlInfo(tpAniSirGlobal pMac);
-static void csrNeighborRoamResetPreauthControlInfo(tpAniSirGlobal pMac);
-static void csrNeighborRoamDeregAllRssiIndication(tpAniSirGlobal pMac);
+static void csrNeighborRoamResetCfgListChanScanControlInfo(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
+static void csrNeighborRoamResetPreauthControlInfo(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
+static void csrNeighborRoamDeregAllRssiIndication(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
VOS_STATUS csrNeighborRoamNeighborLookupUPCallback (v_PVOID_t pAdapter, v_U8_t rssiNotification,
- v_PVOID_t pUserCtxt,
- v_S7_t avgRssi);
+ v_PVOID_t pUserCtxt,
+ v_S7_t avgRssi);
VOS_STATUS csrNeighborRoamNeighborLookupDOWNCallback (v_PVOID_t pAdapter, v_U8_t rssiNotification,
- v_PVOID_t pUserCtxt,
- v_S7_t avgRssi);
+ v_PVOID_t pUserCtxt,
+ v_S7_t avgRssi);
void csrNeighborRoamRRMNeighborReportResult(void *context, VOS_STATUS vosStatus);
eHalStatus csrRoamCopyConnectedProfile(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pDstProfile );
#ifdef WLAN_FEATURE_VOWIFI_11R
-static eHalStatus csrNeighborRoamIssuePreauthReq(tpAniSirGlobal pMac);
-VOS_STATUS csrNeighborRoamIssueNeighborRptRequest(tpAniSirGlobal pMac);
+static eHalStatus csrNeighborRoamIssuePreauthReq(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
+VOS_STATUS csrNeighborRoamIssueNeighborRptRequest(tpAniSirGlobal pMac,
+ tANI_U8 sessionId);
#endif
v_U8_t *csrNeighborRoamStateToString(v_U8_t state)
@@ -116,14 +121,17 @@ v_U8_t *csrNeighborRoamStateToString(v_U8_t state)
}
/* State Transition macro */
-#define CSR_NEIGHBOR_ROAM_STATE_TRANSITION(newState)\
+#define CSR_NEIGHBOR_ROAM_STATE_TRANSITION(newState, sessionId)\
{\
- pMac->roam.neighborRoamInfo.prevNeighborRoamState = pMac->roam.neighborRoamInfo.neighborRoamState;\
- pMac->roam.neighborRoamInfo.neighborRoamState = newState;\
+ pMac->roam.neighborRoamInfo[sessionId].prevNeighborRoamState = \
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState;\
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState = newState;\
VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, \
- FL("Neighbor Roam Transition from state %s ==> %s"), \
- csrNeighborRoamStateToString (pMac->roam.neighborRoamInfo.prevNeighborRoamState), \
- csrNeighborRoamStateToString (newState));\
+ FL("Session id(%d) Neighbor Roam Transition from state %s ==> %s"), \
+ sessionId, \
+ csrNeighborRoamStateToString ( \
+ pMac->roam.neighborRoamInfo[sessionId].prevNeighborRoamState), \
+ csrNeighborRoamStateToString (newState));\
}
/* ---------------------------------------------------------------------------
@@ -247,8 +255,10 @@ void csrNeighborRoamFreeRoamableBSSList(tpAniSirGlobal pMac, tDblLinkList *pList
}
static void csrNeighborRoamTriggerHandoff(tpAniSirGlobal pMac,
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo)
+ tANI_U8 sessionId)
{
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
#ifdef WLAN_FEATURE_VOWIFI_11R
if ((pNeighborRoamInfo->is11rAssoc)
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -259,7 +269,7 @@ static void csrNeighborRoamTriggerHandoff(tpAniSirGlobal pMac,
if ((eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN == pNeighborRoamInfo->neighborRoamState) ||
(eSME_ROAM_TRIGGER_FAST_ROAM == pNeighborRoamInfo->cfgRoamEn))
{
- csrNeighborRoamIssuePreauthReq(pMac);
+ csrNeighborRoamIssuePreauthReq(pMac, sessionId);
pNeighborRoamInfo->cfgRoamEn = eSME_ROAM_TRIGGER_NONE;
vos_mem_set(&pNeighborRoamInfo->cfgRoambssId[0],
sizeof(pNeighborRoamInfo->cfgRoambssId),
@@ -285,7 +295,7 @@ static void csrNeighborRoamTriggerHandoff(tpAniSirGlobal pMac,
{
if (eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN == pNeighborRoamInfo->neighborRoamState)
{
- csrNeighborRoamIssuePreauthReq(pMac);
+ csrNeighborRoamIssuePreauthReq(pMac, sessionId);
}
else
{
@@ -298,7 +308,7 @@ static void csrNeighborRoamTriggerHandoff(tpAniSirGlobal pMac,
else
#endif
#ifdef FEATURE_WLAN_LFR
- if (csrRoamIsFastRoamEnabled(pMac, CSR_SESSION_ID_INVALID))
+ if (csrRoamIsFastRoamEnabled(pMac, sessionId))
{
if ((eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN == pNeighborRoamInfo->neighborRoamState)
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -307,7 +317,7 @@ static void csrNeighborRoamTriggerHandoff(tpAniSirGlobal pMac,
#endif
)
{
- csrNeighborRoamIssuePreauthReq(pMac);
+ csrNeighborRoamIssuePreauthReq(pMac, sessionId);
pNeighborRoamInfo->cfgRoamEn = eSME_ROAM_TRIGGER_NONE;
vos_mem_set(&pNeighborRoamInfo->cfgRoambssId[0],
sizeof(pNeighborRoamInfo->cfgRoambssId),
@@ -326,7 +336,7 @@ static void csrNeighborRoamTriggerHandoff(tpAniSirGlobal pMac,
{
if (eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN == pNeighborRoamInfo->neighborRoamState)
{
- csrNeighborRoamRequestHandoff(pMac);
+ csrNeighborRoamRequestHandoff(pMac, sessionId);
}
else
{
@@ -337,10 +347,15 @@ static void csrNeighborRoamTriggerHandoff(tpAniSirGlobal pMac,
}
}
-VOS_STATUS csrNeighborRoamUpdateFastRoamingEnabled(tpAniSirGlobal pMac, const v_BOOL_t fastRoamEnabled)
+VOS_STATUS
+csrNeighborRoamUpdateFastRoamingEnabled(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ const v_BOOL_t fastRoamEnabled)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
+ tpFTRoamCallbackUsrCtx pUsrCtx;
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED == pNeighborRoamInfo->neighborRoamState)
{
@@ -349,21 +364,37 @@ VOS_STATUS csrNeighborRoamUpdateFastRoamingEnabled(tpAniSirGlobal pMac, const v_
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_START, REASON_CONNECT);
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_START,
+ REASON_CONNECT);
} else {
#endif
- NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Registering neighbor lookup DOWN event with TL, RSSI = %d"),
- pNeighborRoamInfo->currentNeighborLookupThreshold);
- /* Register Neighbor Lookup threshold callback with TL for DOWN event only */
- vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext, (v_S7_t)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1),
- WLANTL_HO_THRESHOLD_DOWN,
- csrNeighborRoamNeighborLookupDOWNCallback,
- VOS_MODULE_ID_SME, pMac);
- if (!VOS_IS_STATUS_SUCCESS(vosStatus))
- {
- //err msg
- smsLog(pMac, LOGW, FL(" Couldn't register csrNeighborRoamNeighborLookupDOWNCallback with TL: Status = %d"),
+ NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Registering neighbor lookup "
+ "DOWN event with TL, RSSI = %d"),
+ pNeighborRoamInfo->currentNeighborLookupThreshold);
+
+ /* Both pMac and sessionId are required to identify for which
+ * session the indication is being received
+ */
+ pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx));
+ if (NULL == pUsrCtx) {
+ smsLog(pMac, LOGE, FL("Memory allocation failure"));
+ return VOS_STATUS_E_NOMEM;
+ }
+ pUsrCtx->pMac = pMac;
+ pUsrCtx->sessionId = sessionId;
+
+ /* Register Neighbor Lookup threshold callback with TL for
+ DOWN event only */
+ vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext,
+ (v_S7_t)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1),
+ WLANTL_HO_THRESHOLD_DOWN,
+ csrNeighborRoamNeighborLookupDOWNCallback,
+ VOS_MODULE_ID_SME, pUsrCtx);
+ if (!VOS_IS_STATUS_SUCCESS(vosStatus)) {
+ smsLog(pMac, LOGW,
+ FL("Failed to register RSSI indication callback = %d"),
vosStatus);
+ vos_mem_free(pUsrCtx);
vosStatus = VOS_STATUS_E_FAILURE;
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -377,10 +408,11 @@ VOS_STATUS csrNeighborRoamUpdateFastRoamingEnabled(tpAniSirGlobal pMac, const v_
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_STOP, REASON_DISCONNECTED);
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_STOP,
+ REASON_DISCONNECTED);
} else {
#endif
- csrNeighborRoamDeregAllRssiIndication(pMac);
+ csrNeighborRoamDeregAllRssiIndication(pMac, sessionId);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
}
#endif
@@ -402,32 +434,52 @@ VOS_STATUS csrNeighborRoamUpdateFastRoamingEnabled(tpAniSirGlobal pMac, const v_
}
#ifdef FEATURE_WLAN_ESE
-VOS_STATUS csrNeighborRoamUpdateEseModeEnabled(tpAniSirGlobal pMac, const v_BOOL_t eseMode)
+VOS_STATUS csrNeighborRoamUpdateEseModeEnabled(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ const v_BOOL_t eseMode)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED == pNeighborRoamInfo->neighborRoamState)
{
if (VOS_TRUE == eseMode)
{
- NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Registering neighbor lookup DOWN event with TL, RSSI = %d"),
- pNeighborRoamInfo->currentNeighborLookupThreshold);
+ NEIGHBOR_ROAM_DEBUG(pMac, LOG2,
+ FL("Registering neighbor lookup DOWN event with TL, RSSI = %d"),
+ pNeighborRoamInfo->currentNeighborLookupThreshold);
+
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_START, REASON_CONNECT);
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_START,
+ REASON_CONNECT);
} else {
#endif
+ /* This user context data will be returned with callback */
+ pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx));
+ if (NULL == pUsrCtx) {
+ smsLog(pMac, LOGE, FL("Memory allocation failure"));
+ return VOS_STATUS_E_NOMEM;
+ }
+ pUsrCtx->pMac = pMac;
+ pUsrCtx->sessionId = sessionId;
+
/* Register Neighbor Lookup threshold callback with TL for DOWN event only */
- vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext, (v_S7_t)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1),
- WLANTL_HO_THRESHOLD_DOWN,
- csrNeighborRoamNeighborLookupDOWNCallback,
- VOS_MODULE_ID_SME, pMac);
- if (!VOS_IS_STATUS_SUCCESS(vosStatus))
- {
- //err msg
- smsLog(pMac, LOGW, FL(" Couldn't register csrNeighborRoamNeighborLookupDOWNCallback with TL: Status = %d"), vosStatus);
+ vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext,
+ (v_S7_t)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1),
+ WLANTL_HO_THRESHOLD_DOWN,
+ csrNeighborRoamNeighborLookupDOWNCallback,
+ VOS_MODULE_ID_SME, pUsrCtx);
+
+ if (!VOS_IS_STATUS_SUCCESS(vosStatus)) {
+ smsLog(pMac, LOGW,
+ FL("Failed to register RSSI indication callback: Status = %d"),
+ vosStatus);
+
+ /* Registration failed, freeup user context */
+ vos_mem_free(pUsrCtx);
vosStatus = VOS_STATUS_E_FAILURE;
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -436,27 +488,34 @@ VOS_STATUS csrNeighborRoamUpdateEseModeEnabled(tpAniSirGlobal pMac, const v_BOOL
}
else if (VOS_FALSE == eseMode)
{
- NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Currently in CONNECTED state, so deregister all events"));
+ NEIGHBOR_ROAM_DEBUG(pMac, LOG2,
+ FL("Currently in CONNECTED state, so deregister all events"));
+
/* De-register existing lookup UP/DOWN, Rssi indications */
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_STOP, REASON_DISCONNECTED);
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_STOP,
+ REASON_DISCONNECTED);
} else {
#endif
- csrNeighborRoamDeregAllRssiIndication(pMac);
+ csrNeighborRoamDeregAllRssiIndication(pMac, sessionId);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
}
#endif
}
}
- else if (eCSR_NEIGHBOR_ROAM_STATE_INIT == pNeighborRoamInfo->neighborRoamState)
+ else if (eCSR_NEIGHBOR_ROAM_STATE_INIT ==
+ pNeighborRoamInfo->neighborRoamState)
{
- NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Currently in INIT state, Nothing to do"));
+ NEIGHBOR_ROAM_DEBUG(pMac, LOG2,
+ FL("Currently in INIT state, Nothing to do"));
}
else
{
- NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("Unexpected state %d, returning failure"), pNeighborRoamInfo->neighborRoamState);
+ NEIGHBOR_ROAM_DEBUG(pMac, LOGE,
+ FL("Unexpected state %d, returning failure"),
+ pNeighborRoamInfo->neighborRoamState);
vosStatus = VOS_STATUS_E_FAILURE;
}
return vosStatus;
@@ -465,42 +524,65 @@ VOS_STATUS csrNeighborRoamUpdateEseModeEnabled(tpAniSirGlobal pMac, const v_BOOL
#endif
-VOS_STATUS csrNeighborRoamSetLookupRssiThreshold(tpAniSirGlobal pMac, v_U8_t neighborLookupRssiThreshold)
+VOS_STATUS csrNeighborRoamSetLookupRssiThreshold(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ v_U8_t neighborLookupRssiThreshold)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
+ tpFTRoamCallbackUsrCtx pUsrCtx;
- if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED == pNeighborRoamInfo->neighborRoamState)
+ if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED ==
+ pNeighborRoamInfo->neighborRoamState)
{
- NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Currently in CONNECTED state, so deregister all and re-register for DOWN event again"));
+ NEIGHBOR_ROAM_DEBUG(pMac, LOG2,
+ FL("In CONNECTED state, re-register for DOWN event only"));
- pMac->roam.neighborRoamInfo.cfgParams.neighborLookupThreshold = neighborLookupRssiThreshold;
- pNeighborRoamInfo->currentNeighborLookupThreshold = pMac->roam.neighborRoamInfo.cfgParams.neighborLookupThreshold;
+ pNeighborRoamInfo->cfgParams.neighborLookupThreshold =
+ neighborLookupRssiThreshold;
+ pNeighborRoamInfo->currentNeighborLookupThreshold =
+ pNeighborRoamInfo->cfgParams.neighborLookupThreshold;
/* De-register existing lookup UP/DOWN, Rssi indications */
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG, REASON_LOOKUP_THRESH_CHANGED);
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ REASON_LOOKUP_THRESH_CHANGED);
}
else
{
#endif
- csrNeighborRoamDeregAllRssiIndication(pMac);
+ csrNeighborRoamDeregAllRssiIndication(pMac, sessionId);
+
+ /* This user context data will be returned with callback */
+ pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx));
+ if (NULL == pUsrCtx) {
+ smsLog(pMac, LOGE, FL("Memory allocation failure"));
+ return VOS_STATUS_E_NOMEM;
+ }
+ pUsrCtx->pMac = pMac;
+ pUsrCtx->sessionId = sessionId;
NEIGHBOR_ROAM_DEBUG(pMac, LOG2,
FL("Registering neighbor lookup DOWN event with TL, RSSI = %d"),
pNeighborRoamInfo->currentNeighborLookupThreshold);
+
/* Register Neighbor Lookup threshold callback with TL for DOWN event only */
vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext,
- (v_S7_t)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1),
+ (v_S7_t)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1),
WLANTL_HO_THRESHOLD_DOWN,
csrNeighborRoamNeighborLookupDOWNCallback,
- VOS_MODULE_ID_SME, pMac);
- if (!VOS_IS_STATUS_SUCCESS(vosStatus))
- {
- //err msg
- smsLog(pMac, LOGE, FL(" Couldn't register csrNeighborRoamNeighborLookupDOWNCallback with TL: Status = %d"), vosStatus);
+ VOS_MODULE_ID_SME, pUsrCtx);
+
+ if (!VOS_IS_STATUS_SUCCESS(vosStatus)) {
+ smsLog(pMac, LOGE,
+ FL("Failed to register DOWN event with TL: Status = %d"),
+ vosStatus);
+
+ /* Registration failed, freeup user context as well */
+ vos_mem_free(pUsrCtx);
vosStatus = VOS_STATUS_E_FAILURE;
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -509,9 +591,12 @@ VOS_STATUS csrNeighborRoamSetLookupRssiThreshold(tpAniSirGlobal pMac, v_U8_t nei
}
else if (eCSR_NEIGHBOR_ROAM_STATE_INIT == pNeighborRoamInfo->neighborRoamState)
{
- NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Currently in INIT state, safe to set lookupRssi threshold"));
- pMac->roam.neighborRoamInfo.cfgParams.neighborLookupThreshold = neighborLookupRssiThreshold;
- pNeighborRoamInfo->currentNeighborLookupThreshold = pMac->roam.neighborRoamInfo.cfgParams.neighborLookupThreshold;
+ NEIGHBOR_ROAM_DEBUG(pMac, LOG2,
+ FL("Currently in INIT state, safe to set lookupRssi threshold"));
+ pNeighborRoamInfo->cfgParams.neighborLookupThreshold =
+ neighborLookupRssiThreshold;
+ pNeighborRoamInfo->currentNeighborLookupThreshold =
+ pNeighborRoamInfo->cfgParams.neighborLookupThreshold;
}
else
{
@@ -525,20 +610,24 @@ VOS_STATUS csrNeighborRoamSetLookupRssiThreshold(tpAniSirGlobal pMac, v_U8_t nei
VOS_STATUS
csrNeighborRoamSetOpportunisticScanThresholdDiff(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
v_U8_t nOpportunisticThresholdDiff)
{
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED
- == pMac->roam.neighborRoamInfo.neighborRoamState)
+ == pNeighborRoamInfo->neighborRoamState)
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOG2,
- FL("Currently in CONNECTED state, so deregister all and re-register for DOWN event again"));
+ FL("Currently in CONNECTED state, so deregister "
+ "all and re-register for DOWN event again"));
- pMac->roam.neighborRoamInfo.cfgParams.nOpportunisticThresholdDiff =
+ pNeighborRoamInfo->cfgParams.nOpportunisticThresholdDiff =
nOpportunisticThresholdDiff;
- pMac->roam.neighborRoamInfo.currentOpportunisticThresholdDiff =
+ pNeighborRoamInfo->currentOpportunisticThresholdDiff =
nOpportunisticThresholdDiff;
/* De-register existing lookup UP/DOWN, Rssi indications */
@@ -546,20 +635,22 @@ csrNeighborRoamSetOpportunisticScanThresholdDiff(tpAniSirGlobal pMac,
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
csrRoamOffloadScan(pMac,
+ sessionId,
ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_OPPORTUNISTIC_THRESH_DIFF_CHANGED);
}
#endif
}
else if (eCSR_NEIGHBOR_ROAM_STATE_INIT
- == pMac->roam.neighborRoamInfo.neighborRoamState)
+ == pNeighborRoamInfo->neighborRoamState)
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOG2,
- FL("Currently in INIT state, safe to set opportunistic threshold diff"));
- pMac->roam.neighborRoamInfo.cfgParams.nOpportunisticThresholdDiff =
+ FL("Currently in INIT state, safe to set "
+ "opportunistic threshold diff"));
+ pNeighborRoamInfo->cfgParams.nOpportunisticThresholdDiff =
nOpportunisticThresholdDiff;
- pMac->roam.neighborRoamInfo.currentOpportunisticThresholdDiff =
+ pNeighborRoamInfo->currentOpportunisticThresholdDiff =
nOpportunisticThresholdDiff;
}
else
@@ -567,7 +658,7 @@ csrNeighborRoamSetOpportunisticScanThresholdDiff(tpAniSirGlobal pMac,
NEIGHBOR_ROAM_DEBUG(pMac,
LOGE,
FL("Unexpected state %d returning failure"),
- pMac->roam.neighborRoamInfo.neighborRoamState);
+ pNeighborRoamInfo->neighborRoamState);
vosStatus = VOS_STATUS_E_FAILURE;
}
return vosStatus;
@@ -575,20 +666,24 @@ csrNeighborRoamSetOpportunisticScanThresholdDiff(tpAniSirGlobal pMac,
VOS_STATUS
csrNeighborRoamSetRoamRescanRssiDiff(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
v_U8_t nRoamRescanRssiDiff)
{
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED
- == pMac->roam.neighborRoamInfo.neighborRoamState)
+ == pNeighborRoamInfo->neighborRoamState)
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOG2,
- FL("Currently in CONNECTED state, so deregister all and re-register for DOWN event again"));
+ FL("Currently in CONNECTED state, so deregister "
+ "all and re-register for DOWN event again"));
- pMac->roam.neighborRoamInfo.cfgParams.nRoamRescanRssiDiff =
+ pNeighborRoamInfo->cfgParams.nRoamRescanRssiDiff =
nRoamRescanRssiDiff;
- pMac->roam.neighborRoamInfo.currentRoamRescanRssiDiff =
+ pNeighborRoamInfo->currentRoamRescanRssiDiff =
nRoamRescanRssiDiff;
/* De-register existing lookup UP/DOWN, Rssi indications */
@@ -596,28 +691,29 @@ csrNeighborRoamSetRoamRescanRssiDiff(tpAniSirGlobal pMac,
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
csrRoamOffloadScan(pMac,
+ sessionId,
ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_ROAM_RESCAN_RSSI_DIFF_CHANGED);
}
#endif
}
else if (eCSR_NEIGHBOR_ROAM_STATE_INIT
- == pMac->roam.neighborRoamInfo.neighborRoamState)
+ == pNeighborRoamInfo->neighborRoamState)
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOG2,
- FL("Currently in INIT state, safe to set roam rescan rssi diff"));
- pMac->roam.neighborRoamInfo.cfgParams.nRoamRescanRssiDiff =
- nRoamRescanRssiDiff;
- pMac->roam.neighborRoamInfo.currentRoamRescanRssiDiff =
+ FL("Currently in INIT state, safe to set roam "
+ "rescan rssi diff"));
+ pNeighborRoamInfo->cfgParams.nRoamRescanRssiDiff =
nRoamRescanRssiDiff;
+ pNeighborRoamInfo->currentRoamRescanRssiDiff = nRoamRescanRssiDiff;
}
else
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOGE,
FL("Unexpected state %d returning failure"),
- pMac->roam.neighborRoamInfo.neighborRoamState);
+ pNeighborRoamInfo->neighborRoamState);
vosStatus = VOS_STATUS_E_FAILURE;
}
return vosStatus;
@@ -625,49 +721,51 @@ csrNeighborRoamSetRoamRescanRssiDiff(tpAniSirGlobal pMac,
VOS_STATUS
csrNeighborRoamSetRoamBmissFirstBcnt(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
v_U8_t nRoamBmissFirstBcnt)
{
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED
- == pMac->roam.neighborRoamInfo.neighborRoamState)
+ == pNeighborRoamInfo->neighborRoamState)
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOG2,
FL("Currently in CONNECTED state, so deregister all and re-register for DOWN event again"));
- pMac->roam.neighborRoamInfo.cfgParams.nRoamBmissFirstBcnt =
- nRoamBmissFirstBcnt;
- pMac->roam.neighborRoamInfo.currentRoamBmissFirstBcnt =
+ pNeighborRoamInfo->cfgParams.nRoamBmissFirstBcnt =
nRoamBmissFirstBcnt;
+ pNeighborRoamInfo->currentRoamBmissFirstBcnt = nRoamBmissFirstBcnt;
/* De-register existing lookup UP/DOWN, Rssi indications */
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
csrRoamOffloadScan(pMac,
+ sessionId,
ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_ROAM_BMISS_FIRST_BCNT_CHANGED);
}
#endif
}
else if (eCSR_NEIGHBOR_ROAM_STATE_INIT
- == pMac->roam.neighborRoamInfo.neighborRoamState)
+ == pNeighborRoamInfo->neighborRoamState)
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOG2,
FL("Currently in INIT state, safe to set roam rescan rssi diff"));
- pMac->roam.neighborRoamInfo.cfgParams.nRoamBmissFirstBcnt =
- nRoamBmissFirstBcnt;
- pMac->roam.neighborRoamInfo.currentRoamBmissFirstBcnt =
+ pNeighborRoamInfo->cfgParams.nRoamBmissFirstBcnt =
nRoamBmissFirstBcnt;
+ pNeighborRoamInfo->currentRoamBmissFirstBcnt = nRoamBmissFirstBcnt;
}
else
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOGE,
FL("Unexpected state %d returning failure"),
- pMac->roam.neighborRoamInfo.neighborRoamState);
+ pNeighborRoamInfo->neighborRoamState);
vosStatus = VOS_STATUS_E_FAILURE;
}
return vosStatus;
@@ -675,49 +773,50 @@ csrNeighborRoamSetRoamBmissFirstBcnt(tpAniSirGlobal pMac,
VOS_STATUS
csrNeighborRoamSetRoamBmissFinalBcnt(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
v_U8_t nRoamBmissFinalBcnt)
{
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED
- == pMac->roam.neighborRoamInfo.neighborRoamState)
+ == pNeighborRoamInfo->neighborRoamState)
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOG2,
FL("Currently in CONNECTED state, so deregister all and re-register for DOWN event again"));
- pMac->roam.neighborRoamInfo.cfgParams.nRoamBmissFinalBcnt =
- nRoamBmissFinalBcnt;
- pMac->roam.neighborRoamInfo.currentRoamBmissFinalBcnt =
+ pNeighborRoamInfo->cfgParams.nRoamBmissFinalBcnt =
nRoamBmissFinalBcnt;
+ pNeighborRoamInfo->currentRoamBmissFinalBcnt = nRoamBmissFinalBcnt;
/* De-register existing lookup UP/DOWN, Rssi indications */
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac,
+ csrRoamOffloadScan(pMac, sessionId,
ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_ROAM_BMISS_FINAL_BCNT_CHANGED);
}
#endif
}
else if (eCSR_NEIGHBOR_ROAM_STATE_INIT
- == pMac->roam.neighborRoamInfo.neighborRoamState)
+ == pNeighborRoamInfo->neighborRoamState)
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOG2,
FL("Currently in INIT state, safe to set roam rescan rssi diff"));
- pMac->roam.neighborRoamInfo.cfgParams.nRoamBmissFinalBcnt =
- nRoamBmissFinalBcnt;
- pMac->roam.neighborRoamInfo.currentRoamBmissFinalBcnt =
+ pNeighborRoamInfo->cfgParams.nRoamBmissFinalBcnt =
nRoamBmissFinalBcnt;
+ pNeighborRoamInfo->currentRoamBmissFinalBcnt = nRoamBmissFinalBcnt;
}
else
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOGE,
FL("Unexpected state %d returning failure"),
- pMac->roam.neighborRoamInfo.neighborRoamState);
+ pNeighborRoamInfo->neighborRoamState);
vosStatus = VOS_STATUS_E_FAILURE;
}
return vosStatus;
@@ -725,41 +824,43 @@ csrNeighborRoamSetRoamBmissFinalBcnt(tpAniSirGlobal pMac,
VOS_STATUS
csrNeighborRoamSetRoamBeaconRssiWeight(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
v_U8_t nRoamBeaconRssiWeight)
{
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED
- == pMac->roam.neighborRoamInfo.neighborRoamState)
+ == pNeighborRoamInfo->neighborRoamState)
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOG2,
FL("Currently in CONNECTED state, so deregister all and re-register for DOWN event again"));
- pMac->roam.neighborRoamInfo.cfgParams.nRoamBeaconRssiWeight =
- nRoamBeaconRssiWeight;
- pMac->roam.neighborRoamInfo.currentRoamBeaconRssiWeight =
+ pNeighborRoamInfo->cfgParams.nRoamBeaconRssiWeight =
nRoamBeaconRssiWeight;
+ pNeighborRoamInfo->currentRoamBeaconRssiWeight = nRoamBeaconRssiWeight;
/* De-register existing lookup UP/DOWN, Rssi indications */
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac,
+ csrRoamOffloadScan(pMac, sessionId,
ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_ROAM_BEACON_RSSI_WEIGHT_CHANGED);
}
#endif
}
else if (eCSR_NEIGHBOR_ROAM_STATE_INIT
- == pMac->roam.neighborRoamInfo.neighborRoamState)
+ == pNeighborRoamInfo->neighborRoamState)
{
NEIGHBOR_ROAM_DEBUG(pMac,
LOG2,
FL("Currently in INIT state, safe to set roam rescan rssi diff"));
- pMac->roam.neighborRoamInfo.cfgParams.nRoamBeaconRssiWeight =
+ pNeighborRoamInfo->cfgParams.nRoamBeaconRssiWeight =
nRoamBeaconRssiWeight;
- pMac->roam.neighborRoamInfo.currentRoamBeaconRssiWeight =
+ pNeighborRoamInfo->currentRoamBeaconRssiWeight =
nRoamBeaconRssiWeight;
}
else
@@ -767,7 +868,7 @@ csrNeighborRoamSetRoamBeaconRssiWeight(tpAniSirGlobal pMac,
NEIGHBOR_ROAM_DEBUG(pMac,
LOGE,
FL("Unexpected state %d returning failure"),
- pMac->roam.neighborRoamInfo.neighborRoamState);
+ pNeighborRoamInfo->neighborRoamState);
vosStatus = VOS_STATUS_E_FAILURE;
}
return vosStatus;
@@ -792,20 +893,26 @@ VOS_STATUS csrNeighborRoamReassocIndCallback(v_PVOID_t pAdapter,
v_PVOID_t pUserCtxt,
v_S7_t avgRssi)
{
- tpAniSirGlobal pMac = PMAC_STRUCT( pUserCtxt );
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tFTRoamCallbackUsrCtx *pUsrCtx = (tFTRoamCallbackUsrCtx *)pUserCtxt;
+ tANI_U8 sessionId = pUsrCtx->sessionId;
+ tpAniSirGlobal pMac = pUsrCtx->pMac;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
if (eSME_ROAM_TRIGGER_FAST_ROAM != pNeighborRoamInfo->cfgRoamEn)
{
- NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Deregistering DOWN event reassoc callback with TL. Threshold RSSI = %d Reported RSSI = %d"),
- pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1),
- avgRssi);
+ NEIGHBOR_ROAM_DEBUG(pMac, LOG2,
+ FL("Deregistering DOWN event reassoc callback with TL. "
+ "Threshold RSSI = %d Reported RSSI = %d"),
+ pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1),
+ avgRssi);
- vosStatus = WLANTL_DeregRSSIIndicationCB(pMac->roam.gVosContext, (v_S7_t)pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1),
- WLANTL_HO_THRESHOLD_DOWN,
- csrNeighborRoamReassocIndCallback,
- VOS_MODULE_ID_SME);
+ vosStatus = WLANTL_DeregRSSIIndicationCB(pMac->roam.gVosContext,
+ (v_S7_t)pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1),
+ WLANTL_HO_THRESHOLD_DOWN,
+ csrNeighborRoamReassocIndCallback,
+ VOS_MODULE_ID_SME);
if(!VOS_IS_STATUS_SUCCESS(vosStatus))
{
@@ -831,7 +938,8 @@ VOS_STATUS csrNeighborRoamReassocIndCallback(v_PVOID_t pAdapter,
vos_timer_stop(&pNeighborRoamInfo->neighborResultsRefreshTimer);
vos_timer_stop(&pNeighborRoamInfo->emptyScanRefreshTimer);
- csrNeighborRoamTriggerHandoff(pMac, pNeighborRoamInfo);
+ csrNeighborRoamTriggerHandoff(pMac, sessionId);
+ vos_mem_free(pUsrCtx);
return VOS_STATUS_SUCCESS;
}
@@ -858,60 +966,67 @@ static void csrNeighborRoamResetChannelInfo(tpCsrNeighborRoamChannelInfo rChInfo
}
}
-static void csrNeighborRoamResetCfgListChanScanControlInfo(tpAniSirGlobal pMac)
+static void csrNeighborRoamResetCfgListChanScanControlInfo(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
- /* Stop neighbor scan timer */
- vos_timer_stop(&pNeighborRoamInfo->neighborScanTimer);
+ /* Stop neighbor scan timer */
+ vos_timer_stop(&pNeighborRoamInfo->neighborScanTimer);
- /* Stop neighbor scan results refresh timer */
- vos_timer_stop(&pNeighborRoamInfo->neighborResultsRefreshTimer);
+ /* Stop neighbor scan results refresh timer */
+ vos_timer_stop(&pNeighborRoamInfo->neighborResultsRefreshTimer);
- /* Stop empty scan results refresh timer */
- vos_timer_stop(&pNeighborRoamInfo->emptyScanRefreshTimer);
+ /* Stop empty scan results refresh timer */
+ vos_timer_stop(&pNeighborRoamInfo->emptyScanRefreshTimer);
- /* Abort any ongoing scan */
- if (eANI_BOOLEAN_TRUE == pNeighborRoamInfo->scanRspPending)
- {
- csrScanAbortMacScan(pMac, pNeighborRoamInfo->csrSessionId,
- eCSR_SCAN_ABORT_DEFAULT);
- }
- pNeighborRoamInfo->scanRspPending = eANI_BOOLEAN_FALSE;
+ /* Abort any ongoing scan */
+ if (eANI_BOOLEAN_TRUE == pNeighborRoamInfo->scanRspPending)
+ {
+ csrScanAbortMacScan(pMac, pNeighborRoamInfo->csrSessionId,
+ eCSR_SCAN_ABORT_DEFAULT);
+ }
+ pNeighborRoamInfo->scanRspPending = eANI_BOOLEAN_FALSE;
- /* Reset roam channel list information */
- csrNeighborRoamResetChannelInfo(&pNeighborRoamInfo->roamChannelInfo);
+ /* Reset roam channel list information */
+ csrNeighborRoamResetChannelInfo(&pNeighborRoamInfo->roamChannelInfo);
}
-static void csrNeighborRoamResetPreauthControlInfo(tpAniSirGlobal pMac)
+static void csrNeighborRoamResetPreauthControlInfo(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
- pNeighborRoamInfo->is11rAssoc = eANI_BOOLEAN_FALSE;
- /* Purge pre-auth fail list */
- csrNeighborRoamPurgePreauthFailedList(pMac);
+ pNeighborRoamInfo->is11rAssoc = eANI_BOOLEAN_FALSE;
+ /* Purge pre-auth fail list */
+ csrNeighborRoamPurgePreauthFailedList(pMac);
#endif
- pNeighborRoamInfo->FTRoamInfo.preauthRspPending = eANI_BOOLEAN_FALSE;
- pNeighborRoamInfo->FTRoamInfo.numPreAuthRetries = 0;
+ pNeighborRoamInfo->FTRoamInfo.preauthRspPending = eANI_BOOLEAN_FALSE;
+ pNeighborRoamInfo->FTRoamInfo.numPreAuthRetries = 0;
#ifdef WLAN_FEATURE_VOWIFI_11R
- /* Do not free up the preauth done list here */
- pNeighborRoamInfo->FTRoamInfo.currentNeighborRptRetryNum = 0;
- pNeighborRoamInfo->FTRoamInfo.neighborRptPending = eANI_BOOLEAN_FALSE;
- pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport = 0;
- vos_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo, sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT);
+ /* Do not free up the preauth done list here */
+ pNeighborRoamInfo->FTRoamInfo.currentNeighborRptRetryNum = 0;
+ pNeighborRoamInfo->FTRoamInfo.neighborRptPending = eANI_BOOLEAN_FALSE;
+ pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport = 0;
+ vos_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo,
+ sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT);
#endif
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
pNeighborRoamInfo->uOsRequestedHandoff = 0;
- vos_mem_zero(&pNeighborRoamInfo->handoffReqInfo, sizeof(tCsrHandoffRequest));
+ vos_mem_zero(&pNeighborRoamInfo->handoffReqInfo,
+ sizeof(tCsrHandoffRequest));
#endif
-
}
-static void csrNeighborRoamDeregAllRssiIndication(tpAniSirGlobal pMac)
+static void csrNeighborRoamDeregAllRssiIndication(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
NEIGHBOR_ROAM_DEBUG(pMac, LOG2,
@@ -934,7 +1049,7 @@ static void csrNeighborRoamDeregAllRssiIndication(tpAniSirGlobal pMac)
NEIGHBOR_ROAM_DEBUG(pMac, LOG2,
FL("Deregistering reassoc DOWN callback with TL. RSSI = %d"),
- pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1));
+ pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1));
/* Deregister reassoc callback. Ignore return status */
vosStatus = WLANTL_DeregRSSIIndicationCB(pMac->roam.gVosContext,
@@ -997,13 +1112,16 @@ static void csrNeighborRoamDeregAllRssiIndication(tpAniSirGlobal pMac)
any state other than INIT state
\param pMac - The handle returned by macOpen.
+ \param sessionId - session id
\return VOID
---------------------------------------------------------------------------*/
-void csrNeighborRoamResetConnectedStateControlInfo(tpAniSirGlobal pMac)
+void csrNeighborRoamResetConnectedStateControlInfo(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
csrNeighborRoamResetChannelInfo(&pNeighborRoamInfo->roamChannelInfo);
csrNeighborRoamFreeRoamableBSSList(pMac, &pNeighborRoamInfo->roamableAPList);
@@ -1019,18 +1137,23 @@ void csrNeighborRoamResetConnectedStateControlInfo(tpAniSirGlobal pMac)
pNeighborRoamInfo->FTRoamInfo.numPreAuthRetries = 0;
pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport = 0;
pNeighborRoamInfo->FTRoamInfo.preauthRspPending = 0;
- vos_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo, sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT);
+ vos_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo,
+ sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT);
#endif
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
pNeighborRoamInfo->uOsRequestedHandoff = 0;
- vos_mem_zero(&pNeighborRoamInfo->handoffReqInfo, sizeof(tCsrHandoffRequest));
+ vos_mem_zero(&pNeighborRoamInfo->handoffReqInfo,
+ sizeof(tCsrHandoffRequest));
#endif
}
-void csrNeighborRoamResetReportScanStateControlInfo(tpAniSirGlobal pMac)
+void csrNeighborRoamResetReportScanStateControlInfo(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
- pNeighborRoamInfo->csrSessionId = CSR_SESSION_ID_INVALID;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
+ pNeighborRoamInfo->csrSessionId = CSR_SESSION_ID_INVALID;
+
vos_mem_set(pNeighborRoamInfo->currAPbssid, sizeof(tCsrBssid), 0);
pNeighborRoamInfo->neighborScanTimerInfo.pMac = pMac;
pNeighborRoamInfo->neighborScanTimerInfo.sessionId = CSR_SESSION_ID_INVALID;
@@ -1044,8 +1167,8 @@ void csrNeighborRoamResetReportScanStateControlInfo(tpAniSirGlobal pMac)
vos_timer_stop(&pNeighborRoamInfo->neighborResultsRefreshTimer);
/* Stop empty scan results refresh timer */
vos_timer_stop(&pNeighborRoamInfo->emptyScanRefreshTimer);
- /* Purge roamable AP list */
- csrNeighborRoamFreeRoamableBSSList(pMac, &pNeighborRoamInfo->roamableAPList);
+ /* Purge roamable AP list */
+ csrNeighborRoamFreeRoamableBSSList(pMac, &pNeighborRoamInfo->roamableAPList);
return;
}
@@ -1058,20 +1181,22 @@ void csrNeighborRoamResetReportScanStateControlInfo(tpAniSirGlobal pMac)
INIT state
\param pMac - The handle returned by macOpen.
+ \param sessionId - Session Id
\return VOID
---------------------------------------------------------------------------*/
-void csrNeighborRoamResetInitStateControlInfo(tpAniSirGlobal pMac)
+void csrNeighborRoamResetInitStateControlInfo(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- csrNeighborRoamResetConnectedStateControlInfo(pMac);
+ csrNeighborRoamResetConnectedStateControlInfo(pMac, sessionId);
- /* In addition to the above resets, we should clear off the curAPBssId/Session ID in the timers */
- csrNeighborRoamResetReportScanStateControlInfo(pMac);
+ /* In addition to the above resets,
+ we should clear off the curAPBssId/Session ID in the timers */
+ csrNeighborRoamResetReportScanStateControlInfo(pMac, sessionId);
}
-
#ifdef WLAN_FEATURE_VOWIFI_11R
/* ---------------------------------------------------------------------------
@@ -1090,9 +1215,12 @@ void csrNeighborRoamResetInitStateControlInfo(tpAniSirGlobal pMac)
code otherwise
---------------------------------------------------------------------------*/
-static eHalStatus csrNeighborRoamBssIdScanFilter(tpAniSirGlobal pMac, tCsrScanResultFilter *pScanFilter)
+static eHalStatus csrNeighborRoamBssIdScanFilter(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ tCsrScanResultFilter *pScanFilter)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tANI_U8 i = 0;
VOS_ASSERT(pScanFilter != NULL);
@@ -1111,14 +1239,14 @@ static eHalStatus csrNeighborRoamBssIdScanFilter(tpAniSirGlobal pMac, tCsrScanRe
vos_mem_zero(pScanFilter->BSSIDs.bssid, sizeof(tSirMacAddr) * pScanFilter->BSSIDs.numOfBSSIDs);
/* Populate the BSSID from Neighbor BSS info received from neighbor report */
- for (i = 0; i < pScanFilter->BSSIDs.numOfBSSIDs; i++)
- {
+ for (i = 0; i < pScanFilter->BSSIDs.numOfBSSIDs; i++) {
vos_mem_copy(&pScanFilter->BSSIDs.bssid[i],
- pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo[i].neighborBssId, sizeof(tSirMacAddr));
+ pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo[i].neighborBssId,
+ sizeof(tSirMacAddr));
}
/* Fill other general scan filter params */
- return csrNeighborRoamPrepareScanProfileFilter(pMac, pScanFilter);
+ return csrNeighborRoamPrepareScanProfileFilter(pMac, pScanFilter, sessionId);
}
/* ---------------------------------------------------------------------------
@@ -1134,14 +1262,17 @@ static eHalStatus csrNeighborRoamBssIdScanFilter(tpAniSirGlobal pMac, tCsrScanRe
---------------------------------------------------------------------------*/
void csrNeighborRoamPurgePreauthFailList(tpAniSirGlobal pMac)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tANI_U8 i;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo = NULL;
NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("Purging the preauth fail list"));
- while (pNeighborRoamInfo->FTRoamInfo.preAuthFailList.numMACAddress)
- {
- vos_mem_zero(pNeighborRoamInfo->FTRoamInfo.preAuthFailList.macAddress[pNeighborRoamInfo->FTRoamInfo.preAuthFailList.numMACAddress-1],
- sizeof(tSirMacAddr));
- pNeighborRoamInfo->FTRoamInfo.preAuthFailList.numMACAddress--;
+ for (i = 0; i < CSR_ROAM_SESSION_MAX; i++) {
+ pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[i];
+ while (pNeighborRoamInfo->FTRoamInfo.preAuthFailList.numMACAddress) {
+ vos_mem_zero(pNeighborRoamInfo->FTRoamInfo.preAuthFailList.macAddress[pNeighborRoamInfo->FTRoamInfo.preAuthFailList.numMACAddress-1],
+ sizeof(tSirMacAddr));
+ pNeighborRoamInfo->FTRoamInfo.preAuthFailList.numMACAddress--;
+ }
}
return;
}
@@ -1158,13 +1289,15 @@ void csrNeighborRoamPurgePreauthFailList(tpAniSirGlobal pMac)
\return eHAL_STATUS_SUCCESS on success, eHAL_STATUS_FAILURE otherwise
---------------------------------------------------------------------------*/
-eHalStatus csrNeighborRoamAddBssIdToPreauthFailList(tpAniSirGlobal pMac, tSirMacAddr bssId)
+eHalStatus csrNeighborRoamAddBssIdToPreauthFailList(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ tSirMacAddr bssId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
-
- NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL(" Added BSSID "MAC_ADDRESS_STR" to Preauth failed list"),
- MAC_ADDR_ARRAY(bssId));
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
+ NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL(" Added BSSID "MAC_ADDRESS_STR
+ " to Preauth failed list"), MAC_ADDR_ARRAY(bssId));
if ((pNeighborRoamInfo->FTRoamInfo.preAuthFailList.numMACAddress + 1) >
MAX_NUM_PREAUTH_FAIL_LIST_ADDRESS)
@@ -1193,10 +1326,13 @@ eHalStatus csrNeighborRoamAddBssIdToPreauthFailList(tpAniSirGlobal pMac, tSirMac
\return eANI_BOOLEAN_TRUE if preauth candidate, eANI_BOOLEAN_FALSE otherwise
---------------------------------------------------------------------------*/
-tANI_BOOLEAN csrNeighborRoamIsPreauthCandidate(tpAniSirGlobal pMac, tSirMacAddr bssId)
+tANI_BOOLEAN csrNeighborRoamIsPreauthCandidate(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ tSirMacAddr bssId)
{
tANI_U8 i = 0;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (csrRoamIsRoamOffloadScanEnabled(pMac))
@@ -1210,7 +1346,7 @@ tANI_BOOLEAN csrNeighborRoamIsPreauthCandidate(tpAniSirGlobal pMac, tSirMacAddr
for (i = 0; i < pNeighborRoamInfo->FTRoamInfo.preAuthFailList.numMACAddress; i++)
{
if (VOS_TRUE == vos_mem_compare(pNeighborRoamInfo->FTRoamInfo.preAuthFailList.macAddress[i],
- bssId, sizeof(tSirMacAddr)))
+ bssId, sizeof(tSirMacAddr)))
{
NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("BSSID "MAC_ADDRESS_STR" already present in preauth fail list"),
MAC_ADDR_ARRAY(bssId));
@@ -1233,9 +1369,11 @@ tANI_BOOLEAN csrNeighborRoamIsPreauthCandidate(tpAniSirGlobal pMac, tSirMacAddr
\return eHAL_STATUS_SUCCESS on success, eHAL_STATUS_FAILURE otherwise
---------------------------------------------------------------------------*/
-static eHalStatus csrNeighborRoamIssuePreauthReq(tpAniSirGlobal pMac)
+static eHalStatus csrNeighborRoamIssuePreauthReq(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus status = eHAL_STATUS_SUCCESS;
tpCsrNeighborRoamBSSInfo pNeighborBssNode;
@@ -1302,7 +1440,8 @@ static eHalStatus csrNeighborRoamIssuePreauthReq(tpAniSirGlobal pMac)
pNeighborRoamInfo->FTRoamInfo.numPreAuthRetries++;
/* Transition the state to preauthenticating */
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_PREAUTHENTICATING)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_PREAUTHENTICATING,
+ pNeighborRoamInfo->csrSessionId)
return status;
}
@@ -1326,13 +1465,17 @@ static eHalStatus csrNeighborRoamIssuePreauthReq(tpAniSirGlobal pMac)
eHAL_STATUS_FAILURE otherwise
---------------------------------------------------------------------------*/
-eHalStatus csrNeighborRoamPreauthRspHandler(tpAniSirGlobal pMac, tSirRetStatus limStatus)
+eHalStatus csrNeighborRoamPreauthRspHandler(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ tSirRetStatus limStatus)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus status = eHAL_STATUS_SUCCESS;
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
eHalStatus preauthProcessed = eHAL_STATUS_SUCCESS;
tpCsrNeighborRoamBSSInfo pPreauthRspNode = NULL;
+ tpFTRoamCallbackUsrCtx pUsrCtx;
#ifdef FEATURE_WLAN_LFR_METRICS
tCsrRoamInfo *roamInfo;
@@ -1369,7 +1512,9 @@ eHalStatus csrNeighborRoamPreauthRspHandler(tpAniSirGlobal pMac, tSirRetStatus l
if (eSIR_SUCCESS == limStatus)
{
- pPreauthRspNode = csrNeighborRoamGetRoamableAPListNextEntry(pMac, &pNeighborRoamInfo->roamableAPList, NULL);
+ pPreauthRspNode = csrNeighborRoamGetRoamableAPListNextEntry(pMac,
+ &pNeighborRoamInfo->roamableAPList,
+ NULL);
}
if ((eSIR_SUCCESS == limStatus) && (NULL != pPreauthRspNode))
{
@@ -1403,7 +1548,8 @@ eHalStatus csrNeighborRoamPreauthRspHandler(tpAniSirGlobal pMac, tSirRetStatus l
csrLLInsertTail(&pNeighborRoamInfo->FTRoamInfo.preAuthDoneList, &pPreauthRspNode->List, LL_ACCESS_LOCK);
/* Pre-auth completed successfully. Transition to PREAUTH Done state */
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE,
+ pNeighborRoamInfo->csrSessionId)
pNeighborRoamInfo->FTRoamInfo.numPreAuthRetries = 0;
/* The caller of this function would start a timer and by the time it expires, supplicant should
@@ -1435,7 +1581,9 @@ eHalStatus csrNeighborRoamPreauthRspHandler(tpAniSirGlobal pMac, tSirRetStatus l
if(!pNeighborRoamInfo->uOsRequestedHandoff)
#endif
{
- status = csrNeighborRoamAddBssIdToPreauthFailList(pMac, pNeighborBssNode->pBssDescription->bssId);
+ status = csrNeighborRoamAddBssIdToPreauthFailList(pMac,
+ sessionId,
+ pNeighborBssNode->pBssDescription->bssId);
}
#ifdef FEATURE_WLAN_LFR_METRICS
@@ -1463,7 +1611,8 @@ eHalStatus csrNeighborRoamPreauthRspHandler(tpAniSirGlobal pMac, tSirRetStatus l
}
/* Issue preauth request for the same/next entry */
- if (eHAL_STATUS_SUCCESS == csrNeighborRoamIssuePreauthReq(pMac))
+ if (eHAL_STATUS_SUCCESS == csrNeighborRoamIssuePreauthReq(pMac,
+ sessionId))
goto DEQ_PREAUTH;
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -1472,31 +1621,48 @@ eHalStatus csrNeighborRoamPreauthRspHandler(tpAniSirGlobal pMac, tSirRetStatus l
if(pNeighborRoamInfo->uOsRequestedHandoff)
{
pNeighborRoamInfo->uOsRequestedHandoff = 0;
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_START, REASON_PREAUTH_FAILED_FOR_ALL);
+ csrRoamOffloadScan(pMac, 0, ROAM_SCAN_OFFLOAD_START,
+ REASON_PREAUTH_FAILED_FOR_ALL);
}
else
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_RESTART, REASON_PREAUTH_FAILED_FOR_ALL);
+ csrRoamOffloadScan(pMac, 0, ROAM_SCAN_OFFLOAD_RESTART,
+ REASON_PREAUTH_FAILED_FOR_ALL);
}
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED);
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED,
+ pNeighborRoamInfo->csrSessionId);
} else
{
#endif
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN);
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(
+ eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN,
+ pNeighborRoamInfo->csrSessionId);
- /* Register Neighbor Lookup threshold callback with TL for UP event now */
+ /* Register Neighbor Lookup threshold callback with TL
+ for UP event now */
NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("No more pre-auth candidates-"
- "register UP indication with TL. RSSI = %d,"), NEIGHBOR_ROAM_LOOKUP_UP_THRESHOLD * (-1));
+ "register UP indication with TL. RSSI = %d,"),
+ NEIGHBOR_ROAM_LOOKUP_UP_THRESHOLD * (-1));
+ pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx));
+ if (NULL == pUsrCtx) {
+ smsLog(pMac, LOGE, FL("Memory allocation failed for pUsrCtx"));
+ return eHAL_STATUS_FAILED_ALLOC;
+ }
+
+ pUsrCtx->pMac = pMac;
+ pUsrCtx->sessionId = sessionId;
vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext,
(v_S7_t)NEIGHBOR_ROAM_LOOKUP_UP_THRESHOLD * (-1),
WLANTL_HO_THRESHOLD_UP,
csrNeighborRoamNeighborLookupUPCallback,
- VOS_MODULE_ID_SME, pMac);
+ VOS_MODULE_ID_SME, pUsrCtx);
if(!VOS_IS_STATUS_SUCCESS(vosStatus))
{
//err msg
smsLog(pMac, LOGE, FL(" Couldn't register csrNeighborRoamNeighborLookupCallback UP event with TL: Status = %d"), status);
+
+ vos_mem_free(pUsrCtx);
}
/* Start the neighbor results refresh timer and transition to REPORT_SCAN state to perform scan again */
@@ -1604,10 +1770,13 @@ eHalStatus csrNeighborRoamOffloadSynchRspHandler(
\return eHAL_STATUS_SUCCESS on success, eHAL_STATUS_FAILURE otherwise
---------------------------------------------------------------------------*/
-eHalStatus csrNeighborRoamPrepareScanProfileFilter(tpAniSirGlobal pMac, tCsrScanResultFilter *pScanFilter)
+eHalStatus
+csrNeighborRoamPrepareScanProfileFilter(tpAniSirGlobal pMac,
+ tCsrScanResultFilter *pScanFilter,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
- tANI_U8 sessionId = (tANI_U8)pNeighborRoamInfo->csrSessionId;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tCsrRoamConnectedProfile *pCurProfile = &pMac->roam.roamSession[sessionId].connectedProfile;
tANI_U8 i = 0;
@@ -1698,39 +1867,41 @@ eHalStatus csrNeighborRoamPrepareScanProfileFilter(tpAniSirGlobal pMac, tCsrScan
return eHAL_STATUS_SUCCESS;
}
-tANI_U32 csrGetCurrentAPRssi(tpAniSirGlobal pMac, tScanResultHandle *pScanResultList)
+tANI_U32 csrGetCurrentAPRssi(tpAniSirGlobal pMac,
+ tScanResultHandle *pScanResultList,
+ tANI_U8 sessionId)
{
- tCsrScanResultInfo *pScanResult;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tCsrScanResultInfo *pScanResult;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
#ifdef FEATURE_WLAN_LFR
- tANI_U32 CurrAPRssi = pNeighborRoamInfo->lookupDOWNRssi;
+ tANI_U32 CurrAPRssi = pNeighborRoamInfo->lookupDOWNRssi;
#else
/* We are setting this as default value to make sure we return this value,
when we do not see this AP in the scan result for some reason.However,it is
less likely that we are associated to an AP and do not see it in the scan list */
- tANI_U32 CurrAPRssi = -125;
+ tANI_U32 CurrAPRssi = -125;
#endif
- while (NULL != (pScanResult = csrScanResultGetNext(pMac, *pScanResultList)))
- {
-
- if (VOS_TRUE == vos_mem_compare(pScanResult->BssDescriptor.bssId,
+ while (NULL != (pScanResult = csrScanResultGetNext(pMac, *pScanResultList)))
+ {
+ if (VOS_TRUE == vos_mem_compare(pScanResult->BssDescriptor.bssId,
pNeighborRoamInfo->currAPbssid, sizeof(tSirMacAddr)))
- {
- /* We got a match with the currently associated AP.
- * Capture the RSSI value and complete the while loop.
+ {
+ /* We got a match with the currently associated AP.
+ * Capture the RSSI value and complete the while loop.
* The while loop is completed in order to make the current entry go back to NULL,
* and in the next while loop, it properly starts searching from the head of the list.
* TODO: Can also try setting the current entry directly to NULL as soon as we find the new AP*/
- CurrAPRssi = (int)pScanResult->BssDescriptor.rssi * (-1) ;
+ CurrAPRssi = (int)pScanResult->BssDescriptor.rssi * (-1);
- } else {
- continue;
- }
- }
+ } else {
+ continue;
+ }
+ }
- return CurrAPRssi;
+ return CurrAPRssi;
}
@@ -1749,11 +1920,14 @@ tANI_U32 csrGetCurrentAPRssi(tpAniSirGlobal pMac, tScanResultHandle *pScanResult
---------------------------------------------------------------------------*/
-static tANI_BOOLEAN csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac,
- tScanResultHandle *pScanResultList)
+static tANI_BOOLEAN
+csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ tScanResultHandle *pScanResultList)
{
tCsrScanResultInfo *pScanResult;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tpCsrNeighborRoamBSSInfo pBssInfo;
tANI_U32 CurrAPRssi;
tANI_U8 RoamRssiDiff = pMac->roam.configParam.RoamRssiDiff;
@@ -1768,7 +1942,7 @@ static tANI_BOOLEAN csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac,
* going to roam.If so, we are going to continue with the
* current AP.
***************************************************************/
- CurrAPRssi = csrGetCurrentAPRssi(pMac, pScanResultList);
+ CurrAPRssi = csrGetCurrentAPRssi(pMac, pScanResultList, sessionId);
/* Expecting the scan result already to be in the sorted order based on the RSSI */
/* Based on the previous state we need to check whether the list should be sorted again taking neighbor score into consideration */
@@ -1779,7 +1953,7 @@ static tANI_BOOLEAN csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac,
while (NULL != (pScanResult = csrScanResultGetNext(pMac, *pScanResultList)))
{
- VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
+ VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
FL("Scan result: BSSID "MAC_ADDRESS_STR" (Rssi %ld, Ch:%d)"),
MAC_ADDR_ARRAY(pScanResult->BssDescriptor.bssId),
abs(pScanResult->BssDescriptor.rssi),
@@ -1827,54 +2001,52 @@ static tANI_BOOLEAN csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac,
/*
* If RSSI is lower than the lookup threshold, then continue.
*/
- if (abs(pScanResult->BssDescriptor.rssi) >
- pNeighborRoamInfo->currentNeighborLookupThreshold)
- {
- VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
- "%s: [INFOLOG] new ap rssi (%d) lower than lookup threshold (%d)",
- __func__, (int)pScanResult->BssDescriptor.rssi * (-1),
- (int)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1));
- continue;
- }
+ if (abs(pScanResult->BssDescriptor.rssi) >
+ pNeighborRoamInfo->currentNeighborLookupThreshold) {
+ VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
+ FL("new ap rssi (%d) lower than lookup threshold (%d)"),
+ (int)pScanResult->BssDescriptor.rssi * (-1),
+ (int)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1));
+ continue;
+ }
- if (abs(CurrAPRssi) < abs(pScanResult->BssDescriptor.rssi))
- {
- /*Do not roam to an AP with worse RSSI than the current*/
+ if (abs(CurrAPRssi) < abs(pScanResult->BssDescriptor.rssi))
+ {
+ /* Do not roam to an AP with worse RSSI than the current */
VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
"%s: [INFOLOG]Current AP rssi=%d new ap rssi worse=%d", __func__,
- CurrAPRssi,
- (int)pScanResult->BssDescriptor.rssi * (-1) );
- continue;
- } else {
+ CurrAPRssi,
+ (int)pScanResult->BssDescriptor.rssi * (-1) );
+ continue;
+ } else {
/*Do not roam to an AP which is having better RSSI than the current AP, but still less than the
* margin that is provided by user from the ini file (RoamRssiDiff)*/
- if (abs(abs(CurrAPRssi) - abs(pScanResult->BssDescriptor.rssi)) < RoamRssiDiff)
- {
+ if (abs(abs(CurrAPRssi) - abs(pScanResult->BssDescriptor.rssi)) < RoamRssiDiff)
+ {
VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
"%s: [INFOLOG]Current AP rssi=%d new ap rssi=%d not good enough, roamRssiDiff=%d", __func__,
CurrAPRssi,
- (int)pScanResult->BssDescriptor.rssi * (-1),
- RoamRssiDiff);
- continue;
+ (int)pScanResult->BssDescriptor.rssi * (-1),
+ RoamRssiDiff);
+ continue;
}
else {
VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
"%s: [INFOLOG]Current AP rssi=%d new ap rssi better=%d", __func__,
- CurrAPRssi,
- (int)pScanResult->BssDescriptor.rssi * (-1) );
- }
+ CurrAPRssi,
+ (int)pScanResult->BssDescriptor.rssi * (-1) );
}
+ }
}
#ifdef WLAN_FEATURE_VOWIFI_11R
- if (pNeighborRoamInfo->is11rAssoc)
- {
- if (!csrNeighborRoamIsPreauthCandidate(pMac, pScanResult->BssDescriptor.bssId))
- {
+ if (pNeighborRoamInfo->is11rAssoc) {
+ if (!csrNeighborRoamIsPreauthCandidate(pMac, sessionId,
+ pScanResult->BssDescriptor.bssId)) {
smsLog(pMac, LOGE, FL("BSSID present in pre-auth fail list.. Ignoring"));
- continue;
- }
- }
+ continue;
+ }
+ }
#endif /* WLAN_FEATURE_VOWIFI_11R */
#ifdef FEATURE_WLAN_ESE
@@ -1884,8 +2056,8 @@ static tANI_BOOLEAN csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac,
#endif
if (pNeighborRoamInfo->isESEAssoc)
{
- if (!csrNeighborRoamIsPreauthCandidate(pMac, pScanResult->BssDescriptor.bssId))
- {
+ if (!csrNeighborRoamIsPreauthCandidate(pMac, sessionId,
+ pScanResult->BssDescriptor.bssId)) {
smsLog(pMac, LOGE, FL("BSSID present in pre-auth fail list.. Ignoring"));
continue;
}
@@ -1925,10 +2097,9 @@ static tANI_BOOLEAN csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac,
#ifdef FEATURE_WLAN_LFR
// If we are supporting legacy roaming, and
// if the candidate is on the "pre-auth failed" list, ignore it.
- if (csrRoamIsFastRoamEnabled(pMac, CSR_SESSION_ID_INVALID))
- {
- if (!csrNeighborRoamIsPreauthCandidate(pMac, pScanResult->BssDescriptor.bssId))
- {
+ if (csrRoamIsFastRoamEnabled(pMac, sessionId)) {
+ if (!csrNeighborRoamIsPreauthCandidate(pMac, sessionId,
+ pScanResult->BssDescriptor.bssId)) {
smsLog(pMac, LOGE, FL("BSSID present in pre-auth fail list.. Ignoring"));
continue;
}
@@ -2061,11 +2232,15 @@ static tANI_BOOLEAN csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac,
\return VOS_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-static VOS_STATUS csrNeighborRoamHandleEmptyScanResult(tpAniSirGlobal pMac)
+static VOS_STATUS csrNeighborRoamHandleEmptyScanResult(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus status = eHAL_STATUS_SUCCESS;
+ tpFTRoamCallbackUsrCtx pUsrCtx;
+
#ifdef FEATURE_WLAN_LFR
tANI_BOOLEAN performPeriodicScan =
(pNeighborRoamInfo->cfgParams.emptyScanRefreshPeriod) ? TRUE : FALSE;
@@ -2123,10 +2298,11 @@ static VOS_STATUS csrNeighborRoamHandleEmptyScanResult(tpAniSirGlobal pMac)
#endif
/* Transition to CONNECTED state */
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED);
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED,
+ sessionId);
/* Reset all the necessary variables before transitioning to the CONNECTED state */
- csrNeighborRoamResetConnectedStateControlInfo(pMac);
+ csrNeighborRoamResetConnectedStateControlInfo(pMac, sessionId);
#ifdef FEATURE_WLAN_LFR
if (pNeighborRoamInfo->uEmptyScanCount == eFirstEmptyScan)
@@ -2138,18 +2314,29 @@ static VOS_STATUS csrNeighborRoamHandleEmptyScanResult(tpAniSirGlobal pMac)
FL("Registering DOWN event neighbor lookup callback with TL for RSSI = %d"),
pNeighborRoamInfo->currentNeighborLookupThreshold * (-1));
+ /* This user context data will be returned with callback */
+ pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx));
+ if (NULL == pUsrCtx) {
+ smsLog(pMac, LOGE, FL("Memory allocation failure"));
+ return VOS_STATUS_E_NOMEM;
+ }
+ pUsrCtx->pMac = pMac;
+ pUsrCtx->sessionId = sessionId;
+
vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext,
(v_S7_t)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1),
WLANTL_HO_THRESHOLD_DOWN,
csrNeighborRoamNeighborLookupDOWNCallback,
- VOS_MODULE_ID_SME, pMac);
+ VOS_MODULE_ID_SME, pUsrCtx);
if(!VOS_IS_STATUS_SUCCESS(vosStatus))
{
smsLog(pMac, LOGW,
FL("Couldn't re-register csrNeighborRoamNeighborLookupDOWNCallback"
" with TL: Status = %d"), status);
+ vos_mem_free(pUsrCtx);
}
+
#ifdef FEATURE_WLAN_LFR
pNeighborRoamInfo->lookupDOWNRssi = 0;
}
@@ -2159,7 +2346,7 @@ static VOS_STATUS csrNeighborRoamHandleEmptyScanResult(tpAniSirGlobal pMac)
/* Empty scan results for the second or fourth time */
/* Immediately scan on channels in non-occupied list */
- csrNeighborRoamTransitToCFGChanScan(pMac);
+ csrNeighborRoamTransitToCFGChanScan(pMac, sessionId);
}
else if (pNeighborRoamInfo->uEmptyScanCount >= eThirdEmptyScan)
{
@@ -2225,14 +2412,17 @@ static VOS_STATUS csrNeighborRoamHandleEmptyScanResult(tpAniSirGlobal pMac)
}
-static eHalStatus csrNeighborRoamProcessScanComplete (tpAniSirGlobal pMac)
+static eHalStatus csrNeighborRoamProcessScanComplete (tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tCsrScanResultFilter scanFilter;
tScanResultHandle scanResult;
tANI_U32 tempVal = 0;
tANI_BOOLEAN roamNow = eANI_BOOLEAN_FALSE;
eHalStatus hstatus;
+ tpFTRoamCallbackUsrCtx pUsrCtx;
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
/* If the state is REPORT_SCAN, then this must be the scan after the REPORT_QUERY state. So, we
@@ -2243,14 +2433,15 @@ static eHalStatus csrNeighborRoamProcessScanComplete (tpAniSirGlobal pMac)
#endif
)
{
- hstatus = csrNeighborRoamBssIdScanFilter(pMac, &scanFilter);
+ hstatus = csrNeighborRoamBssIdScanFilter(pMac, sessionId, &scanFilter);
NEIGHBOR_ROAM_DEBUG(pMac, LOGW, FL("11R or ESE Association: Prepare scan filter status with neighbor AP = %d"), hstatus);
tempVal = 1;
}
else
#endif
{
- hstatus = csrNeighborRoamPrepareScanProfileFilter(pMac, &scanFilter);
+ hstatus = csrNeighborRoamPrepareScanProfileFilter(pMac,
+ &scanFilter, sessionId);
NEIGHBOR_ROAM_DEBUG(pMac, LOGW, FL("11R/ESE/Other Association: Prepare scan to find neighbor AP filter status = %d"), hstatus);
}
if (eHAL_STATUS_SUCCESS != hstatus)
@@ -2264,7 +2455,8 @@ static eHalStatus csrNeighborRoamProcessScanComplete (tpAniSirGlobal pMac)
NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("Get Scan Result status code %d"), hstatus);
}
/* Process the scan results and update roamable AP list */
- roamNow = csrNeighborRoamProcessScanResults(pMac, &scanResult);
+ roamNow = csrNeighborRoamProcessScanResults(pMac, sessionId,
+ &scanResult);
/* Free the scan filter */
csrFreeScanFilter(pMac, &scanFilter);
@@ -2294,27 +2486,33 @@ static eHalStatus csrNeighborRoamProcessScanComplete (tpAniSirGlobal pMac)
if (pNeighborRoamInfo->is11rAssoc)
{
/* Valid APs are found after scan. Now we can initiate pre-authentication */
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(
+ eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN,
+ sessionId)
}
else
#endif
#ifdef FEATURE_WLAN_ESE
/* If this is a non-11r association, then we can register the reassoc callback here as we have some
- APs in the roamable AP list */
+ APs in the roamable AP list */
if (pNeighborRoamInfo->isESEAssoc)
{
/* Valid APs are found after scan. Now we can initiate pre-authentication */
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(
+ eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN,
+ sessionId)
}
else
#endif
#ifdef FEATURE_WLAN_LFR
/* If LFR is enabled, then we can register the reassoc callback here as we have some
APs in the roamable AP list */
- if (csrRoamIsFastRoamEnabled(pMac, CSR_SESSION_ID_INVALID))
+ if (csrRoamIsFastRoamEnabled(pMac, sessionId))
{
/* Valid APs are found after scan. Now we can initiate pre-authentication */
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(
+ eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN,
+ sessionId)
}
else
#endif
@@ -2337,7 +2535,7 @@ static eHalStatus csrNeighborRoamProcessScanComplete (tpAniSirGlobal pMac)
macTraceGetNeighbourRoamState(
pNeighborRoamInfo->neighborRoamState));
/* Handle it appropriately */
- csrNeighborRoamHandleEmptyScanResult(pMac);
+ csrNeighborRoamHandleEmptyScanResult(pMac, sessionId);
}
break;
#ifdef WLAN_FEATURE_VOWIFI_11R
@@ -2350,7 +2548,7 @@ static eHalStatus csrNeighborRoamProcessScanComplete (tpAniSirGlobal pMac)
macTraceGetNeighbourRoamState(
pNeighborRoamInfo->neighborRoamState));
/* Stop the timer here as the same timer will be started again in CFG_CHAN_SCAN_STATE */
- csrNeighborRoamTransitToCFGChanScan(pMac);
+ csrNeighborRoamTransitToCFGChanScan(pMac, sessionId);
}
break;
#endif /* WLAN_FEATURE_VOWIFI_11R */
@@ -2398,7 +2596,7 @@ static eHalStatus csrNeighborRoamProcessScanComplete (tpAniSirGlobal pMac)
}
#endif
- csrNeighborRoamTriggerHandoff(pMac, pNeighborRoamInfo);
+ csrNeighborRoamTriggerHandoff(pMac, sessionId);
return eHAL_STATUS_SUCCESS;
}
@@ -2417,18 +2615,27 @@ static eHalStatus csrNeighborRoamProcessScanComplete (tpAniSirGlobal pMac)
}
NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Registering DOWN event Reassoc callback with TL. RSSI = %d"), pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1));
+ pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx));
+ if (NULL == pUsrCtx) {
+ smsLog(pMac, LOGE, FL("Allocation failed for pUsrCtx"));
+ return eHAL_STATUS_FAILURE;
+ }
+
+ pUsrCtx->pMac = pMac;
+ pUsrCtx->sessionId = sessionId;
/* Register a reassoc Indication callback */
- vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext, (v_S7_t)pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1),
+ vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext,
+ (v_S7_t)pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1),
WLANTL_HO_THRESHOLD_DOWN,
csrNeighborRoamReassocIndCallback,
- VOS_MODULE_ID_SME, pMac);
+ VOS_MODULE_ID_SME, pUsrCtx);
- if(!VOS_IS_STATUS_SUCCESS(vosStatus))
+ if (!VOS_IS_STATUS_SUCCESS(vosStatus))
{
//err msg
smsLog(pMac, LOGW, FL(" Couldn't register csrNeighborRoamReassocIndCallback with TL: Status = %d"), vosStatus);
+ vos_mem_free(pUsrCtx);
}
-
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -2438,16 +2645,19 @@ if (csrRoamIsRoamOffloadScanEnabled(pMac))
{
if (pNeighborRoamInfo->uOsRequestedHandoff)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_START, REASON_NO_CAND_FOUND_OR_NOT_ROAMING_NOW);
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_START,
+ REASON_NO_CAND_FOUND_OR_NOT_ROAMING_NOW);
pNeighborRoamInfo->uOsRequestedHandoff = 0;
}
else
{
/* There is no candidate or We are not roaming Now.
* Inform the FW to restart Roam Offload Scan */
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_RESTART, REASON_NO_CAND_FOUND_OR_NOT_ROAMING_NOW);
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_RESTART,
+ REASON_NO_CAND_FOUND_OR_NOT_ROAMING_NOW);
}
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED);
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED,
+ sessionId);
}
}
#endif
@@ -2475,20 +2685,19 @@ if (csrRoamIsRoamOffloadScanEnabled(pMac))
\return eHAL_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-static eHalStatus csrNeighborRoamScanRequestCallback(tHalHandle halHandle, void *pContext,
+static eHalStatus csrNeighborRoamScanRequestCallback(tHalHandle halHandle,
+ void *pContext, tANI_U8 sessionId,
tANI_U32 scanId, eCsrScanStatus status)
{
tpAniSirGlobal pMac = (tpAniSirGlobal) halHandle;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tANI_U8 currentChanIndex;
eHalStatus hstatus;
-#ifdef FEATURE_WLAN_LFR
- tANI_U32 sessionId = CSR_SESSION_ID_INVALID;
if (NULL != pContext)
{
- sessionId = *((tANI_U32*)pContext);
-
+#ifdef FEATURE_WLAN_LFR
if (!csrRoamIsStaMode(pMac, sessionId))
{
smsLog(pMac, LOGE,
@@ -2506,9 +2715,10 @@ static eHalStatus csrNeighborRoamScanRequestCallback(tHalHandle halHandle, void
vos_mem_free(pContext);
return eHAL_STATUS_SUCCESS;
}
- }
#endif
- pMac->roam.neighborRoamInfo.scanRspPending = eANI_BOOLEAN_FALSE;
+ }
+
+ pNeighborRoamInfo->scanRspPending = eANI_BOOLEAN_FALSE;
/* This can happen when we receive a UP event from TL in any of the scan states. Silently ignore it */
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED == pNeighborRoamInfo->neighborRoamState)
@@ -2519,13 +2729,17 @@ static eHalStatus csrNeighborRoamScanRequestCallback(tHalHandle halHandle, void
return eHAL_STATUS_SUCCESS;
}
- /* -1 is done because the chanIndex would have got incremented after issuing a successful scan request */
- currentChanIndex = (pMac->roam.neighborRoamInfo.roamChannelInfo.currentChanIndex) ? (pMac->roam.neighborRoamInfo.roamChannelInfo.currentChanIndex - 1) : 0;
+ /* -1 is done because the chanIndex would have got incremented after
+ issuing a successful scan request */
+ currentChanIndex = (pNeighborRoamInfo->roamChannelInfo.currentChanIndex) ? (pNeighborRoamInfo->roamChannelInfo.currentChanIndex - 1) : 0;
/* Validate inputs */
- if (pMac->roam.neighborRoamInfo.roamChannelInfo.currentChannelListInfo.ChannelList) {
- NEIGHBOR_ROAM_DEBUG(pMac, LOGW, FL("csrNeighborRoamScanRequestCallback received for Channel = %d, ChanIndex = %d"),
- pMac->roam.neighborRoamInfo.roamChannelInfo.currentChannelListInfo.ChannelList[currentChanIndex], currentChanIndex);
+ if (pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList) {
+ NEIGHBOR_ROAM_DEBUG(pMac, LOGW,
+ FL("csrNeighborRoamScanRequestCallback received for Channel = %d, "
+ "ChanIndex = %d"),
+ pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList[currentChanIndex],
+ currentChanIndex);
}
else
{
@@ -2549,7 +2763,7 @@ static eHalStatus csrNeighborRoamScanRequestCallback(tHalHandle halHandle, void
return eHAL_STATUS_FAILURE;
}
- hstatus = csrNeighborRoamProcessScanComplete(pMac);
+ hstatus = csrNeighborRoamProcessScanComplete(pMac, sessionId);
if (eHAL_STATUS_SUCCESS != hstatus)
{
@@ -2600,15 +2814,19 @@ static eHalStatus csrNeighborRoamScanRequestCallback(tHalHandle halHandle, void
\return eHAL_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-static eHalStatus csrNeighborRoamScanResultRequestCallback(tHalHandle halHandle, void *pContext,
- tANI_U32 scanId, eCsrScanStatus status)
+static eHalStatus csrNeighborRoamScanResultRequestCallback(tHalHandle halHandle,
+ void *pContext,
+ tANI_U8 sessionId,
+ tANI_U32 scanId,
+ eCsrScanStatus status)
{
- tpAniSirGlobal pMac = (tpAniSirGlobal) halHandle;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpAniSirGlobal pMac = (tpAniSirGlobal) halHandle;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus hstatus;
smsLog(pMac, LOG2, FL("called "));
- pMac->roam.neighborRoamInfo.scanRspPending = eANI_BOOLEAN_FALSE;
+ pNeighborRoamInfo->scanRspPending = eANI_BOOLEAN_FALSE;
/* we must be in connected state, if not ignore it */
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED != pNeighborRoamInfo->neighborRoamState)
@@ -2620,7 +2838,7 @@ static eHalStatus csrNeighborRoamScanResultRequestCallback(tHalHandle halHandle,
/* Now we have completed scanning the channel list. We have get the result by applying appropriate filter
sort the results based on neighborScore and RSSI and select the best candidate out of the list */
- hstatus = csrNeighborRoamProcessScanComplete(pMac);
+ hstatus = csrNeighborRoamProcessScanComplete(pMac, sessionId);
if (eHAL_STATUS_SUCCESS != hstatus)
{
@@ -2633,12 +2851,13 @@ static eHalStatus csrNeighborRoamScanResultRequestCallback(tHalHandle halHandle,
#ifdef FEATURE_WLAN_LFR
static eHalStatus csrNeighborRoamContiguousScanRequestCallback(tHalHandle halHandle,
- void *pContext, tANI_U32 scanId, eCsrScanStatus status)
+ void *pContext, tANI_U8 sessionId,
+ tANI_U32 scanId, eCsrScanStatus status)
{
- tpAniSirGlobal pMac = (tpAniSirGlobal) halHandle;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpAniSirGlobal pMac = (tpAniSirGlobal) halHandle;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus hstatus = eHAL_STATUS_SUCCESS;
- tANI_U32 sessionId = CSR_SESSION_ID_INVALID;
if (NULL != pContext)
{
@@ -2651,7 +2870,7 @@ static eHalStatus csrNeighborRoamContiguousScanRequestCallback(tHalHandle halHan
}
}
- pMac->roam.neighborRoamInfo.scanRspPending = eANI_BOOLEAN_FALSE;
+ pNeighborRoamInfo->scanRspPending = eANI_BOOLEAN_FALSE;
/* This can happen when we receive a UP event from TL in any of the scan states. Silently ignore it */
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED == pNeighborRoamInfo->neighborRoamState)
@@ -2671,7 +2890,7 @@ static eHalStatus csrNeighborRoamContiguousScanRequestCallback(tHalHandle halHan
}
NEIGHBOR_ROAM_DEBUG(pMac, LOGW, "%s: process scan results", __func__);
- hstatus = csrNeighborRoamProcessScanComplete(pMac);
+ hstatus = csrNeighborRoamProcessScanComplete(pMac, sessionId);
if (eHAL_STATUS_SUCCESS != hstatus)
{
@@ -2708,11 +2927,13 @@ eHalStatus csrNeighborRoamIssueBgScanRequest(tpAniSirGlobal pMac,
tCsrScanRequest scanReq;
tANI_U8 channel;
void * userData = NULL;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
if (1 == pBgScanParams->ChannelInfo.numOfChannels)
NEIGHBOR_ROAM_DEBUG(pMac, LOGW, FL("Channel = %d, ChanIndex = %d"),
pBgScanParams->ChannelInfo.ChannelList[0],
- pMac->roam.neighborRoamInfo.roamChannelInfo.currentChanIndex);
+ pNeighborRoamInfo->roamChannelInfo.currentChanIndex);
//send down the scan req for 1 channel on the associated SSID
vos_mem_set(&scanReq, sizeof(tCsrScanRequest), 0);
@@ -2765,21 +2986,24 @@ eHalStatus csrNeighborRoamIssueBgScanRequest(tpAniSirGlobal pMac,
vos_mem_free(userData);
return status;
}
- pMac->roam.neighborRoamInfo.scanRspPending = eANI_BOOLEAN_TRUE;
+ pNeighborRoamInfo->scanRspPending = eANI_BOOLEAN_TRUE;
vos_mem_free(scanReq.SSIDs.SSIDList);
if (1 == pBgScanParams->ChannelInfo.numOfChannels)
- NEIGHBOR_ROAM_DEBUG(pMac, LOG1, FL("Channel List Address = %p, Actual index = %d"),
- &pMac->roam.neighborRoamInfo.roamChannelInfo.currentChannelListInfo.ChannelList[0],
- pMac->roam.neighborRoamInfo.roamChannelInfo.currentChanIndex);
+ NEIGHBOR_ROAM_DEBUG(pMac, LOG1,
+ FL("Channel List Address = %p, Actual index = %d"),
+ &pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList[0],
+ pNeighborRoamInfo->roamChannelInfo.currentChanIndex);
return status;
}
static void csrNeighborRoamFillNonChannelBgScanParams (tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
tpCsrBGScanRequest bgScanParams)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tANI_U8 broadcastBssid[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
vos_mem_copy(bgScanParams->bssid, broadcastBssid, sizeof(tCsrBssid));
@@ -2806,10 +3030,11 @@ static void csrNeighborRoamFillNonChannelBgScanParams (tpAniSirGlobal pMac,
\return eHAL_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-eHalStatus csrNeighborRoamPerformBgScan(tpAniSirGlobal pMac, tANI_U32 sessionId)
+eHalStatus csrNeighborRoamPerformBgScan(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tCsrBGScanRequest bgScanParams;
tANI_U8 channel = 0;
@@ -2824,7 +3049,7 @@ eHalStatus csrNeighborRoamPerformBgScan(tpAniSirGlobal pMac, tANI_U32 sessionId)
// When timer start is declared a failure, then we delete the list.
// Should not happen now as we stop and then only start the scan timer.
// still handle the unlikely case.
- csrNeighborRoamHandleEmptyScanResult(pMac);
+ csrNeighborRoamHandleEmptyScanResult(pMac, sessionId);
return status;
}
@@ -2834,7 +3059,7 @@ eHalStatus csrNeighborRoamPerformBgScan(tpAniSirGlobal pMac, tANI_U32 sessionId)
{
NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("Invalid channel index: %d"), pNeighborRoamInfo->roamChannelInfo.currentChanIndex);
// Go back and restart.
- csrNeighborRoamHandleEmptyScanResult(pMac);
+ csrNeighborRoamHandleEmptyScanResult(pMac, sessionId);
return status;
}
@@ -2846,7 +3071,7 @@ eHalStatus csrNeighborRoamPerformBgScan(tpAniSirGlobal pMac, tANI_U32 sessionId)
bgScanParams.ChannelInfo.numOfChannels = 1;
bgScanParams.ChannelInfo.ChannelList = &channel;
- csrNeighborRoamFillNonChannelBgScanParams(pMac, &bgScanParams);
+ csrNeighborRoamFillNonChannelBgScanParams(pMac, sessionId, &bgScanParams);
/* Update the passive scan time for DFS channel */
if ((TRUE == CSR_IS_CHANNEL_DFS(channel)) &&
(CSR_ROAMING_DFS_CHANNEL_DISABLED !=
@@ -2868,8 +3093,8 @@ eHalStatus csrNeighborRoamPerformBgScan(tpAniSirGlobal pMac, tANI_U32 sessionId)
pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.numOfChannels)
{
NEIGHBOR_ROAM_DEBUG(pMac, LOG1, FL("Completed scanning channels in Channel List: CurrChanIndex = %d, Num Channels = %d"),
- pNeighborRoamInfo->roamChannelInfo.currentChanIndex,
- pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.numOfChannels);
+ pNeighborRoamInfo->roamChannelInfo.currentChanIndex,
+ pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.numOfChannels);
/* We have completed scanning all the channels */
pNeighborRoamInfo->roamChannelInfo.currentChanIndex = 0;
/* We are no longer scanning the channel list. Next timer firing should be used to get the scan results
@@ -2886,14 +3111,16 @@ eHalStatus csrNeighborRoamPerformBgScan(tpAniSirGlobal pMac, tANI_U32 sessionId)
* If the status is not success, we need to call the callback
* routine so that the state machine does not get stuck.
*/
- csrNeighborRoamScanRequestCallback(pMac, NULL, 0, eCSR_SCAN_FAILURE);
+ csrNeighborRoamScanRequestCallback(pMac, NULL, sessionId, 0,
+ eCSR_SCAN_FAILURE);
}
return status;
}
#ifdef FEATURE_WLAN_LFR
-eHalStatus csrNeighborRoamPerformContiguousBgScan(tpAniSirGlobal pMac, tANI_U32 sessionId)
+eHalStatus csrNeighborRoamPerformContiguousBgScan(tpAniSirGlobal pMac,
+ tANI_U32 sessionId)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tCsrBGScanRequest bgScanParams;
@@ -2905,7 +3132,7 @@ eHalStatus csrNeighborRoamPerformContiguousBgScan(tpAniSirGlobal pMac, tANI_U32
vos_mem_set(&bgScanParams, sizeof(tCsrBGScanRequest), 0);
/* Contiguously scan all channels from valid list */
- NEIGHBOR_ROAM_DEBUG(pMac, LOG2, "%s: get valid channel list", __func__);
+ NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("get valid channel list"));
numOfChannels = sizeof(pMac->roam.validChannelList);
@@ -2922,6 +3149,7 @@ eHalStatus csrNeighborRoamPerformContiguousBgScan(tpAniSirGlobal pMac, tANI_U32
{
csrNeighborRoamChannelsFilterByCurrentBand(
pMac,
+ sessionId,
pInChannelList,
numOfChannels,
tmpChannelList,
@@ -2945,7 +3173,7 @@ eHalStatus csrNeighborRoamPerformContiguousBgScan(tpAniSirGlobal pMac, tANI_U32
NEIGHBOR_ROAM_DEBUG(pMac, LOGW, "%s: valid channel list = %d",
__func__, bgScanParams.ChannelInfo.ChannelList[i]);
}
- csrNeighborRoamFillNonChannelBgScanParams(pMac, &bgScanParams);
+ csrNeighborRoamFillNonChannelBgScanParams(pMac, sessionId, &bgScanParams);
status = csrNeighborRoamIssueBgScanRequest(pMac, &bgScanParams,
sessionId, csrNeighborRoamContiguousScanRequestCallback);
@@ -2978,7 +3206,8 @@ void csrNeighborRoamNeighborScanTimerCallback(void *pv)
tCsrTimerInfo *pInfo = (tCsrTimerInfo *)pv;
tpAniSirGlobal pMac = pInfo->pMac;
tANI_U32 sessionId = pInfo->sessionId;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
// check if bg scan is on going, no need to send down the new params if true
if(eANI_BOOLEAN_TRUE == pNeighborRoamInfo->scanRspPending)
@@ -3029,16 +3258,18 @@ void csrNeighborRoamEmptyScanRefreshTimerCallback(void *context)
tCsrTimerInfo *pInfo = (tCsrTimerInfo *)context;
tpAniSirGlobal pMac = pInfo->pMac;
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tANI_U32 sessionId = pInfo->sessionId;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
/* Reset all the variables just as no scan had happened before */
- csrNeighborRoamResetConnectedStateControlInfo(pMac);
+ csrNeighborRoamResetConnectedStateControlInfo(pMac, sessionId);
#if defined WLAN_FEATURE_VOWIFI_11R && defined WLAN_FEATURE_VOWIFI
if ((pNeighborRoamInfo->is11rAssoc) && (pMac->rrm.rrmSmeContext.rrmConfig.rrmEnabled))
{
NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("11R Association:Neighbor Lookup Down event received in CONNECTED state"));
- vosStatus = csrNeighborRoamIssueNeighborRptRequest(pMac);
+ vosStatus = csrNeighborRoamIssueNeighborRptRequest(pMac, sessionId);
if (VOS_STATUS_SUCCESS != vosStatus)
{
smsLog(pMac, LOGE, FL("Neighbor report request failed. status = %d"), vosStatus);
@@ -3047,13 +3278,14 @@ void csrNeighborRoamEmptyScanRefreshTimerCallback(void *context)
/* Increment the neighbor report retry count after sending the neighbor request successfully */
pNeighborRoamInfo->FTRoamInfo.currentNeighborRptRetryNum++;
pNeighborRoamInfo->FTRoamInfo.neighborRptPending = eANI_BOOLEAN_TRUE;
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_REPORT_QUERY)
- }
- else
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(
+ eCSR_NEIGHBOR_ROAM_STATE_REPORT_QUERY,
+ sessionId)
+ } else
#endif
{
NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("Non 11R or ESE Association:empty scan refresh timer expired"));
- vosStatus = csrNeighborRoamTransitToCFGChanScan(pMac);
+ vosStatus = csrNeighborRoamTransitToCFGChanScan(pMac, sessionId);
if (VOS_STATUS_SUCCESS != vosStatus)
{
return;
@@ -3081,30 +3313,32 @@ void csrNeighborRoamResultsRefreshTimerCallback(void *context)
tCsrTimerInfo *pInfo = (tCsrTimerInfo *)context;
tpAniSirGlobal pMac = pInfo->pMac;
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tANI_U32 sessionId = pInfo->sessionId;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[pInfo->sessionId];
NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Deregistering DOWN event reassoc callback with TL. RSSI = %d"), pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1));
/* Deregister reassoc callback. Ignore return status */
vosStatus = WLANTL_DeregRSSIIndicationCB(pMac->roam.gVosContext, (v_S7_t)pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1),
- WLANTL_HO_THRESHOLD_DOWN,
- csrNeighborRoamReassocIndCallback,
- VOS_MODULE_ID_SME);
+ WLANTL_HO_THRESHOLD_DOWN,
+ csrNeighborRoamReassocIndCallback,
+ VOS_MODULE_ID_SME);
- if(!VOS_IS_STATUS_SUCCESS(vosStatus))
+ if (!VOS_IS_STATUS_SUCCESS(vosStatus))
{
//err msg
smsLog(pMac, LOGW, FL(" Couldn't deregister csrNeighborRoamReassocIndCallback with TL: Status = %d"), vosStatus);
}
/* Reset all the variables just as no scan had happened before */
- csrNeighborRoamResetConnectedStateControlInfo(pMac);
+ csrNeighborRoamResetConnectedStateControlInfo(pMac, pInfo->sessionId);
#if defined WLAN_FEATURE_VOWIFI_11R && defined WLAN_FEATURE_VOWIFI
if ((pNeighborRoamInfo->is11rAssoc) && (pMac->rrm.rrmSmeContext.rrmConfig.rrmEnabled))
{
NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("11R Association:Neighbor Lookup Down event received in CONNECTED state"));
- vosStatus = csrNeighborRoamIssueNeighborRptRequest(pMac);
+ vosStatus = csrNeighborRoamIssueNeighborRptRequest(pMac, sessionId);
if (VOS_STATUS_SUCCESS != vosStatus)
{
smsLog(pMac, LOGE, FL("Neighbor report request failed. status = %d"), vosStatus);
@@ -3113,13 +3347,15 @@ void csrNeighborRoamResultsRefreshTimerCallback(void *context)
/* Increment the neighbor report retry count after sending the neighbor request successfully */
pNeighborRoamInfo->FTRoamInfo.currentNeighborRptRetryNum++;
pNeighborRoamInfo->FTRoamInfo.neighborRptPending = eANI_BOOLEAN_TRUE;
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_REPORT_QUERY)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(
+ eCSR_NEIGHBOR_ROAM_STATE_REPORT_QUERY,
+ sessionId)
}
else
#endif
{
NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("Non 11R or ESE Association:results refresh timer expired"));
- vosStatus = csrNeighborRoamTransitToCFGChanScan(pMac);
+ vosStatus = csrNeighborRoamTransitToCFGChanScan(pMac, sessionId);
if (VOS_STATUS_SUCCESS != vosStatus)
{
return;
@@ -3142,12 +3378,23 @@ void csrNeighborRoamResultsRefreshTimerCallback(void *context)
\return VOS_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-VOS_STATUS csrNeighborRoamIssueNeighborRptRequest(tpAniSirGlobal pMac)
+VOS_STATUS csrNeighborRoamIssueNeighborRptRequest(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
tRrmNeighborRspCallbackInfo callbackInfo;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tRrmNeighborReq neighborReq;
+ tpFTRoamCallbackUsrCtx pUsrCtx;
+ /* This user context data will be returned with callback */
+ pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx));
+ if (NULL == pUsrCtx) {
+ smsLog(pMac, LOGE, FL("Memory allocation failure"));
+ return VOS_STATUS_E_NOMEM;
+ }
+ pUsrCtx->pMac = pMac;
+ pUsrCtx->sessionId = sessionId;
neighborReq.no_ssid = 0;
@@ -3157,10 +3404,12 @@ VOS_STATUS csrNeighborRoamIssueNeighborRptRequest(tpAniSirGlobal pMac)
pMac->roam.roamSession[pNeighborRoamInfo->csrSessionId].connectedProfile.SSID.length);
callbackInfo.neighborRspCallback = csrNeighborRoamRRMNeighborReportResult;
- callbackInfo.neighborRspCallbackContext = pMac;
+ callbackInfo.neighborRspCallbackContext = pUsrCtx;
callbackInfo.timeout = pNeighborRoamInfo->FTRoamInfo.neighborReportTimeout;
- return sme_NeighborReportRequest(pMac,(tANI_U8) pNeighborRoamInfo->csrSessionId, &neighborReq, &callbackInfo);
+ return sme_NeighborReportRequest(pMac,
+ (tANI_U8) pNeighborRoamInfo->csrSessionId,
+ &neighborReq, &callbackInfo);
}
/* ---------------------------------------------------------------------------
@@ -3183,6 +3432,7 @@ VOS_STATUS csrNeighborRoamIssueNeighborRptRequest(tpAniSirGlobal pMac)
VOS_STATUS csrNeighborRoamChannelsFilterByCurrentBand(
tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
tANI_U8* pInputChannelList,
tANI_U8 inputNumOfChannels,
tANI_U8* pOutputChannelList,
@@ -3191,7 +3441,8 @@ VOS_STATUS csrNeighborRoamChannelsFilterByCurrentBand(
{
tANI_U8 i = 0;
tANI_U8 numChannels = 0;
- tANI_U8 currAPoperationChannel = pMac->roam.neighborRoamInfo.currAPoperationChannel;
+ tANI_U8 currAPoperationChannel =
+ pMac->roam.neighborRoamInfo[sessionId].currAPoperationChannel;
// Check for NULL pointer
if (!pInputChannelList) return VOS_STATUS_E_INVAL;
@@ -3322,10 +3573,12 @@ VOS_STATUS csrNeighborRoamMergeChannelLists(
\return VOS_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-VOS_STATUS csrNeighborRoamCreateChanListFromNeighborReport(tpAniSirGlobal pMac)
+VOS_STATUS csrNeighborRoamCreateChanListFromNeighborReport(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
tpRrmNeighborReportDesc pNeighborBssDesc;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tANI_U8 numChannels = 0;
tANI_U8 i = 0;
tANI_U8 channelList[MAX_BSS_IN_NEIGHBOR_RPT];
@@ -3411,11 +3664,10 @@ VOS_STATUS csrNeighborRoamCreateChanListFromNeighborReport(tpAniSirGlobal pMac)
* report Channels. This increases the chances of the DUT to get a candidate AP while
* roaming even if the Neighbor Report is not able to provide sufficient information.
* */
- if (pMac->scan.occupiedChannels.numChannels)
- {
+ if (pMac->scan.occupiedChannels[sessionId].numChannels) {
csrNeighborRoamMergeChannelLists(pMac,
- &pMac->scan.occupiedChannels.channelList[0],
- pMac->scan.occupiedChannels.numChannels,
+ &pMac->scan.occupiedChannels[sessionId].channelList[0],
+ pMac->scan.occupiedChannels[sessionId].numChannels,
&pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList[0],
pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.numOfChannels,
&mergedOutputNumOfChannels);
@@ -3437,7 +3689,8 @@ VOS_STATUS csrNeighborRoamCreateChanListFromNeighborReport(tpAniSirGlobal pMac)
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (csrRoamIsRoamOffloadScanEnabled(pMac))
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG, REASON_CHANNEL_LIST_CHANGED);
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ REASON_CHANNEL_LIST_CHANGED);
}
#endif
}
@@ -3465,8 +3718,11 @@ VOS_STATUS csrNeighborRoamCreateChanListFromNeighborReport(tpAniSirGlobal pMac)
---------------------------------------------------------------------------*/
void csrNeighborRoamRRMNeighborReportResult(void *context, VOS_STATUS vosStatus)
{
- tpAniSirGlobal pMac = PMAC_STRUCT(context);
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tFTRoamCallbackUsrCtx *pUsrCtx = (tFTRoamCallbackUsrCtx *)context;
+ tANI_U32 sessionId = pUsrCtx->sessionId;
+ tpAniSirGlobal pMac = pUsrCtx->pMac;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus status = eHAL_STATUS_SUCCESS;
smsLog(pMac, LOG1, FL("Neighbor report result callback with status = %d"), vosStatus);
@@ -3478,7 +3734,9 @@ void csrNeighborRoamRRMNeighborReportResult(void *context, VOS_STATUS vosStatus)
if (VOS_STATUS_SUCCESS == vosStatus)
{
/* Need to create channel list based on the neighbor AP list and transition to REPORT_SCAN state */
- vosStatus = csrNeighborRoamCreateChanListFromNeighborReport(pMac);
+ vosStatus = csrNeighborRoamCreateChanListFromNeighborReport(
+ pMac,
+ sessionId);
if (VOS_STATUS_SUCCESS == vosStatus)
{
NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("Channel List created from Neighbor report, Transitioning to NEIGHBOR_SCAN state"));
@@ -3499,11 +3757,13 @@ void csrNeighborRoamRRMNeighborReportResult(void *context, VOS_STATUS vosStatus)
vos_mem_free(pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList);
pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList = NULL;
pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.numOfChannels = 0;
+ vos_mem_free(pUsrCtx);
return;
}
pNeighborRoamInfo->FTRoamInfo.currentNeighborRptRetryNum = 0;
/* Neighbor scan timer started. Transition to REPORT_SCAN state */
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN,
+ sessionId)
}
else
{
@@ -3515,10 +3775,12 @@ void csrNeighborRoamRRMNeighborReportResult(void *context, VOS_STATUS vosStatus)
pNeighborRoamInfo->cfgParams.maxNeighborRetries)
{
smsLog(pMac, LOGE, FL("Bailing out to CFG Channel list scan.. "));
- vosStatus = csrNeighborRoamTransitToCFGChanScan(pMac);
+ vosStatus = csrNeighborRoamTransitToCFGChanScan(pMac,
+ sessionId);
if (VOS_STATUS_SUCCESS != vosStatus)
{
smsLog(pMac, LOGE, FL("Transit to CFG Channel list scan state failed with status %d "), vosStatus);
+ vos_mem_free(pUsrCtx);
return;
}
/* We transitioned to different state now. Reset the Neighbor report retry count */
@@ -3526,10 +3788,12 @@ void csrNeighborRoamRRMNeighborReportResult(void *context, VOS_STATUS vosStatus)
}
else
{
- vosStatus = csrNeighborRoamIssueNeighborRptRequest(pMac);
+ vosStatus = csrNeighborRoamIssueNeighborRptRequest(pMac,
+ sessionId);
if (VOS_STATUS_SUCCESS != vosStatus)
{
smsLog(pMac, LOGE, FL("Neighbor report request failed. status = %d"), vosStatus);
+ vos_mem_free(pUsrCtx);
return;
}
pNeighborRoamInfo->FTRoamInfo.neighborRptPending = eANI_BOOLEAN_TRUE;
@@ -3546,6 +3810,7 @@ void csrNeighborRoamRRMNeighborReportResult(void *context, VOS_STATUS vosStatus)
pNeighborRoamInfo->neighborRoamState));
break;
}
+ vos_mem_free(pUsrCtx);
return;
}
#endif /* WLAN_FEATURE_VOWIFI_11R */
@@ -3612,11 +3877,11 @@ tANI_BOOLEAN csrNeighborRoamIsSsidAndSecurityMatch(
}
}
-tANI_BOOLEAN csrNeighborRoamIsNewConnectedProfile(
- tpAniSirGlobal pMac)
+tANI_BOOLEAN csrNeighborRoamIsNewConnectedProfile(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
- tANI_U8 sessionId = (tANI_U8)pNeighborRoamInfo->csrSessionId;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tCsrRoamConnectedProfile *pCurrProfile = NULL;
tCsrRoamConnectedProfile *pPrevProfile = NULL;
tDot11fBeaconIEs *pIes = NULL;
@@ -3669,11 +3934,10 @@ tANI_BOOLEAN csrNeighborRoamIsNewConnectedProfile(
tANI_BOOLEAN csrNeighborRoamConnectedProfileMatch(
tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
tCsrScanResult *pResult,
tDot11fBeaconIEs *pIes)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
- tANI_U8 sessionId = (tANI_U8)pNeighborRoamInfo->csrSessionId;
tCsrRoamConnectedProfile *pCurProfile = NULL;
tSirBssDescription *pBssDesc = &pResult->Result.BssDescriptor;
@@ -3712,6 +3976,7 @@ tANI_BOOLEAN csrNeighborRoamConnectedProfileMatch(
---------------------------------------------------------------------------*/
VOS_STATUS csrNeighborRoamPrepareNonOccupiedChannelList(
tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
tANI_U8 *pInputChannelList,
tANI_U8 numOfChannels,
tANI_U8 *pOutputChannelList,
@@ -3720,8 +3985,10 @@ VOS_STATUS csrNeighborRoamPrepareNonOccupiedChannelList(
{
tANI_U8 i = 0;
tANI_U8 outputNumOfChannels = 0; // Clear the output number of channels
- tANI_U8 numOccupiedChannels = pMac->scan.occupiedChannels.numChannels;
- tANI_U8 *pOccupiedChannelList = pMac->scan.occupiedChannels.channelList;
+ tANI_U8 numOccupiedChannels =
+ pMac->scan.occupiedChannels[sessionId].numChannels;
+ tANI_U8 *pOccupiedChannelList =
+ pMac->scan.occupiedChannels[sessionId].channelList;
for (i = 0; i < numOfChannels; i++)
{
@@ -3770,17 +4037,16 @@ VOS_STATUS csrNeighborRoamPrepareNonOccupiedChannelList(
\return VOS_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac)
+VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus status = eHAL_STATUS_SUCCESS;
int i = 0;
tANI_U8 numOfChannels = 0;
tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
tpCsrChannelInfo currChannelListInfo;
-#ifdef FEATURE_WLAN_LFR
- tANI_U32 sessionId = pNeighborRoamInfo->csrSessionId;
-#endif
currChannelListInfo = &pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo;
if (
@@ -3822,6 +4088,7 @@ VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac)
{
csrNeighborRoamChannelsFilterByCurrentBand(
pMac,
+ sessionId,
pNeighborRoamInfo->cfgParams.channelInfo.ChannelList,
pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels,
channelList,
@@ -3869,14 +4136,16 @@ VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac)
csrNeighborRoamPerformContiguousBgScan(pMac, sessionId);
/* Transition to CFG_CHAN_LIST_SCAN */
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN);
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(
+ eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN,
+ sessionId);
return VOS_STATUS_SUCCESS;
}
#endif
else
{
- numOfChannels = pMac->scan.occupiedChannels.numChannels;
+ numOfChannels = pMac->scan.occupiedChannels[sessionId].numChannels;
if (numOfChannels
#ifdef FEATURE_WLAN_LFR
&& ((pNeighborRoamInfo->uScanMode == SPLIT_SCAN_OCCUPIED_LIST) ||
@@ -3900,7 +4169,8 @@ VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac)
{
csrNeighborRoamChannelsFilterByCurrentBand(
pMac,
- pMac->scan.occupiedChannels.channelList,
+ sessionId,
+ pMac->scan.occupiedChannels[sessionId].channelList,
numOfChannels,
channelList,
&numOfChannels);
@@ -3912,7 +4182,7 @@ VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac)
numOfChannels = WNI_CFG_VALID_CHANNEL_LIST_LEN;
}
vos_mem_copy(channelList,
- pMac->scan.occupiedChannels.channelList,
+ pMac->scan.occupiedChannels[sessionId].channelList,
numOfChannels * sizeof(tANI_U8));
}
@@ -3953,6 +4223,7 @@ VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac)
*/
NEIGHBOR_ROAM_DEBUG(pMac, LOG1, "Switching to non-occupied channel list");
status = csrNeighborRoamPrepareNonOccupiedChannelList(pMac,
+ sessionId,
(tANI_U8 *)pMac->roam.validChannelList,
numOfChannels,
channelList,
@@ -3978,6 +4249,7 @@ VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac)
{
csrNeighborRoamChannelsFilterByCurrentBand(
pMac,
+ sessionId,
(tANI_U8 *)pMac->roam.validChannelList,
numOfChannels,
channelList,
@@ -4049,7 +4321,9 @@ VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac)
csrNeighborRoamPurgePreauthFailedList(pMac);
/* Transition to CFG_CHAN_LIST_SCAN_STATE */
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(
+ eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN,
+ sessionId)
return VOS_STATUS_SUCCESS;
}
@@ -4063,43 +4337,58 @@ VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac)
CONNECTED state and reset all the scan parameters
\param pMac - The handle returned by macOpen.
+ \param sessionId - Session ID
\return VOS_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-VOS_STATUS csrNeighborRoamNeighborLookupUpEvent(tpAniSirGlobal pMac)
+VOS_STATUS csrNeighborRoamNeighborLookupUpEvent(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
VOS_STATUS vosStatus;
- csrNeighborRoamDeregAllRssiIndication(pMac);
+ tpFTRoamCallbackUsrCtx pUsrCtx;
+ csrNeighborRoamDeregAllRssiIndication(pMac, sessionId);
/* Recheck whether the below check is needed. */
if (pNeighborRoamInfo->neighborRoamState != eCSR_NEIGHBOR_ROAM_STATE_CONNECTED)
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED,
+ sessionId)
#ifdef FEATURE_WLAN_LFR
- if (!csrRoamIsFastRoamEnabled(pMac,pMac->roam.neighborRoamInfo.csrSessionId))
+ if (!csrRoamIsFastRoamEnabled(pMac, pNeighborRoamInfo->csrSessionId))
{
smsLog(pMac, LOGE, FL("Received when fast roam is disabled. Ignore it"));
return eHAL_STATUS_SUCCESS;
}
#endif
/* Reset all the neighbor roam info control variables. Free all the allocated memory. It is like we are just associated now */
- csrNeighborRoamResetConnectedStateControlInfo(pMac);
+ csrNeighborRoamResetConnectedStateControlInfo(pMac, sessionId);
+ /* This user context data will be returned with callback */
+ pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx));
+ if (NULL == pUsrCtx) {
+ smsLog(pMac, LOGE, FL("Memory allocation failure"));
+ return VOS_STATUS_E_NOMEM;
+ }
+ pUsrCtx->pMac = pMac;
+ pUsrCtx->sessionId = sessionId;
NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Registering DOWN event neighbor lookup callback with TL. RSSI = %d,"), pNeighborRoamInfo->currentNeighborLookupThreshold * (-1));
/* Register Neighbor Lookup threshold callback with TL for DOWN event now */
- vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext, (v_S7_t)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1),
+ vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext,
+ (v_S7_t)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1),
WLANTL_HO_THRESHOLD_DOWN,
csrNeighborRoamNeighborLookupDOWNCallback,
- VOS_MODULE_ID_SME, pMac);
+ VOS_MODULE_ID_SME, pUsrCtx);
#ifdef FEATURE_WLAN_LFR
pNeighborRoamInfo->lookupDOWNRssi = 0;
#endif
- if(!VOS_IS_STATUS_SUCCESS(vosStatus))
+ if (!VOS_IS_STATUS_SUCCESS(vosStatus))
{
//err msg
smsLog(pMac, LOGW, FL(" Couldn't register csrNeighborRoamNeighborLookupCallback DOWN event with TL: Status = %d"), vosStatus);
+ vos_mem_free(pUsrCtx);
}
@@ -4116,15 +4405,19 @@ VOS_STATUS csrNeighborRoamNeighborLookupUpEvent(tpAniSirGlobal pMac)
a non-11R association.
\param pMac - The handle returned by macOpen.
+ \param sessionId - Session Id
\return VOS_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-VOS_STATUS csrNeighborRoamNeighborLookupDownEvent(tpAniSirGlobal pMac)
+VOS_STATUS csrNeighborRoamNeighborLookupDownEvent(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
eHalStatus status = eHAL_STATUS_SUCCESS;
+ tpFTRoamCallbackUsrCtx pUsrCtx;
switch (pNeighborRoamInfo->neighborRoamState)
{
@@ -4144,7 +4437,7 @@ VOS_STATUS csrNeighborRoamNeighborLookupDownEvent(tpAniSirGlobal pMac)
smsLog(pMac, LOGW, FL(" Couldn't Deregister csrNeighborRoamNeighborLookupCallback DOWN event from TL: Status = %d"), vosStatus);
}
#ifdef FEATURE_WLAN_LFR
- if (!csrRoamIsFastRoamEnabled(pMac,pMac->roam.neighborRoamInfo.csrSessionId))
+ if (!csrRoamIsFastRoamEnabled(pMac, pNeighborRoamInfo->csrSessionId))
{
smsLog(pMac, LOGE, FL("Received when fast roam is disabled. Ignore it"));
return eHAL_STATUS_SUCCESS;
@@ -4156,7 +4449,8 @@ VOS_STATUS csrNeighborRoamNeighborLookupDownEvent(tpAniSirGlobal pMac)
{
NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("11R Association:Neighbor Lookup Down event received in CONNECTED state"));
- vosStatus = csrNeighborRoamIssueNeighborRptRequest(pMac);
+ vosStatus = csrNeighborRoamIssueNeighborRptRequest(pMac,
+ sessionId);
if (VOS_STATUS_SUCCESS != vosStatus)
{
smsLog(pMac, LOGE, FL("Neighbor report request failed. status = %d"), vosStatus);
@@ -4165,28 +4459,35 @@ VOS_STATUS csrNeighborRoamNeighborLookupDownEvent(tpAniSirGlobal pMac)
/* Increment the neighbor report retry count after sending the neighbor request successfully */
pNeighborRoamInfo->FTRoamInfo.currentNeighborRptRetryNum++;
pNeighborRoamInfo->FTRoamInfo.neighborRptPending = eANI_BOOLEAN_TRUE;
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_REPORT_QUERY)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_REPORT_QUERY,
+ sessionId)
}
else
#endif
{
NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Non 11R or ESE Association:Neighbor Lookup Down event received in CONNECTED state"));
- vosStatus = csrNeighborRoamTransitToCFGChanScan(pMac);
+ vosStatus = csrNeighborRoamTransitToCFGChanScan(pMac, sessionId);
if (VOS_STATUS_SUCCESS != vosStatus)
{
NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("csrNeighborRoamTransitToCFGChanScan failed"
- " with status=%d"), vosStatus);
+ " with status=%d"), vosStatus);
return vosStatus;
}
}
NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Registering UP event neighbor lookup callback with TL. RSSI = %d,"), NEIGHBOR_ROAM_LOOKUP_UP_THRESHOLD * (-1));
/* Register Neighbor Lookup threshold callback with TL for UP event now */
+ pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx));
+ if (NULL == pUsrCtx) {
+ smsLog(pMac, LOGE, FL("Memory allocation failed"));
+ return eHAL_STATUS_FAILED_ALLOC;
+ }
+
vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext,
- (v_S7_t)NEIGHBOR_ROAM_LOOKUP_UP_THRESHOLD * (-1),
- WLANTL_HO_THRESHOLD_UP,
- csrNeighborRoamNeighborLookupUPCallback,
- VOS_MODULE_ID_SME, pMac);
+ (v_S7_t)NEIGHBOR_ROAM_LOOKUP_UP_THRESHOLD * (-1),
+ WLANTL_HO_THRESHOLD_UP,
+ csrNeighborRoamNeighborLookupUPCallback,
+ VOS_MODULE_ID_SME, pUsrCtx);
if(!VOS_IS_STATUS_SUCCESS(vosStatus))
{
//err msg
@@ -4194,6 +4495,7 @@ VOS_STATUS csrNeighborRoamNeighborLookupDownEvent(tpAniSirGlobal pMac)
FL(" Couldn't register csrNeighborRoamNeighborLookupCallback"
"UP event with TL: Status = %d"),
status);
+ vos_mem_free(pUsrCtx);
}
break;
default:
@@ -4221,12 +4523,17 @@ VOS_STATUS csrNeighborRoamNeighborLookupDownEvent(tpAniSirGlobal pMac)
\return VOS_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-VOS_STATUS csrNeighborRoamNeighborLookupUPCallback (v_PVOID_t pAdapter, v_U8_t rssiNotification,
- v_PVOID_t pUserCtxt,
- v_S7_t avgRssi)
+VOS_STATUS
+csrNeighborRoamNeighborLookupUPCallback (v_PVOID_t pAdapter,
+ v_U8_t rssiNotification,
+ v_PVOID_t pUserCtxt,
+ v_S7_t avgRssi)
{
- tpAniSirGlobal pMac = PMAC_STRUCT( pUserCtxt );
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tFTRoamCallbackUsrCtx *pUsrCtx = (tFTRoamCallbackUsrCtx *)pUserCtxt;
+ tANI_U32 sessionId = pUsrCtx->sessionId;
+ tpAniSirGlobal pMac = pUsrCtx->pMac;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
VOS_STATUS vosStatus = eHAL_STATUS_SUCCESS;
NEIGHBOR_ROAM_DEBUG(pMac, LOGW, FL("Neighbor Lookup UP indication callback called with notification %d Reported RSSI = %d"),
@@ -4236,15 +4543,18 @@ VOS_STATUS csrNeighborRoamNeighborLookupUPCallback (v_PVOID_t pAdapter, v_U8_t r
if(!csrIsConnStateConnectedInfra(pMac, pNeighborRoamInfo->csrSessionId))
{
smsLog(pMac, LOGW, "Ignoring the indication as we are not connected");
+ vos_mem_free(pUsrCtx);
return VOS_STATUS_SUCCESS;
}
if (WLANTL_HO_THRESHOLD_UP != rssiNotification)
{
VOS_ASSERT(WLANTL_HO_THRESHOLD_UP == rssiNotification);
+ vos_mem_free(pUsrCtx);
return VOS_STATUS_E_FAILURE;
}
- vosStatus = csrNeighborRoamNeighborLookupUpEvent(pMac);
+ vosStatus = csrNeighborRoamNeighborLookupUpEvent(pMac, sessionId);
+ vos_mem_free(pUsrCtx);
return vosStatus;
}
@@ -4262,12 +4572,17 @@ VOS_STATUS csrNeighborRoamNeighborLookupUPCallback (v_PVOID_t pAdapter, v_U8_t r
\return VOS_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-VOS_STATUS csrNeighborRoamNeighborLookupDOWNCallback (v_PVOID_t pAdapter, v_U8_t rssiNotification,
- v_PVOID_t pUserCtxt,
- v_S7_t avgRssi)
+VOS_STATUS
+csrNeighborRoamNeighborLookupDOWNCallback (v_PVOID_t pAdapter,
+ v_U8_t rssiNotification,
+ v_PVOID_t pUserCtxt,
+ v_S7_t avgRssi)
{
- tpAniSirGlobal pMac = PMAC_STRUCT( pUserCtxt );
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tFTRoamCallbackUsrCtx *pUsrCtx = (tFTRoamCallbackUsrCtx *)pUserCtxt;
+ tANI_U32 sessionId = pUsrCtx->sessionId;
+ tpAniSirGlobal pMac = pUsrCtx->pMac;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
VOS_STATUS vosStatus = eHAL_STATUS_SUCCESS;
NEIGHBOR_ROAM_DEBUG(pMac, LOGW, FL("Neighbor Lookup DOWN indication callback called with notification %d Reported RSSI = %d"),
@@ -4280,15 +4595,18 @@ VOS_STATUS csrNeighborRoamNeighborLookupDOWNCallback (v_PVOID_t pAdapter, v_U8_t
if(!csrIsConnStateConnectedInfra(pMac, pNeighborRoamInfo->csrSessionId))
{
smsLog(pMac, LOGW, "Ignoring the indication as we are not connected");
+ vos_mem_free(pUsrCtx);
return VOS_STATUS_SUCCESS;
}
if (WLANTL_HO_THRESHOLD_DOWN != rssiNotification)
{
VOS_ASSERT(WLANTL_HO_THRESHOLD_DOWN == rssiNotification);
+ vos_mem_free(pUsrCtx);
return VOS_STATUS_E_FAILURE;
}
- vosStatus = csrNeighborRoamNeighborLookupDownEvent(pMac);
+ vosStatus = csrNeighborRoamNeighborLookupDownEvent(pMac, sessionId);
+ vos_mem_free(pUsrCtx);
return vosStatus;
}
@@ -4312,9 +4630,11 @@ extern int dumpCmdRSSI;
\return eHAL_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-eHalStatus csrNeighborRoamIndicateDisconnect(tpAniSirGlobal pMac, tANI_U8 sessionId)
+eHalStatus csrNeighborRoamIndicateDisconnect(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
#ifdef FEATURE_WLAN_LFR
tCsrRoamConnectedProfile *pPrevProfile = &pNeighborRoamInfo->prevConnProfile;
#endif
@@ -4383,46 +4703,50 @@ eHalStatus csrNeighborRoamIndicateDisconnect(tpAniSirGlobal pMac, tANI_U8 sessio
* Otherwise, we will be stuck in reassoc state which will
* in-turn block scans (see csrIsScanAllowed).
*/
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT);
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(
+ eCSR_NEIGHBOR_ROAM_STATE_INIT,
+ sessionId);
pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE;
}
break;
case eCSR_NEIGHBOR_ROAM_STATE_INIT:
- csrNeighborRoamResetInitStateControlInfo(pMac);
+ csrNeighborRoamResetInitStateControlInfo(pMac, sessionId);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (!csrRoamIsRoamOffloadScanEnabled(pMac))
{
#endif
- csrNeighborRoamDeregAllRssiIndication(pMac);
+ csrNeighborRoamDeregAllRssiIndication(pMac, sessionId);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
}
#endif
break;
case eCSR_NEIGHBOR_ROAM_STATE_CONNECTED:
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT,
+ sessionId)
pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE;
- csrNeighborRoamResetConnectedStateControlInfo(pMac);
+ csrNeighborRoamResetConnectedStateControlInfo(pMac, sessionId);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (!csrRoamIsRoamOffloadScanEnabled(pMac))
{
#endif
- csrNeighborRoamDeregAllRssiIndication(pMac);
+ csrNeighborRoamDeregAllRssiIndication(pMac, sessionId);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
}
#endif
break;
case eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN:
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT);
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT,
+ sessionId);
pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE;
- csrNeighborRoamResetCfgListChanScanControlInfo(pMac);
+ csrNeighborRoamResetCfgListChanScanControlInfo(pMac, sessionId);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (!csrRoamIsRoamOffloadScanEnabled(pMac))
{
#endif
- csrNeighborRoamDeregAllRssiIndication(pMac);
+ csrNeighborRoamDeregAllRssiIndication(pMac, sessionId);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
}
#endif
@@ -4433,15 +4757,16 @@ eHalStatus csrNeighborRoamIndicateDisconnect(tpAniSirGlobal pMac, tANI_U8 sessio
vos_timer_stop(&pSession->ftSmeContext.preAuthReassocIntvlTimer);
case eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN:
case eCSR_NEIGHBOR_ROAM_STATE_PREAUTHENTICATING:
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT,
+ sessionId)
pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE;
- csrNeighborRoamResetPreauthControlInfo(pMac);
- csrNeighborRoamResetReportScanStateControlInfo(pMac);
+ csrNeighborRoamResetPreauthControlInfo(pMac, sessionId);
+ csrNeighborRoamResetReportScanStateControlInfo(pMac, sessionId);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (!csrRoamIsRoamOffloadScanEnabled(pMac))
{
#endif
- csrNeighborRoamDeregAllRssiIndication(pMac);
+ csrNeighborRoamDeregAllRssiIndication(pMac, sessionId);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
}
#endif
@@ -4452,7 +4777,8 @@ eHalStatus csrNeighborRoamIndicateDisconnect(tpAniSirGlobal pMac, tANI_U8 sessio
macTraceGetNeighbourRoamState(
pNeighborRoamInfo->neighborRoamState));
NEIGHBOR_ROAM_DEBUG(pMac, LOGW, FL("Transitioning to INIT state"));
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT,
+ sessionId)
pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE;
break;
}
@@ -4460,7 +4786,8 @@ eHalStatus csrNeighborRoamIndicateDisconnect(tpAniSirGlobal pMac, tANI_U8 sessio
/*Inform the Firmware to STOP Scanning as the host has a disconnect.*/
if (csrRoamIsStaMode(pMac, sessionId))
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_STOP, REASON_DISCONNECTED);
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_STOP,
+ REASON_DISCONNECTED);
}
#endif
@@ -4482,9 +4809,12 @@ eHalStatus csrNeighborRoamIndicateDisconnect(tpAniSirGlobal pMac, tANI_U8 sessio
\return eHAL_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac, tANI_U8 sessionId, VOS_STATUS vosStatus)
+eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ VOS_STATUS vosStatus)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus status = eHAL_STATUS_SUCCESS;
VOS_STATUS vstatus;
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
@@ -4493,6 +4823,7 @@ eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac, tANI_U8 sessionId
vos_msg_t msg;
tCsrRoamSession *pSession = &pMac->roam.roamSession[sessionId];
#endif
+ tpFTRoamCallbackUsrCtx pUsrCtx;
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
int init_ft_flag = FALSE;
@@ -4529,7 +4860,7 @@ eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac, tANI_U8 sessionId
if (csrIsConcurrentSessionRunning(pMac))
{
smsLog(pMac, LOGE, FL("Ignoring Connect indication received in multisession %d"),
- csrIsConcurrentSessionRunning(pMac));
+ csrIsConcurrentSessionRunning(pMac));
return eHAL_STATUS_SUCCESS;
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -4573,14 +4904,16 @@ eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac, tANI_U8 sessionId
if (VOS_STATUS_SUCCESS != vosStatus)
{
/* Just transition the state to INIT state. Rest of the clean up happens when we get next connect indication */
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(
+ eCSR_NEIGHBOR_ROAM_STATE_INIT,
+ sessionId)
pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE;
break;
}
/* Fall through if the status is SUCCESS */
case eCSR_NEIGHBOR_ROAM_STATE_INIT:
/* Reset all the data structures here */
- csrNeighborRoamResetInitStateControlInfo(pMac);
+ csrNeighborRoamResetInitStateControlInfo(pMac, sessionId);
pNeighborRoamInfo->csrSessionId = sessionId;
@@ -4590,9 +4923,11 @@ eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac, tANI_U8 sessionId
* transitioning from INIT state to CONNECTED state.
*/
if (eCSR_NEIGHBOR_ROAM_STATE_INIT == pNeighborRoamInfo->neighborRoamState)
- csrInitOccupiedChannelsList(pMac);
+ csrInitOccupiedChannelsList(pMac, sessionId);
#endif
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED);
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(
+ eCSR_NEIGHBOR_ROAM_STATE_CONNECTED,
+ sessionId);
vos_mem_copy(pNeighborRoamInfo->currAPbssid,
pMac->roam.roamSession[sessionId].connectedProfile.bssid, sizeof(tCsrBssid));
@@ -4620,7 +4955,8 @@ eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac, tANI_U8 sessionId
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
/* Now we can clear the preauthDone that was saved as we are connected afresh */
- csrNeighborRoamFreeRoamableBSSList(pMac, &pMac->roam.neighborRoamInfo.FTRoamInfo.preAuthDoneList);
+ csrNeighborRoamFreeRoamableBSSList(pMac,
+ &pNeighborRoamInfo->FTRoamInfo.preAuthDoneList);
#endif
#ifdef WLAN_FEATURE_VOWIFI_11R
@@ -4667,7 +5003,8 @@ eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac, tANI_U8 sessionId
pNeighborRoamInfo->FTRoamInfo.currentNeighborRptRetryNum = 0;
csrNeighborRoamPurgePreauthFailedList(pMac);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
- if (csrRoamIsRoamOffloadScanEnabled(pMac))
+ if (!vos_is_multiple_active_sta_sessions() &&
+ csrRoamIsRoamOffloadScanEnabled(pMac))
{
/*If this is not a INFRA type BSS, then do not send the command
* down to firmware.Do not send the START command for other session
@@ -4732,17 +5069,32 @@ eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac, tANI_U8 sessionId
}
} else
#endif
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_START, REASON_CONNECT);
+ csrRoamOffloadScan(pMac, sessionId,
+ ROAM_SCAN_OFFLOAD_START,
+ REASON_CONNECT);
}
} else {
#endif
+ NEIGHBOR_ROAM_DEBUG(pMac, LOG2,
+ FL("Registering neighbor lookup DOWN event with TL, RSSI = %d"),
+ pNeighborRoamInfo->currentNeighborLookupThreshold);
+
+ /* This user context data will be returned with callback */
+ pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx));
+ if (NULL == pUsrCtx) {
+ smsLog(pMac, LOGE, FL("Memory allocation failure"));
+ return VOS_STATUS_E_NOMEM;
+ }
+ pUsrCtx->pMac = pMac;
+ pUsrCtx->sessionId = sessionId;
NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Registering neighbor lookup DOWN event with TL, RSSI = %d"), pNeighborRoamInfo->currentNeighborLookupThreshold);
/* Register Neighbor Lookup threshold callback with TL for DOWN event only */
- vstatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext, (v_S7_t)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1),
- WLANTL_HO_THRESHOLD_DOWN,
- csrNeighborRoamNeighborLookupDOWNCallback,
- VOS_MODULE_ID_SME, pMac);
+ vstatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext,
+ (v_S7_t)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1),
+ WLANTL_HO_THRESHOLD_DOWN,
+ csrNeighborRoamNeighborLookupDOWNCallback,
+ VOS_MODULE_ID_SME, pUsrCtx);
#ifdef FEATURE_WLAN_LFR
pNeighborRoamInfo->lookupDOWNRssi = 0;
#endif
@@ -4750,6 +5102,7 @@ eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac, tANI_U8 sessionId
{
//err msg
smsLog(pMac, LOGW, FL(" Couldn't register csrNeighborRoamNeighborLookupDOWNCallback with TL: Status = %d"), vstatus);
+ vos_mem_free(pUsrCtx);
status = eHAL_STATUS_FAILURE;
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -4784,15 +5137,19 @@ eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac, tANI_U8 sessionId
---------------------------------------------------------------------------*/
void csrNeighborRoamPurgePreauthFailedList(tpAniSirGlobal pMac)
{
- tANI_U8 i;
-
- for (i = 0; i < pMac->roam.neighborRoamInfo.FTRoamInfo.preAuthFailList.numMACAddress; i++)
- {
- vos_mem_zero(pMac->roam.neighborRoamInfo.FTRoamInfo.preAuthFailList.macAddress[i], sizeof(tSirMacAddr));
+ tANI_U8 i, j;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo = NULL;
+
+ for (j = 0; j < CSR_ROAM_SESSION_MAX; j++) {
+ pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[j];
+ for (i = 0;
+ i < pNeighborRoamInfo->FTRoamInfo.preAuthFailList.numMACAddress;
+ i++) {
+ vos_mem_zero(pNeighborRoamInfo->FTRoamInfo.preAuthFailList.macAddress[i],
+ sizeof(tSirMacAddr));
+ }
+ pNeighborRoamInfo->FTRoamInfo.preAuthFailList.numMACAddress = 0;
}
- pMac->roam.neighborRoamInfo.FTRoamInfo.preAuthFailList.numMACAddress = 0;
-
- return;
}
/* ---------------------------------------------------------------------------
@@ -4809,26 +5166,37 @@ void csrNeighborRoamPurgePreauthFailedList(tpAniSirGlobal pMac)
eHalStatus csrNeighborRoamInit11rAssocInfo(tpAniSirGlobal pMac)
{
eHalStatus status;
- tpCsr11rAssocNeighborInfo pFTRoamInfo = &pMac->roam.neighborRoamInfo.FTRoamInfo;
-
- pMac->roam.neighborRoamInfo.is11rAssoc = eANI_BOOLEAN_FALSE;
- pMac->roam.neighborRoamInfo.cfgParams.maxNeighborRetries = pMac->roam.configParam.neighborRoamConfig.nMaxNeighborRetries;
- pFTRoamInfo->neighborReportTimeout = CSR_NEIGHBOR_ROAM_REPORT_QUERY_TIMEOUT;
- pFTRoamInfo->PEPreauthRespTimeout = CSR_NEIGHBOR_ROAM_PREAUTH_RSP_WAIT_MULTIPLIER * pMac->roam.neighborRoamInfo.cfgParams.neighborScanPeriod;
- pFTRoamInfo->neighborRptPending = eANI_BOOLEAN_FALSE;
- pFTRoamInfo->preauthRspPending = eANI_BOOLEAN_FALSE;
-
- pMac->roam.neighborRoamInfo.FTRoamInfo.currentNeighborRptRetryNum = 0;
- pMac->roam.neighborRoamInfo.FTRoamInfo.numBssFromNeighborReport = 0;
- vos_mem_zero(pMac->roam.neighborRoamInfo.FTRoamInfo.neighboReportBssInfo,
- sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT);
+ tANI_U8 i;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo = NULL;
+ tpCsr11rAssocNeighborInfo pFTRoamInfo = NULL;
+ for (i = 0; i < CSR_ROAM_SESSION_MAX; i++) {
+ pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[i];
+ pFTRoamInfo = &pNeighborRoamInfo->FTRoamInfo;
- status = csrLLOpen(pMac->hHdd, &pFTRoamInfo->preAuthDoneList);
- if (eHAL_STATUS_SUCCESS != status)
- {
- smsLog(pMac, LOGE, FL("LL Open of preauth done AP List failed"));
- return eHAL_STATUS_RESOURCES;
+ pNeighborRoamInfo->is11rAssoc = eANI_BOOLEAN_FALSE;
+ pNeighborRoamInfo->cfgParams.maxNeighborRetries =
+ pMac->roam.configParam.neighborRoamConfig.nMaxNeighborRetries;
+
+ pFTRoamInfo->neighborReportTimeout =
+ CSR_NEIGHBOR_ROAM_REPORT_QUERY_TIMEOUT;
+ pFTRoamInfo->PEPreauthRespTimeout =
+ CSR_NEIGHBOR_ROAM_PREAUTH_RSP_WAIT_MULTIPLIER *
+ pNeighborRoamInfo->cfgParams.neighborScanPeriod;
+ pFTRoamInfo->neighborRptPending = eANI_BOOLEAN_FALSE;
+ pFTRoamInfo->preauthRspPending = eANI_BOOLEAN_FALSE;
+
+ pFTRoamInfo->currentNeighborRptRetryNum = 0;
+ pFTRoamInfo->numBssFromNeighborReport = 0;
+
+ vos_mem_zero(pFTRoamInfo->neighboReportBssInfo,
+ sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT);
+
+ status = csrLLOpen(pMac->hHdd, &pFTRoamInfo->preAuthDoneList);
+ if (eHAL_STATUS_SUCCESS != status) {
+ smsLog(pMac, LOGE, FL("LL Open of preauth done AP List failed"));
+ return eHAL_STATUS_RESOURCES;
+ }
}
return status;
}
@@ -4845,10 +5213,11 @@ eHalStatus csrNeighborRoamInit11rAssocInfo(tpAniSirGlobal pMac)
\return eHAL_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-eHalStatus csrNeighborRoamInit(tpAniSirGlobal pMac)
+eHalStatus csrNeighborRoamInit(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
eHalStatus status;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
pNeighborRoamInfo->neighborRoamState = eCSR_NEIGHBOR_ROAM_STATE_CLOSED;
pNeighborRoamInfo->prevNeighborRoamState = eCSR_NEIGHBOR_ROAM_STATE_CLOSED;
@@ -4890,17 +5259,18 @@ eHalStatus csrNeighborRoamInit(tpAniSirGlobal pMac)
pMac->roam.configParam.neighborRoamConfig.neighborScanChanList.numChannels);
vos_mem_set(pNeighborRoamInfo->currAPbssid, sizeof(tCsrBssid), 0);
- pNeighborRoamInfo->currentNeighborLookupThreshold = pMac->roam.neighborRoamInfo.cfgParams.neighborLookupThreshold;
+ pNeighborRoamInfo->currentNeighborLookupThreshold =
+ pNeighborRoamInfo->cfgParams.neighborLookupThreshold;
pNeighborRoamInfo->currentOpportunisticThresholdDiff =
- pMac->roam.neighborRoamInfo.cfgParams.nOpportunisticThresholdDiff;
+ pNeighborRoamInfo->cfgParams.nOpportunisticThresholdDiff;
pNeighborRoamInfo->currentRoamRescanRssiDiff =
- pMac->roam.neighborRoamInfo.cfgParams.nRoamRescanRssiDiff;
+ pNeighborRoamInfo->cfgParams.nRoamRescanRssiDiff;
pNeighborRoamInfo->currentRoamBmissFirstBcnt =
- pMac->roam.neighborRoamInfo.cfgParams.nRoamBmissFirstBcnt;
+ pNeighborRoamInfo->cfgParams.nRoamBmissFirstBcnt;
pNeighborRoamInfo->currentRoamBmissFinalBcnt =
- pMac->roam.neighborRoamInfo.cfgParams.nRoamBmissFinalBcnt;
+ pNeighborRoamInfo->cfgParams.nRoamBmissFinalBcnt;
pNeighborRoamInfo->currentRoamBeaconRssiWeight =
- pMac->roam.neighborRoamInfo.cfgParams.nRoamBeaconRssiWeight;
+ pNeighborRoamInfo->cfgParams.nRoamBeaconRssiWeight;
#ifdef FEATURE_WLAN_LFR
pNeighborRoamInfo->lookupDOWNRssi = 0;
pNeighborRoamInfo->uEmptyScanCount = 0;
@@ -4983,7 +5353,7 @@ eHalStatus csrNeighborRoamInit(tpAniSirGlobal pMac)
/* Initialize this with the current tick count */
pNeighborRoamInfo->scanRequestTimeStamp = (tANI_TIMESTAMP)palGetTickCount(pMac->hHdd);
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT, sessionId)
pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE;
return eHAL_STATUS_SUCCESS;
}
@@ -4995,13 +5365,14 @@ eHalStatus csrNeighborRoamInit(tpAniSirGlobal pMac)
\brief This function closes/frees all the neighbor roam data structures
\param pMac - The handle returned by macOpen.
-
+ \param sessionId - Session identifier
\return VOID
---------------------------------------------------------------------------*/
-void csrNeighborRoamClose(tpAniSirGlobal pMac)
+void csrNeighborRoamClose(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
if (eCSR_NEIGHBOR_ROAM_STATE_CLOSED == pNeighborRoamInfo->neighborRoamState)
{
@@ -5042,15 +5413,17 @@ void csrNeighborRoamClose(tpAniSirGlobal pMac)
csrRoamFreeConnectProfile(pMac, &pNeighborRoamInfo->prevConnProfile);
#endif
#ifdef WLAN_FEATURE_VOWIFI_11R
- pMac->roam.neighborRoamInfo.FTRoamInfo.currentNeighborRptRetryNum = 0;
- pMac->roam.neighborRoamInfo.FTRoamInfo.numBssFromNeighborReport = 0;
- vos_mem_zero(pMac->roam.neighborRoamInfo.FTRoamInfo.neighboReportBssInfo,
- sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT);
- csrNeighborRoamFreeRoamableBSSList(pMac, &pMac->roam.neighborRoamInfo.FTRoamInfo.preAuthDoneList);
- csrLLClose(&pMac->roam.neighborRoamInfo.FTRoamInfo.preAuthDoneList);
+ pNeighborRoamInfo->FTRoamInfo.currentNeighborRptRetryNum = 0;
+ pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport = 0;
+ vos_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo,
+ sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT);
+ csrNeighborRoamFreeRoamableBSSList(pMac,
+ &pNeighborRoamInfo->FTRoamInfo.preAuthDoneList);
+ csrLLClose(&pNeighborRoamInfo->FTRoamInfo.preAuthDoneList);
#endif /* WLAN_FEATURE_VOWIFI_11R */
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CLOSED)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CLOSED,
+ sessionId)
return;
}
@@ -5068,13 +5441,13 @@ void csrNeighborRoamClose(tpAniSirGlobal pMac)
\return VOID
---------------------------------------------------------------------------*/
-void csrNeighborRoamRequestHandoff(tpAniSirGlobal pMac)
+void csrNeighborRoamRequestHandoff(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
-
tCsrRoamInfo roamInfo;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
- tANI_U32 sessionId = pNeighborRoamInfo->csrSessionId;
- tCsrNeighborRoamBSSInfo handoffNode;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
+ tCsrNeighborRoamBSSInfo handoffNode;
+
extern void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisassocRsp *pSmeDisassocRsp );
tANI_U32 roamId = 0;
@@ -5084,23 +5457,24 @@ void csrNeighborRoamRequestHandoff(tpAniSirGlobal pMac)
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,"%s sessionId=%d",
__func__, sessionId);
- if (pMac->roam.neighborRoamInfo.neighborRoamState != eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE)
- {
+ if (pNeighborRoamInfo->neighborRoamState !=
+ eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE) {
smsLog(pMac, LOGE,
FL("Roam requested when Neighbor roam is in %s state"),
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
+ pNeighborRoamInfo->neighborRoamState));
return;
}
vos_mem_zero(&roamInfo, sizeof(tCsrRoamInfo));
- csrRoamCallCallback(pMac, pNeighborRoamInfo->csrSessionId, &roamInfo, roamId, eCSR_ROAM_FT_START,
- eSIR_SME_SUCCESS);
+ csrRoamCallCallback(pMac, pNeighborRoamInfo->csrSessionId, &roamInfo,
+ roamId, eCSR_ROAM_FT_START, eSIR_SME_SUCCESS);
vos_mem_zero(&roamInfo, sizeof(tCsrRoamInfo));
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING,
+ sessionId)
- csrNeighborRoamGetHandoffAPInfo(pMac, &handoffNode);
+ csrNeighborRoamGetHandoffAPInfo(pMac, &handoffNode, sessionId);
VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
FL("HANDOFF CANDIDATE BSSID "MAC_ADDRESS_STR),
MAC_ADDR_ARRAY(handoffNode.pBssDescription->bssId));
@@ -5146,8 +5520,8 @@ void csrNeighborRoamRequestHandoff(tpAniSirGlobal pMac)
handoffNode.pBssDescription->bssId,
sizeof( tCsrBssid ));
- csrRoamCallCallback(pMac, sessionId, &roamInfo, 0, eCSR_ROAM_ROAMING_START, eCSR_ROAM_RESULT_NONE);
-
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, 0,
+ eCSR_ROAM_ROAMING_START, eCSR_ROAM_RESULT_NONE);
return;
}
@@ -5165,9 +5539,11 @@ void csrNeighborRoamRequestHandoff(tpAniSirGlobal pMac)
\return eANI_BOOLEAN_TRUE if reassoc in progress, eANI_BOOLEAN_FALSE otherwise
---------------------------------------------------------------------------*/
-tANI_BOOLEAN csrNeighborRoamIsHandoffInProgress(tpAniSirGlobal pMac)
+tANI_BOOLEAN csrNeighborRoamIsHandoffInProgress(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- if (eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING == pMac->roam.neighborRoamInfo.neighborRoamState)
+ if (eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING ==
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState)
return eANI_BOOLEAN_TRUE;
return eANI_BOOLEAN_FALSE;
@@ -5185,9 +5561,9 @@ tANI_BOOLEAN csrNeighborRoamIsHandoffInProgress(tpAniSirGlobal pMac)
\return eANI_BOOLEAN_TRUE if current assoc is 11r, eANI_BOOLEAN_FALSE otherwise
---------------------------------------------------------------------------*/
-tANI_BOOLEAN csrNeighborRoamIs11rAssoc(tpAniSirGlobal pMac)
+tANI_BOOLEAN csrNeighborRoamIs11rAssoc(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
- return pMac->roam.neighborRoamInfo.is11rAssoc;
+ return pMac->roam.neighborRoamInfo[sessionId].is11rAssoc;
}
#endif /* WLAN_FEATURE_VOWIFI_11R */
@@ -5206,9 +5582,12 @@ tANI_BOOLEAN csrNeighborRoamIs11rAssoc(tpAniSirGlobal pMac)
\return VOID
---------------------------------------------------------------------------*/
-void csrNeighborRoamGetHandoffAPInfo(tpAniSirGlobal pMac, tpCsrNeighborRoamBSSInfo pHandoffNode)
+void csrNeighborRoamGetHandoffAPInfo(tpAniSirGlobal pMac,
+ tpCsrNeighborRoamBSSInfo pHandoffNode,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tpCsrNeighborRoamBSSInfo pBssNode;
if (NULL == pHandoffNode)
@@ -5220,7 +5599,8 @@ void csrNeighborRoamGetHandoffAPInfo(tpAniSirGlobal pMac, tpCsrNeighborRoamBSSIn
if (pNeighborRoamInfo->is11rAssoc)
{
/* Always the BSS info in the head is the handoff candidate */
- pBssNode = csrNeighborRoamGetRoamableAPListNextEntry(pMac, &pNeighborRoamInfo->FTRoamInfo.preAuthDoneList, NULL);
+ pBssNode = csrNeighborRoamGetRoamableAPListNextEntry(pMac,
+ &pNeighborRoamInfo->FTRoamInfo.preAuthDoneList, NULL);
NEIGHBOR_ROAM_DEBUG(pMac, LOG1, FL("Number of Handoff candidates = %d"), csrLLCount(&pNeighborRoamInfo->FTRoamInfo.preAuthDoneList));
}
else
@@ -5235,7 +5615,7 @@ void csrNeighborRoamGetHandoffAPInfo(tpAniSirGlobal pMac, tpCsrNeighborRoamBSSIn
else
#endif
#ifdef FEATURE_WLAN_LFR
- if (csrRoamIsFastRoamEnabled(pMac, CSR_SESSION_ID_INVALID))
+ if (csrRoamIsFastRoamEnabled(pMac, sessionId))
{
/* Always the BSS info in the head is the handoff candidate */
pBssNode = csrNeighborRoamGetRoamableAPListNextEntry(pMac, &pNeighborRoamInfo->FTRoamInfo.preAuthDoneList, NULL);
@@ -5260,9 +5640,10 @@ void csrNeighborRoamGetHandoffAPInfo(tpAniSirGlobal pMac, tpCsrNeighborRoamBSSIn
\return boolean
---------------------------------------------------------------------------*/
-tANI_BOOLEAN csrNeighborRoamStatePreauthDone(tpAniSirGlobal pMac)
+tANI_BOOLEAN csrNeighborRoamStatePreauthDone(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- return (pMac->roam.neighborRoamInfo.neighborRoamState ==
+ return (pMac->roam.neighborRoamInfo[sessionId].neighborRoamState ==
eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE);
}
@@ -5280,10 +5661,11 @@ tANI_BOOLEAN csrNeighborRoamStatePreauthDone(tpAniSirGlobal pMac)
\return boolean
---------------------------------------------------------------------------*/
void csrNeighborRoamTranistionPreauthDoneToDisconnected(tpAniSirGlobal pMac,
- tANI_U32 sessionId)
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
- tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
+ tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId);
if (!pSession)
{
@@ -5292,14 +5674,14 @@ void csrNeighborRoamTranistionPreauthDoneToDisconnected(tpAniSirGlobal pMac,
return;
}
- if (pMac->roam.neighborRoamInfo.neighborRoamState !=
+ if (pNeighborRoamInfo->neighborRoamState !=
eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE) return;
// Stop timer
vos_timer_stop(&pSession->ftSmeContext.preAuthReassocIntvlTimer);
// Transition to init state
- CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT)
+ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT, sessionId)
pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE;
}
@@ -5312,28 +5694,37 @@ void csrNeighborRoamTranistionPreauthDoneToDisconnected(tpAniSirGlobal pMac,
\return boolean
---------------------------------------------------------------------------*/
-tANI_BOOLEAN csrNeighborRoamScanRspPending (tHalHandle hHal)
+tANI_BOOLEAN csrNeighborRoamScanRspPending(tHalHandle hHal,
+ tANI_U8 sessionId)
{
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- return (pMac->roam.neighborRoamInfo.scanRspPending);
+ return (pMac->roam.neighborRoamInfo[sessionId].scanRspPending);
}
/* ---------------------------------------------------------------------------
\brief This function returns TRUE if STA is in the middle of roaming states
\param halHandle - The handle from HDD context.
+ \param sessionId - Session identifier
\return boolean
---------------------------------------------------------------------------*/
-tANI_BOOLEAN csrNeighborMiddleOfRoaming (tHalHandle hHal)
+tANI_BOOLEAN csrNeighborMiddleOfRoaming(tHalHandle hHal, tANI_U8 sessionId)
{
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- tANI_BOOLEAN val = (eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING == pMac->roam.neighborRoamInfo.neighborRoamState) ||
- (eCSR_NEIGHBOR_ROAM_STATE_PREAUTHENTICATING == pMac->roam.neighborRoamInfo.neighborRoamState) ||
- (eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE == pMac->roam.neighborRoamInfo.neighborRoamState) ||
- (eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN == pMac->roam.neighborRoamInfo.neighborRoamState) ||
- (eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN == pMac->roam.neighborRoamInfo.neighborRoamState);
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
+ tANI_BOOLEAN val = (eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING ==
+ pNeighborRoamInfo->neighborRoamState) ||
+ (eCSR_NEIGHBOR_ROAM_STATE_PREAUTHENTICATING ==
+ pNeighborRoamInfo->neighborRoamState) ||
+ (eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE ==
+ pNeighborRoamInfo->neighborRoamState) ||
+ (eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN ==
+ pNeighborRoamInfo->neighborRoamState) ||
+ (eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN ==
+ pNeighborRoamInfo->neighborRoamState);
return (val);
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -5352,7 +5743,11 @@ tANI_BOOLEAN csrNeighborMiddleOfRoaming (tHalHandle hHal)
---------------------------------------------------------------------------*/
eHalStatus csrNeighborRoamCandidateFoundIndHdlr(tpAniSirGlobal pMac, void* pMsg)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tSirSmeCandidateFoundInd *pSirSmeCandidateFoundInd =
+ (tSirSmeCandidateFoundInd *)pMsg;
+ tANI_U32 sessionId = pSirSmeCandidateFoundInd->sessionId;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus status = eHAL_STATUS_SUCCESS;
/* we must be in connected state, if not ignore it */
if ((eCSR_NEIGHBOR_ROAM_STATE_CONNECTED != pNeighborRoamInfo->neighborRoamState)
@@ -5366,10 +5761,10 @@ eHalStatus csrNeighborRoamCandidateFoundIndHdlr(tpAniSirGlobal pMac, void* pMsg)
/* We are about to start a fresh scan cycle,
* purge non-P2P results from the past */
csrScanFlushSelectiveResult(pMac, VOS_FALSE);
- /* Once it gets the candidates found indication from PE, will issue a scan
- - req to PE with “freshScan” in scanreq structure set as follows:
- 0x42 - Return & purge LFR scan results
- */
+ /* Once it gets the candidates found indication from PE, will issue
+ * a scan req to PE with “freshScan” in scanreq structure set
+ * as follows: 0x42 - Return & purge LFR scan results
+ */
status = csrScanRequestLfrResult(pMac, pNeighborRoamInfo->csrSessionId,
csrNeighborRoamScanResultRequestCallback, pMac);
}
@@ -5389,13 +5784,16 @@ eHalStatus csrNeighborRoamCandidateFoundIndHdlr(tpAniSirGlobal pMac, void* pMsg)
\return eHAL_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-eHalStatus csrNeighborRoamProcessHandoffReq(tpAniSirGlobal pMac)
+eHalStatus csrNeighborRoamProcessHandoffReq(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus status = eHAL_STATUS_SUCCESS;
tANI_U32 roamId;
tCsrRoamProfile *pProfile = NULL;
- tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, pNeighborRoamInfo->csrSessionId );
+ tCsrRoamSession *pSession = CSR_GET_SESSION(pMac,
+ pNeighborRoamInfo->csrSessionId);
tANI_U8 i = 0;
if (NULL == pSession)
@@ -5484,10 +5882,13 @@ eHalStatus csrNeighborRoamProcessHandoffReq(tpAniSirGlobal pMac)
\return eHAL_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-eHalStatus csrNeighborRoamSssidScanDone(tpAniSirGlobal pMac, eHalStatus status)
+eHalStatus csrNeighborRoamSssidScanDone(tpAniSirGlobal pMac,
+ tANI_U8 sessionId,
+ eHalStatus status)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
- eHalStatus hstatus;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
+ eHalStatus hstatus;
smsLog(pMac, LOGE, FL("called "));
@@ -5513,7 +5914,7 @@ eHalStatus csrNeighborRoamSssidScanDone(tpAniSirGlobal pMac, eHalStatus status)
}
/* Now we have completed scanning for the candidate provided by HDD. Let move on to HO*/
- hstatus = csrNeighborRoamProcessScanComplete(pMac);
+ hstatus = csrNeighborRoamProcessScanComplete(pMac, sessionId);
if (eHAL_STATUS_SUCCESS != hstatus)
{
@@ -5538,8 +5939,10 @@ eHalStatus csrNeighborRoamSssidScanDone(tpAniSirGlobal pMac, eHalStatus status)
---------------------------------------------------------------------------*/
eHalStatus csrNeighborRoamHandoffReqHdlr(tpAniSirGlobal pMac, void* pMsg)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
- tAniHandoffReq *pHandoffReqInfo;
+ tAniHandoffReq *pHandoffReqInfo = (tAniHandoffReq *)pMsg;
+ tANI_U32 sessionId = pHandoffReqInfo->sessionId;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus status = eHAL_STATUS_SUCCESS;
/* we must be in connected state, if not ignore it */
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED != pNeighborRoamInfo->neighborRoamState)
@@ -5567,7 +5970,8 @@ eHalStatus csrNeighborRoamHandoffReqHdlr(tpAniSirGlobal pMac, void* pMsg)
pHandoffReqInfo->bssid,
6);
pNeighborRoamInfo->uOsRequestedHandoff = 1;
- status = csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_STOP,
+ status = csrRoamOffloadScan(pMac, sessionId,
+ ROAM_SCAN_OFFLOAD_STOP,
REASON_OS_REQUESTED_ROAMING_NOW);
if (eHAL_STATUS_SUCCESS != status)
{
@@ -5603,9 +6007,11 @@ eHalStatus csrNeighborRoamHandoffReqHdlr(tpAniSirGlobal pMac, void* pMsg)
\return eHAL_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-eHalStatus csrNeighborRoamProceedWithHandoffReq(tpAniSirGlobal pMac)
+eHalStatus csrNeighborRoamProceedWithHandoffReq(tpAniSirGlobal pMac,
+ tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus status = eHAL_STATUS_SUCCESS;
/* we must be in connected state, if not ignore it */
if ((eCSR_NEIGHBOR_ROAM_STATE_CONNECTED != pNeighborRoamInfo->neighborRoamState)
@@ -5617,7 +6023,7 @@ eHalStatus csrNeighborRoamProceedWithHandoffReq(tpAniSirGlobal pMac)
else
{
//Let's go ahead with handoff
- status = csrNeighborRoamProcessHandoffReq(pMac);
+ status = csrNeighborRoamProcessHandoffReq(pMac, sessionId);
}
if(!HAL_STATUS_SUCCESS(status))
{
@@ -5639,13 +6045,15 @@ eHalStatus csrNeighborRoamProceedWithHandoffReq(tpAniSirGlobal pMac)
\return eHAL_STATUS_SUCCESS on success, corresponding error code otherwise
---------------------------------------------------------------------------*/
-eHalStatus csrNeighborRoamStartLfrScan(tpAniSirGlobal pMac)
+eHalStatus csrNeighborRoamStartLfrScan(tpAniSirGlobal pMac, tANI_U8 sessionId)
{
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
pNeighborRoamInfo->uOsRequestedHandoff = 0;
/* There is no candidate or We are not roaming Now.
* Inform the FW to restart Roam Offload Scan */
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_START, REASON_NO_CAND_FOUND_OR_NOT_ROAMING_NOW);
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_START,
+ REASON_NO_CAND_FOUND_OR_NOT_ROAMING_NOW);
return eHAL_STATUS_SUCCESS;
}
diff --git a/CORE/SME/src/rrm/sme_rrm.c b/CORE/SME/src/rrm/sme_rrm.c
index 8a3912b89a33..83e52761939d 100644
--- a/CORE/SME/src/rrm/sme_rrm.c
+++ b/CORE/SME/src/rrm/sme_rrm.c
@@ -634,8 +634,11 @@ static eHalStatus sme_RrmSendScanResult( tpAniSirGlobal pMac,
--------------------------------------------------------------------------*/
-static eHalStatus sme_RrmScanRequestCallback(tHalHandle halHandle, void *pContext,
- tANI_U32 scanId, eCsrScanStatus status)
+static eHalStatus sme_RrmScanRequestCallback(tHalHandle halHandle,
+ void *pContext,
+ tANI_U8 sessionId,
+ tANI_U32 scanId,
+ eCsrScanStatus status)
{
tANI_U16 interval;
@@ -1038,6 +1041,9 @@ static void rrmCalculateNeighborAPRoamScore(tpAniSirGlobal pMac, tpRrmNeighborRe
{
tpSirNeighborBssDescripton pNeighborBssDesc;
tANI_U32 roamScore = 0;
+#ifdef FEATURE_WLAN_ESE
+ tANI_U8 sessionId;
+#endif
if (NULL == pNeighborReportDesc)
{
@@ -1081,13 +1087,14 @@ static void rrmCalculateNeighborAPRoamScore(tpAniSirGlobal pMac, tpRrmNeighborRe
}
}
#ifdef FEATURE_WLAN_ESE
- // It has come in the report so its the best score
- if (csrNeighborRoamIs11rAssoc(pMac) == FALSE)
- {
- // IAPP Route so lets make use of this info
- // save all AP, as the list does not come all the time
- // Save and reuse till the next AP List comes to us.
- // Even save our own MAC address. Will be useful next time around.
+ sessionId = pNeighborReportDesc->sessionId;
+ /* It has come in the report so its the best score */
+ if (csrNeighborRoamIs11rAssoc(pMac, sessionId) == FALSE) {
+ /* IAPP Route so lets make use of this info
+ * save all AP, as the list does not come all the time
+ * Save and reuse till the next AP List comes to us.
+ * Even save our own MAC address. Will be useful next time around.
+ */
roamScore += RRM_ROAM_SCORE_NEIGHBOR_IAPP_LIST;
}
#endif
@@ -1173,15 +1180,20 @@ eHalStatus sme_RrmProcessNeighborReport(tpAniSirGlobal pMac, void *pMsgBuf)
tpRrmNeighborReportDesc pNeighborReportDesc;
tANI_U8 i = 0;
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
+ tANI_U8 sessionId;
+ /* Get the session id */
+ status = csrRoamGetSessionIdFromBSSID(pMac, (tCsrBssid *)pNeighborRpt->bssId,
+ (tANI_U32*) &sessionId);
+ if (HAL_STATUS_SUCCESS(status)) {
#ifdef FEATURE_WLAN_ESE
- // Clear the cache for ESE.
- if (csrNeighborRoamIsESEAssoc(pMac))
- {
- rrmLLPurgeNeighborCache(pMac,
+ /* Clear the cache for ESE. */
+ if (csrNeighborRoamIsESEAssoc(pMac, sessionId)) {
+ rrmLLPurgeNeighborCache(pMac,
&pMac->rrm.rrmSmeContext.neighborReportCache);
- }
+ }
#endif
+ }
for (i = 0; i < pNeighborRpt->numNeighborReports; i++)
{
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index f623b8aa45b7..676b3ebb26a7 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -2140,6 +2140,7 @@ eHalStatus sme_TsmIeInd(tHalHandle hHal, tSirSmeTsmIEInd *pSmeTsmIeInd)
\brief function to store the CCKM IE passed from supplicant and use
it while packing reassociation request
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param pCckmIe - pointer to CCKM IE data
\param pCckmIeLen - length of the CCKM IE
\- return Success or failure
@@ -2602,7 +2603,8 @@ eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg)
#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
case eWNI_SME_ROAM_SCAN_OFFLOAD_RSP:
- status = csrRoamOffloadScanRspHdlr((void *)pMac, pMsg->bodyval);
+ status = csrRoamOffloadScanRspHdlr((void *)pMac, pMsg->bodyptr);
+ vos_mem_free(pMsg->bodyptr);
break;
#endif // WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -3031,6 +3033,8 @@ eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *
{
eHalStatus status = eHAL_STATUS_FAILURE;
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
MTRACE(vos_trace(VOS_MODULE_ID_SME,
TRACE_CODE_SME_RX_HDD_MSG_SCAN_REQ, sessionId, pscanReq->scanType));
smsLog(pMac, LOG2, FL("enter"));
@@ -3059,7 +3063,7 @@ eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *
{
smsLog(pMac, LOGE, FL("Scan denied in state %s (sub-state %d)"),
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState),
+ pNeighborRoamInfo->neighborRoamState),
pMac->roam.curSubState[sessionId]);
/*HandOff is in progress. So schedule this scan later*/
status = eHAL_STATUS_RESOURCES;
@@ -3130,7 +3134,7 @@ eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId)
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
- status = csrScanFlushResult( hHal );
+ status = csrScanFlushResult(hHal, sessionId);
sme_ReleaseGlobalLock( &pMac->sme );
}
@@ -6876,16 +6880,20 @@ eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent)
\param hHal - The handle returned by macOpen.
\param bssid - Pointer to the BSSID to roam to.
\param fastRoamTrig - Trigger to Scan or roam
+ \param sessionId - Session Identifier
\return eHalStatus
---------------------------------------------------------------------------*/
-eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
- tANI_U8 *bssid,
- tSmeFastRoamTrigger fastRoamTrig)
+eHalStatus smeIssueFastRoamNeighborAPEvent(tHalHandle hHal,
+ tANI_U8 *bssid,
+ tSmeFastRoamTrigger fastRoamTrig,
+ tANI_U8 sessionId)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
eHalStatus status = eHAL_STATUS_SUCCESS;
+ tFTRoamCallbackUsrCtx *pUsrCtx;
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
@@ -6902,7 +6910,7 @@ eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
smsLog(pMac, LOG1, "Calling Roam Look Up down Event BSSID "
MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pNeighborRoamInfo->cfgRoambssId));
- vosStatus = csrNeighborRoamTransitToCFGChanScan(pMac);
+ vosStatus = csrNeighborRoamTransitToCFGChanScan(pMac, sessionId);
if (VOS_STATUS_SUCCESS != vosStatus)
{
smsLog(pMac, LOGE,
@@ -6918,10 +6926,19 @@ eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
smsLog(pMac, LOG1, "Roam to BSSID "MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(pNeighborRoamInfo->cfgRoambssId));
- vosStatus = csrNeighborRoamReassocIndCallback(pMac->roam.gVosContext,
- 0,
- pMac,
- 0);
+ pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx));
+ if (NULL == pUsrCtx) {
+ smsLog(pMac, LOGE, FL("Memory allocation failed"));
+ return eHAL_STATUS_FAILED_ALLOC;
+ }
+
+ /* Populate user context */
+ pUsrCtx->pMac = pMac;
+ pUsrCtx->sessionId = sessionId;
+
+ vosStatus = csrNeighborRoamReassocIndCallback(
+ pMac->roam.gVosContext,
+ 0, pUsrCtx, 0);
if (!VOS_IS_STATUS_SUCCESS(vosStatus))
{
@@ -6939,6 +6956,7 @@ eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
\fn sme_SetHostOffload
\brief API to set the host offload feature.
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
\param pRequest - Pointer to the offload request.
\return eHalStatus
---------------------------------------------------------------------------*/
@@ -8701,10 +8719,11 @@ tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel)
\fn sme_SetFreqBand
\brief Used to set frequency band.
\param hHal
+ \param sessionId - Session Identifier
\eBand band value to be configured
\- return eHalStatus
-------------------------------------------------------------------------*/
-eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand)
+eHalStatus sme_SetFreqBand(tHalHandle hHal, tANI_U8 sessionId, eCsrBand eBand)
{
eHalStatus status = eHAL_STATUS_FAILURE;
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
@@ -8712,7 +8731,7 @@ eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand)
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
- status = csrSetBand(hHal, eBand);
+ status = csrSetBand(hHal, sessionId, eBand);
sme_ReleaseGlobalLock( &pMac->sme );
}
return status;
@@ -9240,10 +9259,12 @@ eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand)
This function is called through dynamic setConfig callback function
to update roam scan N probes
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param nProbes number of probe requests to be sent out
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes)
+eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, tANI_U8 sessionId,
+ const v_U8_t nProbes)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -9263,7 +9284,7 @@ eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes)
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_NPROBES_CHANGED);
}
#endif
@@ -9276,12 +9297,15 @@ eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes)
This function is called through dynamic setConfig callback function
to update roam scan home away time
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param nRoamScanAwayTime Scan home away time
\param bSendOffloadCmd If TRUE then send offload command to firmware
If FALSE then command is not sent to firmware
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal, const v_U16_t nRoamScanHomeAwayTime,
+eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
+ tANI_U8 sessionId,
+ const v_U16_t nRoamScanHomeAwayTime,
const eAniBoolean bSendOffloadCmd)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
@@ -9303,7 +9327,7 @@ eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal, const v_U16_t nRoamSc
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled && bSendOffloadCmd)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_HOME_AWAY_TIME_CHANGED);
}
#endif
@@ -9359,10 +9383,13 @@ v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal)
\param hHal - HAL handle for device
\param nImmediateRoamRssiDiff - minimum rssi difference between potential
candidate and current AP.
+ \param sessionId - Session Identifier
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff)
+eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal,
+ v_U8_t nImmediateRoamRssiDiff,
+ tANI_U8 sessionId)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -9377,7 +9404,7 @@ eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoa
nImmediateRoamRssiDiff,
pMac->roam.configParam.nImmediateRoamRssiDiff,
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState));
pMac->roam.configParam.nImmediateRoamRssiDiff = nImmediateRoamRssiDiff;
sme_ReleaseGlobalLock( &pMac->sme );
}
@@ -9392,12 +9419,14 @@ eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoa
to configure RoamRssiDiff
Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param RoamRssiDiff - minimum rssi difference between potential
candidate and current AP.
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff)
+eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, tANI_U8 sessionId,
+ v_U8_t RoamRssiDiff)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -9410,14 +9439,15 @@ eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff)
RoamRssiDiff,
pMac->roam.configParam.RoamRssiDiff,
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState));
pMac->roam.configParam.RoamRssiDiff = RoamRssiDiff;
sme_ReleaseGlobalLock( &pMac->sme );
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG, REASON_RSSI_DIFF_CHANGED);
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ REASON_RSSI_DIFF_CHANGED);
}
#endif
return status ;
@@ -9461,11 +9491,14 @@ eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
This function is called through dynamic setConfig callback function
to configure isWESModeEnabled
\param hHal - HAL handle for device
+ \param isWESModeEnabled - WES mode
+ \param sessionId - Session Identifier
\return eHAL_STATUS_SUCCESS - SME update isWESModeEnabled config successfully.
Other status means SME is failed to update isWESModeEnabled.
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled)
+eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled,
+ tANI_U8 sessionId)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -9478,7 +9511,7 @@ eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled)
isWESModeEnabled,
pMac->roam.configParam.isWESModeEnabled,
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState));
pMac->roam.configParam.isWESModeEnabled = isWESModeEnabled;
sme_ReleaseGlobalLock( &pMac->sme );
}
@@ -9493,10 +9526,12 @@ eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled)
if roam scan control is set to 0, roaming scan cache is cleared
any value other than 0 is treated as invalid value
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\return eHAL_STATUS_SUCCESS - SME update config successfully.
Other status means SME failure to update
-------------------------------------------------------------------------*/
-eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl)
+eHalStatus sme_SetRoamScanControl(tHalHandle hHal, tANI_U8 sessionId,
+ v_BOOL_t roamScanControl)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -9511,17 +9546,19 @@ eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl)
roamScanControl,
pMac->roam.configParam.nRoamScanControl,
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState));
pMac->roam.configParam.nRoamScanControl = roamScanControl;
if ( 0 == roamScanControl)
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
"LFR runtime successfully cleared roam scan cache");
- csrFlushCfgBgScanRoamChannelList(pMac);
+ csrFlushCfgBgScanRoamChannelList(pMac, sessionId);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG, REASON_FLUSH_CHANNEL_LIST);
+ csrRoamOffloadScan(pMac, sessionId,
+ ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ REASON_FLUSH_CHANNEL_LIST);
}
#endif
}
@@ -9538,30 +9575,37 @@ eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl)
isFastRoamIniFeatureEnabled.
This is a synchronous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
\return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
Other status means SME is failed to update isFastRoamIniFeatureEnabled.
\sa
--------------------------------------------------------------------------*/
-eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
- const v_BOOL_t isFastRoamIniFeatureEnabled)
+eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled
+(
+ tHalHandle hHal,
+ tANI_U8 sessionId,
+ const v_BOOL_t isFastRoamIniFeatureEnabled)
{
- tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- if (pMac->roam.configParam.isFastRoamIniFeatureEnabled == isFastRoamIniFeatureEnabled)
- {
+ if (pMac->roam.configParam.isFastRoamIniFeatureEnabled ==
+ isFastRoamIniFeatureEnabled)
+ {
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
"%s: FastRoam is already enabled or disabled, nothing to do (returning) old(%d) new(%d)", __func__,
- pMac->roam.configParam.isFastRoamIniFeatureEnabled,
- isFastRoamIniFeatureEnabled);
- return eHAL_STATUS_SUCCESS;
- }
+ pMac->roam.configParam.isFastRoamIniFeatureEnabled,
+ isFastRoamIniFeatureEnabled);
+ return eHAL_STATUS_SUCCESS;
+ }
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
"%s: FastRoamEnabled is changed from %d to %d", __func__,
- pMac->roam.configParam.isFastRoamIniFeatureEnabled,
- isFastRoamIniFeatureEnabled);
- pMac->roam.configParam.isFastRoamIniFeatureEnabled = isFastRoamIniFeatureEnabled;
- csrNeighborRoamUpdateFastRoamingEnabled(pMac, isFastRoamIniFeatureEnabled);
+ pMac->roam.configParam.isFastRoamIniFeatureEnabled,
+ isFastRoamIniFeatureEnabled);
+ pMac->roam.configParam.isFastRoamIniFeatureEnabled =
+ isFastRoamIniFeatureEnabled;
+ csrNeighborRoamUpdateFastRoamingEnabled(pMac, sessionId,
+ isFastRoamIniFeatureEnabled);
return eHAL_STATUS_SUCCESS;
}
@@ -9600,6 +9644,54 @@ eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
/*--------------------------------------------------------------------------
+ \brief sme_stopRoaming() - Stop roaming for a given sessionId
+ This is a synchronous call
+ \param hHal - The handle returned by macOpen
+ \param sessionId - Session Identifier
+ \return eHAL_STATUS_SUCCESS on success
+ Other status on failure
+ \sa
+ --------------------------------------------------------------------------*/
+eHalStatus sme_stopRoaming(tHalHandle hHal,
+ tANI_U8 sessionId,
+ tANI_U8 reason)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ eHalStatus status = eHAL_STATUS_SUCCESS;
+
+ if (eHAL_STATUS_SUCCESS == (status = sme_AcquireGlobalLock(&pMac->sme))) {
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_STOP, reason);
+ sme_ReleaseGlobalLock(&pMac->sme);
+ }
+
+ return status;
+}
+
+/*--------------------------------------------------------------------------
+ \brief sme_startRoaming() - Start roaming for a given sessionId
+ This is a synchronous call
+ \param hHal - The handle returned by macOpen
+ \param sessionId - Session Identifier
+ \return eHAL_STATUS_SUCCESS on success
+ Other status on failure
+ \sa
+ --------------------------------------------------------------------------*/
+eHalStatus sme_startRoaming(tHalHandle hHal,
+ tANI_U8 sessionId,
+ tANI_U8 reason)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ eHalStatus status = eHAL_STATUS_SUCCESS;
+
+ if (eHAL_STATUS_SUCCESS == (status = sme_AcquireGlobalLock(&pMac->sme))) {
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_START, reason);
+ sme_ReleaseGlobalLock(&pMac->sme);
+ }
+
+ return status;
+}
+
+/*--------------------------------------------------------------------------
\brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
This is a synchronuous call
\param hHal - The handle returned by macOpen.
@@ -9638,44 +9730,49 @@ eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
isEseIniFeatureEnabled.
This is a synchronous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \param isEseIniFeatureEnabled - flag to enable/disable
\return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
Other status means SME is failed to update isEseIniFeatureEnabled.
\sa
--------------------------------------------------------------------------*/
-
-eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
- const v_BOOL_t isEseIniFeatureEnabled)
+eHalStatus sme_UpdateIsEseFeatureEnabled
+(
+ tHalHandle hHal,
+ tANI_U8 sessionId,
+ const v_BOOL_t isEseIniFeatureEnabled)
{
- tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- if (pMac->roam.configParam.isEseIniFeatureEnabled == isEseIniFeatureEnabled)
- {
+ if (pMac->roam.configParam.isEseIniFeatureEnabled == isEseIniFeatureEnabled)
+ {
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
"%s: ESE Mode is already enabled or disabled, nothing to do (returning) old(%d) new(%d)", __func__,
- pMac->roam.configParam.isEseIniFeatureEnabled,
- isEseIniFeatureEnabled);
- return eHAL_STATUS_SUCCESS;
- }
+ pMac->roam.configParam.isEseIniFeatureEnabled,
+ isEseIniFeatureEnabled);
+ return eHAL_STATUS_SUCCESS;
+ }
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
"%s: EseEnabled is changed from %d to %d", __func__,
- pMac->roam.configParam.isEseIniFeatureEnabled,
- isEseIniFeatureEnabled);
- pMac->roam.configParam.isEseIniFeatureEnabled = isEseIniFeatureEnabled;
- csrNeighborRoamUpdateEseModeEnabled(pMac, isEseIniFeatureEnabled);
+ pMac->roam.configParam.isEseIniFeatureEnabled,
+ isEseIniFeatureEnabled);
+ pMac->roam.configParam.isEseIniFeatureEnabled = isEseIniFeatureEnabled;
+ csrNeighborRoamUpdateEseModeEnabled(pMac, isEseIniFeatureEnabled);
- if(TRUE == isEseIniFeatureEnabled)
- {
- sme_UpdateFastTransitionEnabled(hHal, TRUE);
- }
+ if (TRUE == isEseIniFeatureEnabled)
+ {
+ sme_UpdateFastTransitionEnabled(hHal, TRUE);
+ }
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG, REASON_ESE_INI_CFG_CHANGED);
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ REASON_ESE_INI_CFG_CHANGED);
}
#endif
- return eHAL_STATUS_SUCCESS;
+ return eHAL_STATUS_SUCCESS;
}
#endif /* FEATURE_WLAN_ESE */
@@ -9713,12 +9810,14 @@ eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
This function is called through dynamic setConfig callback function
to configure nOpportunisticThresholdDiff
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param nOpportunisticThresholdDiff - Opportunistic Scan threshold diff
\return eHAL_STATUS_SUCCESS - SME update nOpportunisticThresholdDiff config
successfully.
else SME is failed to update nOpportunisticThresholdDiff.
-------------------------------------------------------------------------*/
eHalStatus sme_SetRoamOpportunisticScanThresholdDiff(tHalHandle hHal,
+ tANI_U8 sessionId,
const v_U8_t nOpportunisticThresholdDiff)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
@@ -9728,6 +9827,7 @@ eHalStatus sme_SetRoamOpportunisticScanThresholdDiff(tHalHandle hHal,
if ( HAL_STATUS_SUCCESS( status ) )
{
status = csrNeighborRoamSetOpportunisticScanThresholdDiff(pMac,
+ sessionId,
nOpportunisticThresholdDiff);
if (HAL_STATUS_SUCCESS(status))
{
@@ -9737,7 +9837,7 @@ eHalStatus sme_SetRoamOpportunisticScanThresholdDiff(tHalHandle hHal,
" - old value is %d - roam state is %d",
nOpportunisticThresholdDiff,
pMac->roam.configParam.neighborRoamConfig.nOpportunisticThresholdDiff,
- pMac->roam.neighborRoamInfo.neighborRoamState);
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState);
pMac->roam.configParam.neighborRoamConfig.nOpportunisticThresholdDiff = nOpportunisticThresholdDiff;
}
sme_ReleaseGlobalLock( &pMac->sme );
@@ -9765,12 +9865,14 @@ v_U8_t sme_GetRoamOpportunisticScanThresholdDiff(tHalHandle hHal)
This function is called through dynamic setConfig callback function
to configure nRoamRescanRssiDiff
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param nRoamRescanRssiDiff - roam rescan rssi diff
\return eHAL_STATUS_SUCCESS - SME update nRoamRescanRssiDiff config
successfully.
else SME is failed to update nRoamRescanRssiDiff.
-------------------------------------------------------------------------*/
eHalStatus sme_SetRoamRescanRssiDiff(tHalHandle hHal,
+ tANI_U8 sessionId,
const v_U8_t nRoamRescanRssiDiff)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
@@ -9779,7 +9881,7 @@ eHalStatus sme_SetRoamRescanRssiDiff(tHalHandle hHal,
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
- status = csrNeighborRoamSetRoamRescanRssiDiff(pMac,
+ status = csrNeighborRoamSetRoamRescanRssiDiff(pMac, sessionId,
nRoamRescanRssiDiff);
if (HAL_STATUS_SUCCESS(status))
{
@@ -9789,7 +9891,7 @@ eHalStatus sme_SetRoamRescanRssiDiff(tHalHandle hHal,
" - old value is %d - roam state is %d",
nRoamRescanRssiDiff,
pMac->roam.configParam.neighborRoamConfig.nRoamRescanRssiDiff,
- pMac->roam.neighborRoamInfo.neighborRoamState);
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState);
pMac->roam.configParam.neighborRoamConfig.nRoamRescanRssiDiff =
nRoamRescanRssiDiff;
}
@@ -9818,12 +9920,14 @@ v_U8_t sme_GetRoamRescanRssiDiff(tHalHandle hHal)
This function is called through dynamic setConfig callback function
to configure nRoamBmissFirstBcnt
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param nRoamBmissFirstBcnt - Roam first bmiss count
\return eHAL_STATUS_SUCCESS - SME update nRoamBmissFirstBcnt
successfully.
else SME is failed to update nRoamBmissFirstBcnt
-------------------------------------------------------------------------*/
eHalStatus sme_SetRoamBmissFirstBcnt(tHalHandle hHal,
+ tANI_U8 sessionId,
const v_U8_t nRoamBmissFirstBcnt)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
@@ -9832,7 +9936,8 @@ eHalStatus sme_SetRoamBmissFirstBcnt(tHalHandle hHal,
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
- status = csrNeighborRoamSetRoamBmissFirstBcnt(pMac, nRoamBmissFirstBcnt);
+ status = csrNeighborRoamSetRoamBmissFirstBcnt(pMac, sessionId,
+ nRoamBmissFirstBcnt);
if (HAL_STATUS_SUCCESS(status))
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
@@ -9841,7 +9946,7 @@ eHalStatus sme_SetRoamBmissFirstBcnt(tHalHandle hHal,
" - old value is %d - roam state is %d",
nRoamBmissFirstBcnt,
pMac->roam.configParam.neighborRoamConfig.nRoamBmissFirstBcnt,
- pMac->roam.neighborRoamInfo.neighborRoamState);
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState);
pMac->roam.configParam.neighborRoamConfig.nRoamBmissFirstBcnt =
nRoamBmissFirstBcnt;
}
@@ -9851,10 +9956,10 @@ eHalStatus sme_SetRoamBmissFirstBcnt(tHalHandle hHal,
}
/* ---------------------------------------------------------------------------
- \fn sme_getNeighborScanPeriod
- \brief get neighbor scan period
+ \fn sme_GetRoamBmissFirstBcnt
+ \brief get neighbor roam beacon miss first count
\param hHal - The handle returned by macOpen.
- \return v_U16_t - neighbor scan period
+ \return v_U8_t - neighbor roam beacon miss first count
-------------------------------------------------------------------------*/
v_U8_t sme_GetRoamBmissFirstBcnt(tHalHandle hHal)
{
@@ -9868,12 +9973,14 @@ v_U8_t sme_GetRoamBmissFirstBcnt(tHalHandle hHal)
This function is called through dynamic setConfig callback function
to configure nRoamBmissFinalBcnt
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param nRoamBmissFinalBcnt - Roam final bmiss count
\return eHAL_STATUS_SUCCESS - SME update nRoamBmissFinalBcnt
successfully.
else SME is failed to update nRoamBmissFinalBcnt
-------------------------------------------------------------------------*/
eHalStatus sme_SetRoamBmissFinalBcnt(tHalHandle hHal,
+ tANI_U8 sessionId,
const v_U8_t nRoamBmissFinalBcnt)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
@@ -9882,7 +9989,8 @@ eHalStatus sme_SetRoamBmissFinalBcnt(tHalHandle hHal,
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
- status = csrNeighborRoamSetRoamBmissFinalBcnt(pMac, nRoamBmissFinalBcnt);
+ status = csrNeighborRoamSetRoamBmissFinalBcnt(pMac, sessionId,
+ nRoamBmissFinalBcnt);
if (HAL_STATUS_SUCCESS(status))
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
@@ -9891,7 +9999,7 @@ eHalStatus sme_SetRoamBmissFinalBcnt(tHalHandle hHal,
" - old value is %d - roam state is %d",
nRoamBmissFinalBcnt,
pMac->roam.configParam.neighborRoamConfig.nRoamBmissFinalBcnt,
- pMac->roam.neighborRoamInfo.neighborRoamState);
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState);
pMac->roam.configParam.neighborRoamConfig.nRoamBmissFinalBcnt =
nRoamBmissFinalBcnt;
}
@@ -9920,12 +10028,14 @@ v_U8_t sme_GetRoamBmissFinalBcnt(tHalHandle hHal)
This function is called through dynamic setConfig callback function
to configure nRoamBeaconRssiWeight
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param nRoamBeaconRssiWeight - Roam beacon rssi weight
\return eHAL_STATUS_SUCCESS - SME update nRoamBeaconRssiWeight config
successfully.
else SME is failed to update nRoamBeaconRssiWeight
-------------------------------------------------------------------------*/
eHalStatus sme_SetRoamBeaconRssiWeight(tHalHandle hHal,
+ tANI_U8 sessionId,
const v_U8_t nRoamBeaconRssiWeight)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
@@ -9934,7 +10044,8 @@ eHalStatus sme_SetRoamBeaconRssiWeight(tHalHandle hHal,
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
- status = csrNeighborRoamSetRoamBeaconRssiWeight(pMac, nRoamBeaconRssiWeight);
+ status = csrNeighborRoamSetRoamBeaconRssiWeight(pMac, sessionId,
+ nRoamBeaconRssiWeight);
if (HAL_STATUS_SUCCESS(status))
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
@@ -9943,7 +10054,7 @@ eHalStatus sme_SetRoamBeaconRssiWeight(tHalHandle hHal,
" - old value is %d - roam state is %d",
nRoamBeaconRssiWeight,
pMac->roam.configParam.neighborRoamConfig.nRoamBeaconRssiWeight,
- pMac->roam.neighborRoamInfo.neighborRoamState);
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState);
pMac->roam.configParam.neighborRoamConfig.nRoamBeaconRssiWeight =
nRoamBeaconRssiWeight;
}
@@ -9969,20 +10080,25 @@ v_U8_t sme_GetRoamBeaconRssiWeight(tHalHandle hHal)
\brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
This is a synchronous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
\sa
--------------------------------------------------------------------------*/
-eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
- v_U8_t neighborLookupRssiThreshold)
+eHalStatus sme_setNeighborLookupRssiThreshold
+(
+ tHalHandle hHal,
+ tANI_U8 sessionId,
+ v_U8_t neighborLookupRssiThreshold)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
status = sme_AcquireGlobalLock( &pMac->sme );
- if ( HAL_STATUS_SUCCESS( status ) )
+ if (HAL_STATUS_SUCCESS(status))
{
- status = csrNeighborRoamSetLookupRssiThreshold(pMac, neighborLookupRssiThreshold);
+ status = csrNeighborRoamSetLookupRssiThreshold(pMac, sessionId,
+ neighborLookupRssiThreshold);
if (HAL_STATUS_SUCCESS(status))
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
@@ -9990,7 +10106,7 @@ eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
neighborLookupRssiThreshold,
pMac->roam.configParam.neighborRoamConfig.nNeighborLookupRssiThreshold,
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState));
pMac->roam.configParam.neighborRoamConfig.nNeighborLookupRssiThreshold =
neighborLookupRssiThreshold;
}
@@ -10003,28 +10119,36 @@ eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
\brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
This is a synchronous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
\sa
--------------------------------------------------------------------------*/
-eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
- v_U8_t neighborReassocRssiThreshold)
+eHalStatus sme_setNeighborReassocRssiThreshold
+(
+ tHalHandle hHal,
+ tANI_U8 sessionId,
+ v_U8_t neighborReassocRssiThreshold)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
+ tCsrNeighborRoamConfig *pNeighborRoamConfig = NULL;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo = NULL;
status = sme_AcquireGlobalLock( &pMac->sme );
- if ( HAL_STATUS_SUCCESS( status ) )
+ if (HAL_STATUS_SUCCESS(status))
{
+ pNeighborRoamConfig = &pMac->roam.configParam.neighborRoamConfig;
+ pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[sessionId];
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
"LFR runtime successfully set Reassoc threshold to %d- old value is %d - roam state is %s",
neighborReassocRssiThreshold,
pMac->roam.configParam.neighborRoamConfig.nNeighborReassocRssiThreshold,
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
- pMac->roam.configParam.neighborRoamConfig.nNeighborReassocRssiThreshold =
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState));
+ pNeighborRoamConfig->nNeighborReassocRssiThreshold =
neighborReassocRssiThreshold;
- pMac->roam.neighborRoamInfo.cfgParams.neighborReassocThreshold =
+ pNeighborRoamInfo->cfgParams.neighborReassocThreshold =
neighborReassocRssiThreshold;
sme_ReleaseGlobalLock( &pMac->sme );
}
@@ -10051,28 +10175,36 @@ v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal)
\brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
This is a synchronous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
\sa
--------------------------------------------------------------------------*/
-eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
- v_U16_t neighborScanResultsRefreshPeriod)
+eHalStatus sme_setNeighborScanRefreshPeriod
+(
+ tHalHandle hHal,
+ tANI_U8 sessionId,
+ v_U16_t neighborScanResultsRefreshPeriod)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
+ tCsrNeighborRoamConfig *pNeighborRoamConfig = NULL;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo = NULL;
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
+ pNeighborRoamConfig = &pMac->roam.configParam.neighborRoamConfig;
+ pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[sessionId];
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
"LFR runtime successfully set roam scan refresh period to %d- old value is %d - roam state is %s",
neighborScanResultsRefreshPeriod,
pMac->roam.configParam.neighborRoamConfig.nNeighborResultsRefreshPeriod,
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
- pMac->roam.configParam.neighborRoamConfig.nNeighborResultsRefreshPeriod =
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState));
+ pNeighborRoamConfig->nNeighborResultsRefreshPeriod =
neighborScanResultsRefreshPeriod;
- pMac->roam.neighborRoamInfo.cfgParams.neighborResultsRefreshPeriod =
+ pNeighborRoamInfo->cfgParams.neighborResultsRefreshPeriod =
neighborScanResultsRefreshPeriod;
sme_ReleaseGlobalLock( &pMac->sme );
@@ -10081,7 +10213,7 @@ eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_NEIGHBOR_SCAN_REFRESH_PERIOD_CHANGED);
}
#endif
@@ -10110,11 +10242,12 @@ eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal,
if ( HAL_STATUS_SUCCESS( status ) )
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
- "%s: gRoamScanOffloadEnabled is changed from %d to %d", __func__,
- pMac->roam.configParam.isRoamOffloadScanEnabled,
- nRoamScanOffloadEnabled);
- pMac->roam.configParam.isRoamOffloadScanEnabled = nRoamScanOffloadEnabled;
- sme_ReleaseGlobalLock( &pMac->sme );
+ FL("gRoamScanOffloadEnabled is changed from %d to %d"),
+ pMac->roam.configParam.isRoamOffloadScanEnabled,
+ nRoamScanOffloadEnabled);
+ pMac->roam.configParam.isRoamOffloadScanEnabled =
+ nRoamScanOffloadEnabled;
+ sme_ReleaseGlobalLock(&pMac->sme);
}
return status ;
@@ -10155,33 +10288,40 @@ v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal)
to configure nEmptyScanRefreshPeriod
Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param nEmptyScanRefreshPeriod - scan period following empty scan results.
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod)
+eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, tANI_U8 sessionId,
+ v_U16_t nEmptyScanRefreshPeriod)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
+ tCsrNeighborRoamConfig *pNeighborRoamConfig = NULL;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo = NULL;
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
+ pNeighborRoamConfig = &pMac->roam.configParam.neighborRoamConfig;
+ pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[sessionId];
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
"LFR runtime successfully set roam scan period to %d -old value is %d - roam state is %s",
nEmptyScanRefreshPeriod,
pMac->roam.configParam.neighborRoamConfig.nEmptyScanRefreshPeriod,
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
- pMac->roam.configParam.neighborRoamConfig.nEmptyScanRefreshPeriod = nEmptyScanRefreshPeriod;
- pMac->roam.neighborRoamInfo.cfgParams.emptyScanRefreshPeriod = nEmptyScanRefreshPeriod;
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState));
+ pNeighborRoamConfig->nEmptyScanRefreshPeriod = nEmptyScanRefreshPeriod;
+ pNeighborRoamInfo->cfgParams.emptyScanRefreshPeriod =
+ nEmptyScanRefreshPeriod;
sme_ReleaseGlobalLock( &pMac->sme );
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_EMPTY_SCAN_REF_PERIOD_CHANGED);
}
#endif
@@ -10196,9 +10336,12 @@ eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanR
Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
\param hHal - HAL handle for device
\param nNeighborScanMinChanTime - Channel minimum dwell time
+ \param sessionId - Session Identifier
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime)
+eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal,
+ const v_U16_t nNeighborScanMinChanTime,
+ tANI_U8 sessionId)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -10211,9 +10354,12 @@ eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighb
nNeighborScanMinChanTime,
pMac->roam.configParam.neighborRoamConfig.nNeighborScanMinChanTime,
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
- pMac->roam.configParam.neighborRoamConfig.nNeighborScanMinChanTime = nNeighborScanMinChanTime;
- pMac->roam.neighborRoamInfo.cfgParams.minChannelScanTime = nNeighborScanMinChanTime;
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState));
+
+ pMac->roam.configParam.neighborRoamConfig.nNeighborScanMinChanTime =
+ nNeighborScanMinChanTime;
+ pMac->roam.neighborRoamInfo[sessionId].cfgParams.minChannelScanTime =
+ nNeighborScanMinChanTime;
sme_ReleaseGlobalLock( &pMac->sme );
}
@@ -10227,31 +10373,39 @@ eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighb
to configure gNeighborScanChannelMaxTime
Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param nNeighborScanMinChanTime - Channel maximum dwell time
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime)
+eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, tANI_U8 sessionId,
+ const v_U16_t nNeighborScanMaxChanTime)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
+ tCsrNeighborRoamConfig *pNeighborRoamConfig = NULL;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo = NULL;
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
+ pNeighborRoamConfig = &pMac->roam.configParam.neighborRoamConfig;
+ pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[sessionId];
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
"LFR runtime successfully set channel max dwell time to %d - old value is %d - roam state is %s",
nNeighborScanMaxChanTime,
pMac->roam.configParam.neighborRoamConfig.nNeighborScanMaxChanTime,
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
- pMac->roam.configParam.neighborRoamConfig.nNeighborScanMaxChanTime = nNeighborScanMaxChanTime;
- pMac->roam.neighborRoamInfo.cfgParams.maxChannelScanTime = nNeighborScanMaxChanTime;
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState));
+ pNeighborRoamConfig->nNeighborScanMaxChanTime =
+ nNeighborScanMaxChanTime;
+ pNeighborRoamInfo->cfgParams.maxChannelScanTime =
+ nNeighborScanMaxChanTime;
sme_ReleaseGlobalLock( &pMac->sme );
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_SCAN_CH_TIME_CHANGED);
}
#endif
@@ -10263,24 +10417,129 @@ eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighb
\fn sme_getNeighborScanMinChanTime
\brief get neighbor scan min channel time
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
\return v_U16_t - channel min time value
-------------------------------------------------------------------------*/
-v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal)
+v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal, tANI_U8 sessionId)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
- return pMac->roam.neighborRoamInfo.cfgParams.minChannelScanTime;
+ return pMac->roam.neighborRoamInfo[sessionId].cfgParams.minChannelScanTime;
+}
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getNeighborRoamState
+ \brief get neighbor roam state
+ \param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \return v_U32_t - neighbor roam state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getNeighborRoamState(tHalHandle hHal, tANI_U8 sessionId)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ return pMac->roam.neighborRoamInfo[sessionId].neighborRoamState;
+}
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getCurrentRoamState
+ \brief get current roam state
+ \param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \return v_U32_t - current roam state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getCurrentRoamState(tHalHandle hHal, tANI_U8 sessionId)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ return pMac->roam.curState[sessionId];
+}
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getCurrentRoamSubState
+ \brief get neighbor roam sub state
+ \param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \return v_U32_t - current roam sub state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getCurrentRoamSubState(tHalHandle hHal, tANI_U8 sessionId)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ return pMac->roam.curSubState[sessionId];
+}
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getLimSmeState
+ \brief get Lim Sme state
+ \param hHal - The handle returned by macOpen.
+ \return v_U32_t - Lim Sme state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getLimSmeState(tHalHandle hHal)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ return pMac->lim.gLimSmeState;
+}
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getLimMlmState
+ \brief get Lim Mlm state
+ \param hHal - The handle returned by macOpen.
+ \return v_U32_t - Lim Mlm state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getLimMlmState(tHalHandle hHal)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ return pMac->lim.gLimMlmState;
+}
+
+/* ---------------------------------------------------------------------------
+ \fn sme_IsLimSessionValid
+ \brief is Lim session valid
+ \param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \return v_BOOL_t - true or false
+ -------------------------------------------------------------------------*/
+v_BOOL_t sme_IsLimSessionValid(tHalHandle hHal, tANI_U8 sessionId)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ return pMac->lim.gpSession[sessionId].valid;
+}
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getLimSmeSessionState
+ \brief get Lim Sme session state
+ \param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \return v_U32_t - Lim Sme session state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getLimSmeSessionState(tHalHandle hHal, tANI_U8 sessionId)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ return pMac->lim.gpSession[sessionId].limSmeState;
}
/* ---------------------------------------------------------------------------
+ \fn sme_getLimMlmSessionState
+ \brief get Lim Mlm session state
+ \param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \return v_U32_t - Lim Mlm session state
+ -------------------------------------------------------------------------*/
+v_U32_t sme_getLimMlmSessionState(tHalHandle hHal, tANI_U8 sessionId)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ return pMac->lim.gpSession[sessionId].limMlmState;
+}
+
+
+/* ---------------------------------------------------------------------------
\fn sme_getNeighborScanMaxChanTime
\brief get neighbor scan max channel time
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
\return v_U16_t - channel max time value
-------------------------------------------------------------------------*/
-v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal)
+v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal, tANI_U8 sessionId)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
- return pMac->roam.neighborRoamInfo.cfgParams.maxChannelScanTime;
+ return pMac->roam.neighborRoamInfo[sessionId].cfgParams.maxChannelScanTime;
}
/* ---------------------------------------------------------------------------
@@ -10290,32 +10549,38 @@ v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal)
to configure nNeighborScanPeriod
Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 1000]
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param nNeighborScanPeriod - neighbor scan period
\- return Success or failure
-------------------------------------------------------------------------*/
-eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod)
+eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, tANI_U8 sessionId,
+ const v_U16_t nNeighborScanPeriod)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
+ tCsrNeighborRoamConfig *pNeighborRoamConfig = NULL;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo = NULL;
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
+ pNeighborRoamConfig = &pMac->roam.configParam.neighborRoamConfig;
+ pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[sessionId];
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
"LFR runtime successfully set neighbor scan period to %d"
" - old value is %d - roam state is %s",
nNeighborScanPeriod,
pMac->roam.configParam.neighborRoamConfig.nNeighborScanTimerPeriod,
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
- pMac->roam.configParam.neighborRoamConfig.nNeighborScanTimerPeriod = nNeighborScanPeriod;
- pMac->roam.neighborRoamInfo.cfgParams.neighborScanPeriod = nNeighborScanPeriod;
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState));
+ pNeighborRoamConfig->nNeighborScanTimerPeriod = nNeighborScanPeriod;
+ pNeighborRoamInfo->cfgParams.neighborScanPeriod = nNeighborScanPeriod;
sme_ReleaseGlobalLock( &pMac->sme );
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_SCAN_HOME_TIME_CHANGED);
}
#endif
@@ -10327,12 +10592,13 @@ eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborSca
\fn sme_getNeighborScanPeriod
\brief get neighbor scan period
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
\return v_U16_t - neighbor scan period
-------------------------------------------------------------------------*/
-v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal)
+v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal, tANI_U8 sessionId)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
- return pMac->roam.neighborRoamInfo.cfgParams.neighborScanPeriod;
+ return pMac->roam.neighborRoamInfo[sessionId].cfgParams.neighborScanPeriod;
}
#endif
@@ -10356,16 +10622,21 @@ v_U8_t sme_getRoamRssiDiff(tHalHandle hHal)
\brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
This is a synchronous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \param pChannelList - Output channel list
+ \param numChannels - Output number of channels
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
\sa
--------------------------------------------------------------------------*/
-eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
+eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 sessionId,
+ tANI_U8 *pChannelList,
tANI_U8 numChannels)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
tANI_U8 oldChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN*2] = {0};
tANI_U8 newChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN*2] = {0};
tANI_U8 i = 0, j = 0;
@@ -10388,9 +10659,10 @@ eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
}
}
}
- csrFlushCfgBgScanRoamChannelList(pMac);
- csrCreateBgScanRoamChannelList(pMac, pChannelList, numChannels);
- sme_SetRoamScanControl(hHal, 1);
+ csrFlushCfgBgScanRoamChannelList(pMac, sessionId);
+ csrCreateBgScanRoamChannelList(pMac, sessionId, pChannelList,
+ numChannels);
+ sme_SetRoamScanControl(hHal, sessionId, 1);
if (NULL != pNeighborRoamInfo->cfgParams.channelInfo.ChannelList)
{
j = 0;
@@ -10410,13 +10682,15 @@ eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
"LFR runtime successfully set roam scan channels to %s - old value is %s - roam state is %d",
newChannelList, oldChannelList,
- pMac->roam.neighborRoamInfo.neighborRoamState);
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState);
sme_ReleaseGlobalLock( &pMac->sme );
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG, REASON_CHANNEL_LIST_CHANGED);
+ csrRoamOffloadScan(pMac, sessionId,
+ ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ REASON_CHANNEL_LIST_CHANGED);
}
#endif
@@ -10428,18 +10702,22 @@ eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
\brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
This is a synchronuous call
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
+ \param pChannelList - Input channel list
+ \param numChannels - Input number of channels
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
\sa
--------------------------------------------------------------------------*/
eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
+ tANI_U8 sessionId,
tANI_U8 *pChannelList,
tANI_U8 numChannels)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
tpCsrNeighborRoamControlInfo pNeighborRoamInfo
- = &pMac->roam.neighborRoamInfo;
+ = &pMac->roam.neighborRoamInfo[sessionId];
tpCsrChannelInfo currChannelListInfo
= &pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo;
tANI_U8 oldChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN*2] = {0};
@@ -10458,7 +10736,7 @@ eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
currChannelListInfo->ChannelList[i]);
}
}
- status = csrCreateRoamScanChannelList(pMac, pChannelList,
+ status = csrCreateRoamScanChannelList(pMac, sessionId, pChannelList,
numChannels, csrGetCurrentBand(hHal));
if ( HAL_STATUS_SUCCESS( status ))
{
@@ -10477,14 +10755,14 @@ eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
"ESE roam scan channel list successfully set to \
%s - old value is %s - roam state is %d",
newChannelList, oldChannelList,
- pMac->roam.neighborRoamInfo.neighborRoamState);
+ pNeighborRoamInfo->neighborRoamState);
}
sme_ReleaseGlobalLock( &pMac->sme );
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_CHANNEL_LIST_CHANGED);
}
#endif
@@ -10496,17 +10774,21 @@ eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
\brief sme_getRoamScanChannelList() - get roam scan channel list
This is a synchronous call
\param hHal - The handle returned by macOpen.
+ \param pChannelList - Output channel list
+ \param numChannels - Output number of channels
+ \param sessionId - Session Identifier
\return eHAL_STATUS_SUCCESS - SME update config successful.
Other status means SME is failed to update
\sa
--------------------------------------------------------------------------*/
eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
- tANI_U8 *pNumChannels)
+ tANI_U8 *pNumChannels, tANI_U8 sessionId)
{
int i = 0;
tANI_U8 *pOutPtr = pChannelList;
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
+ tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
+ &pMac->roam.neighborRoamInfo[sessionId];
eHalStatus status = eHAL_STATUS_SUCCESS;
status = sme_AcquireGlobalLock( &pMac->sme );
@@ -11529,6 +11811,7 @@ void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode)
from CSR.
This is a synchronous call
\param hHal - The handle returned by macOpen
+ \param sessionId - Session Identifier
\param pHandoffInfo - info provided by HDD with the handoff request (namely:
BSSID, channel etc.)
\return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
@@ -11537,6 +11820,7 @@ void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode)
--------------------------------------------------------------------------*/
eHalStatus sme_HandoffRequest(tHalHandle hHal,
+ tANI_U8 sessionId,
tCsrHandoffRequest *pHandoffInfo)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
@@ -11547,7 +11831,7 @@ eHalStatus sme_HandoffRequest(tHalHandle hHal,
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
"%s: invoked", __func__);
- status = csrHandoffRequest(pMac, pHandoffInfo);
+ status = csrHandoffRequest(pMac, sessionId, pHandoffInfo);
sme_ReleaseGlobalLock( &pMac->sme );
}
@@ -12954,6 +13238,7 @@ eHalStatus sme_StatsExtEvent(tHalHandle hHal, void* pMsg)
This function is called through dynamic setConfig callback function
to configure allowDFSChannelRoam.
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\param allowDFSChannelRoam - DFS roaming scan mode 0 (disable),
1 (passive), 2 (active)
\return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
@@ -12961,7 +13246,8 @@ eHalStatus sme_StatsExtEvent(tHalHandle hHal, void* pMsg)
Other status means SME failed to update DFS roaming scan config.
\sa
-------------------------------------------------------------------------*/
-eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, v_U8_t allowDFSChannelRoam)
+eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 sessionId,
+ v_U8_t allowDFSChannelRoam)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -12975,14 +13261,14 @@ eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, v_U8_t allowDFSChannelRoam)
allowDFSChannelRoam,
pMac->roam.configParam.allowDFSChannelRoam,
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState));
+ pMac->roam.neighborRoamInfo[sessionId].neighborRoamState));
pMac->roam.configParam.allowDFSChannelRoam = allowDFSChannelRoam;
sme_ReleaseGlobalLock( &pMac->sme );
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadScanEnabled)
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_ROAM_DFS_SCAN_MODE_CHANGED);
}
#endif
@@ -13057,16 +13343,17 @@ eHalStatus sme_UpdateAddIE(tHalHandle hHal,
\fn sme_staInMiddleOfRoaming
\brief This function returns TRUE if STA is in the middle of roaming state
\param hHal - HAL handle for device
+ \param sessionId - Session Identifier
\- return TRUE or FALSE
-------------------------------------------------------------------------*/
-tANI_BOOLEAN sme_staInMiddleOfRoaming(tHalHandle hHal)
+tANI_BOOLEAN sme_staInMiddleOfRoaming(tHalHandle hHal, tANI_U8 sessionId)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
tANI_BOOLEAN ret = FALSE;
if (eHAL_STATUS_SUCCESS == (status = sme_AcquireGlobalLock(&pMac->sme))) {
- ret = csrNeighborMiddleOfRoaming(hHal);
+ ret = csrNeighborMiddleOfRoaming(hHal, sessionId);
sme_ReleaseGlobalLock(&pMac->sme);
}
return ret;
@@ -13153,10 +13440,11 @@ VOS_STATUS sme_UpdateDSCPtoUPMapping( tHalHandle hHal,
\fn sme_abortRoamScan
\brief API to abort current roam scan cycle by roam scan offload module.
\param hHal - The handle returned by macOpen.
+ \param sessionId - Session Identifier
\return eHalStatus
---------------------------------------------------------------------------*/
-eHalStatus sme_abortRoamScan(tHalHandle hHal)
+eHalStatus sme_abortRoamScan(tHalHandle hHal, tANI_U8 sessionId)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
@@ -13166,9 +13454,9 @@ eHalStatus sme_abortRoamScan(tHalHandle hHal)
{
/* acquire the lock for the sme object */
status = sme_AcquireGlobalLock(&pMac->sme);
- if(HAL_STATUS_SUCCESS(status))
+ if (HAL_STATUS_SUCCESS(status))
{
- csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_ABORT_SCAN,
+ csrRoamOffloadScan(pMac, sessionId, ROAM_SCAN_OFFLOAD_ABORT_SCAN,
REASON_ROAM_ABORT_ROAM_SCAN);
/* release the lock for the sme object */
sme_ReleaseGlobalLock( &pMac->sme );
diff --git a/CORE/SME/src/sme_common/sme_FTApi.c b/CORE/SME/src/sme_common/sme_FTApi.c
index 3c0b19ccdab1..2ce4e02d9f9a 100644
--- a/CORE/SME/src/sme_common/sme_FTApi.c
+++ b/CORE/SME/src/sme_common/sme_FTApi.c
@@ -53,18 +53,30 @@ void sme_FTOpen(tHalHandle hHal, tANI_U32 sessionId)
/* Clear existing context data if any */
pSession = CSR_GET_SESSION( pMac, sessionId );
if (NULL != pSession) {
-
/* Clean up the context */
vos_mem_set(&pSession->ftSmeContext, sizeof(tftSMEContext), 0);
+ pSession->ftSmeContext.pUsrCtx = vos_mem_malloc(
+ sizeof(tFTRoamCallbackUsrCtx));
+
+ if (NULL == pSession->ftSmeContext.pUsrCtx) {
+ smsLog(pMac, LOGE, FL("Memory allocation failure"));
+ return;
+ }
+ pSession->ftSmeContext.pUsrCtx->pMac = pMac;
+ pSession->ftSmeContext.pUsrCtx->sessionId = sessionId;
+
status =
vos_timer_init(&pSession->ftSmeContext.preAuthReassocIntvlTimer,
VOS_TIMER_TYPE_SW,
- sme_PreauthReassocIntvlTimerCallback, (void *)pMac);
+ sme_PreauthReassocIntvlTimerCallback,
+ (void *)pSession->ftSmeContext.pUsrCtx);
if (eHAL_STATUS_SUCCESS != status) {
smsLog(pMac, LOGE,
FL("Preauth Reassoc interval Timer allocation failed"));
+ vos_mem_free(pSession->ftSmeContext.pUsrCtx);
+ pSession->ftSmeContext.pUsrCtx = NULL;
return;
}
}
@@ -98,6 +110,13 @@ void sme_FTClose(tHalHandle hHal, tANI_U32 sessionId)
{
smsLog(pMac, LOGE, FL("preAuthReAssocTimer destroy failed"));
}
+
+ if (pSession->ftSmeContext.pUsrCtx != NULL) {
+ smsLog(pMac, LOG1,
+ FL("Freeing ftSmeContext.pUsrCtx and setting to NULL"));
+ vos_mem_free(pSession->ftSmeContext.pUsrCtx);
+ pSession->ftSmeContext.pUsrCtx = NULL;
+ }
}
}
@@ -537,10 +556,12 @@ void sme_GetRICIEs(tHalHandle hHal, tANI_U32 sessionId, tANI_U8 *ric_ies,
*------------------------------------------------------------------------*/
void sme_PreauthReassocIntvlTimerCallback(void *context)
{
-
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
- tpAniSirGlobal pMac = (tpAniSirGlobal )context;
- csrNeighborRoamRequestHandoff(pMac);
+ tFTRoamCallbackUsrCtx *pUsrCtx = (tFTRoamCallbackUsrCtx *)context;
+
+ if (pUsrCtx) {
+ csrNeighborRoamRequestHandoff(pUsrCtx->pMac, pUsrCtx->sessionId);
+ }
#endif
return;
}