diff options
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg.c | 3 | ||||
| -rw-r--r-- | CORE/SME/inc/smeInternal.h | 2 | ||||
| -rw-r--r-- | CORE/SME/inc/sme_Api.h | 1 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiRoam.c | 35 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 4 |
5 files changed, 13 insertions, 32 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c index ee4ec3e5d0bf..8f5b54dc0ea2 100644 --- a/CORE/HDD/src/wlan_hdd_cfg.c +++ b/CORE/HDD/src/wlan_hdd_cfg.c @@ -5154,6 +5154,9 @@ VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx ) smeConfig.pnoOffload = pHddCtx->cfg_ini->PnoOffload; #endif + /* Update maximum interfaces information */ + smeConfig.max_intf_count = pHddCtx->max_intf_count; + smeConfig.fEnableDebugLog = pHddCtx->cfg_ini->gEnableDebugLog; halStatus = sme_UpdateConfig( pHddCtx->hHal, &smeConfig); if ( !HAL_STATUS_SUCCESS( halStatus ) ) diff --git a/CORE/SME/inc/smeInternal.h b/CORE/SME/inc/smeInternal.h index 06481618164d..e1ab3f9ea7e5 100644 --- a/CORE/SME/inc/smeInternal.h +++ b/CORE/SME/inc/smeInternal.h @@ -143,6 +143,8 @@ typedef struct tagSmeStruct #ifdef FEATURE_WLAN_CH_AVOID void (*pChAvoidNotificationCb) (void *hdd_context, void *indi_param); #endif /* FEATURE_WLAN_CH_AVOID */ + /* Maximum interfaces allowed by the host */ + tANI_U8 max_intf_count; } tSmeStruct, *tpSmeStruct; diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h index cfc3af48b448..a003eee923ed 100644 --- a/CORE/SME/inc/sme_Api.h +++ b/CORE/SME/inc/sme_Api.h @@ -130,6 +130,7 @@ typedef struct _smeConfigParams tANI_BOOLEAN fP2pListenOffload; tANI_BOOLEAN pnoOffload; tANI_U8 fEnableDebugLog; + tANI_U8 max_intf_count; } tSmeConfigParams, *tpSmeConfigParams; typedef enum diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index 3b5f5db25f46..ea5ddf556bc8 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -62,7 +62,6 @@ #include "csrApi.h" #include "pmc.h" #include "vos_nvitem.h" -#include "wlan_hdd_main.h" #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING #include "csrNeighborRoam.h" #endif /* WLAN_FEATURE_NEIGHBOR_ROAMING */ @@ -14120,36 +14119,6 @@ eHalStatus csrProcessAddStaSessionCommand( tpAniSirGlobal pMac, tSmeCmd *pComman &pCommand->u.addStaSessionCmd, pCommand->sessionId); } - -/* Function: csr_check_max_interfaces - * Return: 0 - Success, 1 - Failure - */ -tANI_U8 csr_check_max_interfaces(tpAniSirGlobal pMac,tANI_U32 i) -{ - hdd_context_t *pHddCtx; - v_CONTEXT_t vosContext; - - vosContext = vos_get_global_context( VOS_MODULE_ID_HDD, NULL ); - if (NULL == vosContext) { - smsLog(pMac, LOGE, "%s: Failed to get vos context", __func__); - return 1; - } - - pHddCtx = vos_get_context( VOS_MODULE_ID_HDD, vosContext); - if (NULL == pHddCtx) { - smsLog(pMac, LOGE, "%s: Failed to get hdd context", __func__); - return 1; - } - - if ((v_U8_t)i >= pHddCtx->max_intf_count){ - smsLog(pMac, LOGE, "%s: Max interfaces! Session creation will fail", __func__); - return 1; - } - else { - return 0; - } -} - eHalStatus csrRoamOpenSession(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext, @@ -14167,8 +14136,10 @@ eHalStatus csrRoamOpenSession(tpAniSirGlobal pMac, for( i = 0; i < CSR_ROAM_SESSION_MAX; i++ ) { - if (csr_check_max_interfaces( pMac, i)) + if ((v_U8_t)i >= pMac->sme.max_intf_count) { + smsLog(pMac, LOGE, "%s: Reached max interfaces! Session creation will fail", __func__); break; + } if( !CSR_IS_SESSION_VALID( pMac, i ) ) { diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 1bf6090fa141..112b2de5cde6 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -1633,6 +1633,9 @@ eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams) pMac->fEnableDebugLog = pSmeConfigParams->fEnableDebugLog; + /* update interface configuration */ + pMac->sme.max_intf_count = pSmeConfigParams->max_intf_count; + return status; } @@ -3946,6 +3949,7 @@ eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam) #endif pParam->fScanOffload = pMac->fScanOffload; pParam->fP2pListenOffload = pMac->fP2pListenOffload; + pParam->max_intf_count = pMac->sme.max_intf_count; sme_ReleaseGlobalLock( &pMac->sme ); } |
