wlan: Allow Set key in STA+SAP concurrency
Currently in SAP offload case, SAP doesn't set key to firmware.
In case of concurrency, due to sap_auth_offload_sec_type is set,
driver is not able to set key for station mode as well.
Fix this issue by allowing set key for station mode.
CRs-Fixed: 1107447
Change-Id: I6ec121de7f2edaa8c78405c0a6f66ceb60bcdc2a
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 3cecfbc..4765601 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -5312,13 +5312,6 @@
smsLog(pMac, LOGE, FL("Invalid key length %d"), pSetKey->keyLength);
return eHAL_STATUS_FAILURE;
}
-#ifdef SAP_AUTH_OFFLOAD
- if (pMac->sap_auth_offload_sec_type)
- {
- smsLog(pMac, LOGW, FL("No set key is required in sap auth offload enable"));
- return eHAL_STATUS_SUCCESS;
- }
-#endif
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
@@ -5346,6 +5339,15 @@
if(CSR_IS_INFRA_AP(&pSession->connectedProfile))
{
+#ifdef SAP_AUTH_OFFLOAD
+ if (pMac->sap_auth_offload_sec_type)
+ {
+ smsLog(pMac, LOGE,
+ FL("No set key is required in sap auth offload enable"));
+ sme_ReleaseGlobalLock(&pMac->sme);
+ return eHAL_STATUS_SUCCESS;
+ }
+#endif
if(pSetKey->keyDirection == eSIR_TX_DEFAULT)
{
if ( ( eCSR_ENCRYPT_TYPE_WEP40 == pSetKey->encType ) ||