wlan: Insure that LFR BG scanning is not performed for any non-Infra association.
Insure that LFR BG scanning is not performed
for any non-Infra association.
Modify csrRoamIsFastRoamEnabled() to check
the persona for the association.
Return FALSE is the persona is not VOS_STA_MODE.
Change-Id: I68bad6ccdd985dce2abf1cd80724e0b30f43b18a
CR-Fixed: 423980
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 6790e4a..6e9a0f4 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -4431,8 +4431,22 @@
#endif
#ifdef FEATURE_WLAN_LFR
//Returns whether "Legacy Fast Roaming" is currently enabled...or not
-tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac)
+tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId)
{
+ tCsrRoamSession *pSession = NULL;
+
+ if (CSR_IS_SESSION_VALID( pMac, sessionId ) )
+ {
+ pSession = CSR_GET_SESSION( pMac, sessionId );
+ if (NULL != pSession->pCurRoamProfile)
+ {
+ if (pSession->pCurRoamProfile->csrPersona != VOS_STA_MODE)
+ {
+ return eANI_BOOLEAN_FALSE;
+ }
+ }
+ }
+
return (pMac->roam.configParam.isFastRoamIniFeatureEnabled &&
(!csrIsConcurrentSessionRunning(pMac)));
}
@@ -6813,7 +6827,7 @@
#endif
#ifdef FEATURE_WLAN_LFR
if (csrRoamIsHandoffInProgress(pMac) &&
- csrRoamIsFastRoamEnabled(pMac))
+ csrRoamIsFastRoamEnabled(pMac, sessionId))
{
// Now serialize the reassoc command.
status = csrRoamIssueReassociateCmd(pMac, sessionId);
@@ -8185,7 +8199,7 @@
}
#endif
#ifdef FEATURE_WLAN_LFR
- if (csrRoamIsFastRoamEnabled(pMac) && (csrNeighborRoamStatePreauthDone(pMac)))
+ if (csrRoamIsFastRoamEnabled(pMac, sessionId) && (csrNeighborRoamStatePreauthDone(pMac)))
{
csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac);
}
@@ -8249,7 +8263,7 @@
}
#endif
#ifdef FEATURE_WLAN_LFR
- if (csrRoamIsFastRoamEnabled(pMac) && (csrNeighborRoamStatePreauthDone(pMac)))
+ if (csrRoamIsFastRoamEnabled(pMac, sessionId) && (csrNeighborRoamStatePreauthDone(pMac)))
{
csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac);
}
@@ -11397,7 +11411,7 @@
// Fill in isFastTransitionEnabled
if (pMac->roam.configParam.isFastTransitionEnabled
#ifdef FEATURE_WLAN_LFR
- || csrRoamIsFastRoamEnabled(pMac)
+ || csrRoamIsFastRoamEnabled(pMac, sessionId)
#endif
)
{
@@ -11413,7 +11427,7 @@
}
#endif
#ifdef FEATURE_WLAN_LFR
- if(csrRoamIsFastRoamEnabled(pMac))
+ if(csrRoamIsFastRoamEnabled(pMac, sessionId))
{
//legacy fast roaming enabled
dwTmp = pal_cpu_to_be32(TRUE);
@@ -11814,7 +11828,7 @@
// Fill in isFastTransitionEnabled
if (pMac->roam.configParam.isFastTransitionEnabled
#ifdef FEATURE_WLAN_LFR
- || csrRoamIsFastRoamEnabled(pMac)
+ || csrRoamIsFastRoamEnabled(pMac, sessionId)
#endif
)
{
@@ -11830,7 +11844,7 @@
}
#endif
#ifdef FEATURE_WLAN_LFR
- if(csrRoamIsFastRoamEnabled(pMac))
+ if(csrRoamIsFastRoamEnabled(pMac, sessionId))
{
//legacy fast roaming enabled
dwTmp = pal_cpu_to_be32(TRUE);
@@ -14882,7 +14896,7 @@
#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))
+ if (csrRoamIsFastRoamEnabled(pMac, CSR_SESSION_ID_INVALID))
{
// Save the bssid from the received response
palCopyMemory(pMac->hHdd, (void *)&roamInfo.bssid, (void *)pFTPreAuthRsp->preAuthbssId, sizeof(tCsrBssid));