Merge "wlan: Disable roaming for SAE" into wlan-driver.lnx.1.0
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h
index 6ca0a4a..dc4fe9d 100644
--- a/CORE/SME/inc/csrApi.h
+++ b/CORE/SME/inc/csrApi.h
@@ -1661,6 +1661,12 @@
///////////////////////////////////////////Common Roam ends
+#ifdef WLAN_FEATURE_SAE
+#define CSR_IS_AUTH_TYPE_SAE(auth_type) \
+ (eCSR_AUTH_TYPE_SAE == auth_type)
+#else
+#define CSR_IS_AUTH_TYPE_SAE(auth_type) (false)
+#endif
/* ---------------------------------------------------------------------------
\fn csrSetChannels
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index a9d9b63..cfa5b53 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -17714,6 +17714,13 @@
currChannelListInfo = &pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo;
+ pSession = CSR_GET_SESSION( pMac, sessionId );
+ if (!pSession) {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ "%s:pSession is null", __func__);
+ return eHAL_STATUS_FAILURE;
+ }
+
if (0 == csrRoamIsRoamOffloadScanEnabled(pMac))
{
smsLog( pMac, LOGE,"isRoamOffloadScanEnabled not set");
@@ -17726,6 +17733,13 @@
return eHAL_STATUS_FAILURE;
}
+ /* Roaming is not supported currently for SAE authentication */
+ if (pSession->pCurRoamProfile &&
+ CSR_IS_AUTH_TYPE_SAE(pSession->pCurRoamProfile->AuthType.authType[0])) {
+ smsLog(pMac, LOGE, "Roaming not suppprted for SAE connection");
+ return eHAL_STATUS_SUCCESS;
+ }
+
/*The Dynamic Config Items Update may happen even if the state is in INIT.
* It is important to ensure that the command is passed down to the FW only
* if the Infra Station is in a connected state.A connected station could also be
@@ -17767,13 +17781,6 @@
"%s: Not able to find the sessionId for Roam Offload scan request", __func__);
return eHAL_STATUS_FAILURE;
}
- pSession = CSR_GET_SESSION( pMac, sessionId );
- if (NULL == pSession)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "%s:pSession is null", __func__);
- return eHAL_STATUS_FAILURE;
- }
pBssDesc = pSession->pConnectBssDesc;
if (pBssDesc == NULL)
{