diff options
| author | Rajeev Kumar <rajekuma@qca.qualcomm.com> | 2013-12-03 13:43:32 -0800 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@qca.qualcomm.com> | 2013-12-03 14:39:43 -0800 |
| commit | 4ee36db6b21b417feab700c786af57dc61314c4e (patch) | |
| tree | 88a28c0e3f0bad340aa2b0e43727015132e70292 | |
| parent | cc5655b403c91c9508f712588cc811ef7178ff4c (diff) | |
wlan: Fix to provide ini parameter to enable/disable IBSS coalesing.
This fix will provide on/off knob for coalesing in IBSS setup.
By default we are not coalesing. flag for this in ini file
is gCoalesingInIBSS
Change-Id: Iae21652d7ae10bfcadc977224c5433eec657cca0
CRs-Fixed: 582233
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_cfg.h | 6 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg.c | 13 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 41 | ||||
| -rw-r--r-- | CORE/MAC/inc/aniGlobal.h | 2 | ||||
| -rw-r--r-- | CORE/MAC/inc/sirApi.h | 1 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/include/limSession.h | 3 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limIbssPeerMgmt.c | 8 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c | 2 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limSerDesUtils.c | 7 | ||||
| -rw-r--r-- | CORE/SME/inc/csrApi.h | 3 | ||||
| -rw-r--r-- | CORE/SME/inc/csrInternal.h | 2 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiRoam.c | 13 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 3 |
13 files changed, 103 insertions, 1 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h index fc16f19a4072..895b6dd074c6 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg.h +++ b/CORE/HDD/inc/wlan_hdd_cfg.h @@ -1831,6 +1831,11 @@ typedef enum #define CFG_WOW_ENABLE_MAX ( 3 ) #define CFG_WOW_STATUS_DEFAULT ( 3 ) +#define CFG_COALESING_IN_IBSS_NAME "gCoalesingInIBSS" +#define CFG_COALESING_IN_IBSS_MIN (0) +#define CFG_COALESING_IN_IBSS_MAX (1) +#define CFG_COALESING_IN_IBSS_DEFAULT (0) //disabled + /*--------------------------------------------------------------------------- Type declarations -------------------------------------------------------------------------*/ @@ -2223,6 +2228,7 @@ typedef struct #endif v_U8_t maxWoWFilters; v_U8_t wowEnable; + v_U8_t isCoalesingInIBSSAllowed; } hdd_config_t; /*--------------------------------------------------------------------------- Function declarations and documenation diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c index 943f6a505dc9..cc9e69353064 100644 --- a/CORE/HDD/src/wlan_hdd_cfg.c +++ b/CORE/HDD/src/wlan_hdd_cfg.c @@ -2339,6 +2339,13 @@ REG_VARIABLE( CFG_WOW_STATUS_NAME, WLAN_PARAM_Integer, CFG_WOW_STATUS_DEFAULT, CFG_WOW_ENABLE_MIN, CFG_WOW_ENABLE_MAX), + +REG_VARIABLE( CFG_COALESING_IN_IBSS_NAME , WLAN_PARAM_Integer, + hdd_config_t, isCoalesingInIBSSAllowed, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_COALESING_IN_IBSS_DEFAULT, + CFG_COALESING_IN_IBSS_MIN, + CFG_COALESING_IN_IBSS_MAX ), }; /* @@ -2719,6 +2726,7 @@ static void print_hdd_cfg(hdd_context_t *pHddCtx) VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [enableRxSTBC] Value = [%u] ",pHddCtx->cfg_ini->enableRxSTBC); VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gEnableLpwrImgTransition] Value = [%u] ",pHddCtx->cfg_ini->enableLpwrImgTransition); VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gEnableSSR] Value = [%u] ",pHddCtx->cfg_ini->enableSSR); + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gCoalesingInIBSS] Value = [%lu] " ,pHddCtx->cfg_ini->isCoalesingInIBSSAllowed); } @@ -4158,6 +4166,11 @@ VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx ) smeConfig.csrConfig.enableTxLdpc = pConfig->enableTxLdpc; + smeConfig.csrConfig.isCoalesingInIBSSAllowed = + pHddCtx->cfg_ini->isCoalesingInIBSSAllowed; + + + /* update SSR config */ sme_UpdateEnableSSR((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->enableSSR); /* Update the Directed scan offload setting */ diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index df95dcb4b013..2b853e02923c 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -5876,7 +5876,9 @@ static int wlan_hdd_cfg80211_join_ibss( struct wiphy *wiphy, hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter); tCsrRoamProfile *pRoamProfile; int status; + bool alloc_bssid = VOS_FALSE; hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); + hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter); ENTER(); @@ -5906,6 +5908,37 @@ static int wlan_hdd_cfg80211_join_ibss( struct wiphy *wiphy, return -EINVAL; } + /* BSSID is provided by upper layers hence no need to AUTO generate */ + if (NULL != params->bssid) { + if (ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_IBSS_AUTO_BSSID, 0, + NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE) { + hddLog (VOS_TRACE_LEVEL_ERROR, + "%s:ccmCfgStInt faild for WNI_CFG_IBSS_AUTO_BSSID", __func__); + return -EIO; + } + } + else if(pHddCtx->cfg_ini->isCoalesingInIBSSAllowed == 0) + { + if (ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_IBSS_AUTO_BSSID, 0, + NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE) + { + hddLog (VOS_TRACE_LEVEL_ERROR, + "%s:ccmCfgStInt faild for WNI_CFG_IBSS_AUTO_BSSID", __func__); + return -EIO; + } + params->bssid = vos_mem_malloc(sizeof(VOS_MAC_ADDR_SIZE)); + if (!params->bssid) + { + hddLog (VOS_TRACE_LEVEL_ERROR, + "%s:Failed memory allocation", __func__); + return -EIO; + } + vos_mem_copy((v_U8_t *)params->bssid, + (v_U8_t *)&pHddCtx->cfg_ini->IbssBssid.bytes[0], + VOS_MAC_ADDR_SIZE); + alloc_bssid = VOS_TRUE; + } + /* Set Channel */ if (NULL != #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) @@ -5998,6 +6031,14 @@ static int wlan_hdd_cfg80211_join_ibss( struct wiphy *wiphy, status = wlan_hdd_cfg80211_connect_start(pAdapter, params->ssid, params->ssid_len, params->bssid, 0); + if (NULL != params->bssid && + pHddCtx->cfg_ini->isCoalesingInIBSSAllowed == 0 && + alloc_bssid == VOS_TRUE) + { + vos_mem_free(params->bssid); + } + + if (0 > status) { hddLog(VOS_TRACE_LEVEL_ERROR, "%s: connect failed", __func__); diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h index 3f09d5d5f647..b21549c5d2fc 100644 --- a/CORE/MAC/inc/aniGlobal.h +++ b/CORE/MAC/inc/aniGlobal.h @@ -1060,6 +1060,8 @@ typedef struct sAniSirGlobal csrReadyToSuspendCallback readyToSuspendCallback; void *readyToSuspendContext; + tANI_U8 isCoalesingInIBSSAllowed; + } tAniSirGlobal; typedef enum diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index 1ff0bdd6089c..ab51322a069e 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -633,6 +633,7 @@ typedef struct sSirSmeStartBssReq tAniAuthType authType; tANI_U32 dtimPeriod; tANI_U8 wps_state; + tANI_U8 isCoalesingInIBSSAllowed; //Coalesing on/off knob tVOS_CON_MODE bssPersona; tANI_U8 txLdpcIniFeatureEnabled; diff --git a/CORE/MAC/src/pe/include/limSession.h b/CORE/MAC/src/pe/include/limSession.h index 23d2c48174eb..a18b132c5d73 100644 --- a/CORE/MAC/src/pe/include/limSession.h +++ b/CORE/MAC/src/pe/include/limSession.h @@ -400,6 +400,9 @@ typedef struct sPESession // Added to Support BT-AMP /* Power Save Off load Parameters */ tPowersaveoffloadInfo pmmOffloadInfo; + + tANI_U8 isCoalesingInIBSSAllowed; + }tPESession, *tpPESession; #define LIM_MAX_ACTIVE_SESSIONS 4 diff --git a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c index 9f95dccea238..71ff87c1a77f 100644 --- a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c +++ b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c @@ -1400,7 +1400,8 @@ limIbssCoalesce( limLog(pMac, LOG1, FL("Current BSSID :" MAC_ADDRESS_STR " Received BSSID :" MAC_ADDRESS_STR ), MAC_ADDR_ARRAY(currentBssId), MAC_ADDR_ARRAY(pHdr->bssId)); /* Check for IBSS Coalescing only if Beacon is from different BSS */ - if ( !palEqualMemory( pMac->hHdd, currentBssId, pHdr->bssId, sizeof( tSirMacAddr ) ) ) + if ( !vos_mem_compare(currentBssId, pHdr->bssId, sizeof( tSirMacAddr )) + && psessionEntry->isCoalesingInIBSSAllowed) { if (! fTsfLater) // No Coalescing happened. { @@ -1420,6 +1421,11 @@ limIbssCoalesce( ibss_bss_delete(pMac,psessionEntry); return eSIR_SUCCESS; } + else + { + if (!vos_mem_compare(currentBssId, pHdr->bssId, sizeof( tSirMacAddr ))) + return eSIR_LIM_IGNORE_BEACON; + } // STA in IBSS mode and SSID matches with ours pPeerNode = ibss_peer_find(pMac, pHdr->sa); diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index b975d489f05a..c79b90fcfd32 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -680,6 +680,8 @@ __limHandleSmeStartBssRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) break; case eSIR_IBSS_MODE: psessionEntry->limSystemRole = eLIM_STA_IN_IBSS_ROLE; + psessionEntry->isCoalesingInIBSSAllowed = + pSmeStartBssReq->isCoalesingInIBSSAllowed; break; case eSIR_BTAMP_AP_MODE: diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c index 51d925a48234..27983e623295 100644 --- a/CORE/MAC/src/pe/lim/limSerDesUtils.c +++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c @@ -648,6 +648,13 @@ limStartBssReqSerDes(tpAniSirGlobal pMac, tpSirSmeStartBssReq pStartBssReq, tANI if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) return eSIR_FAILURE; + // Extract isCoalesingInIBSSAllowed + pStartBssReq->isCoalesingInIBSSAllowed = *pBuf++; + len--; + if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + return eSIR_FAILURE; + + // Extract bssPersona pStartBssReq->bssPersona = *pBuf++; len--; diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h index e5f226e9a779..4a8546febfea 100644 --- a/CORE/SME/inc/csrApi.h +++ b/CORE/SME/inc/csrApi.h @@ -1089,6 +1089,9 @@ typedef struct tagCsrConfigParam tANI_U8 scanCfgAgingTime; tANI_U8 enableTxLdpc; + + tANI_U8 isCoalesingInIBSSAllowed; + }tCsrConfigParam; //Tush diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h index 1c74303aa694..ad96bc25a89b 100644 --- a/CORE/SME/inc/csrInternal.h +++ b/CORE/SME/inc/csrInternal.h @@ -633,6 +633,8 @@ typedef struct tagCsrConfig #endif tANI_U8 txLdpcEnable; + tANI_U8 isCoalesingInIBSSAllowed; + }tCsrConfig; typedef struct tagCsrChannelPowerInfo diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index 4f8831792550..b457aa716dad 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -1704,6 +1704,10 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa pMac->roam.configParam.txMuBformee= pParam->enableMuBformee; #endif pMac->roam.configParam.txLdpcEnable = pParam->enableTxLdpc; + + pMac->roam.configParam.isCoalesingInIBSSAllowed = + pParam->isCoalesingInIBSSAllowed; + } return status; @@ -1786,6 +1790,10 @@ eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam) pParam->enableMuBformee = pMac->roam.configParam.txMuBformee; #endif pParam->enableTxLdpc = pMac->roam.configParam.txLdpcEnable; + + pParam->isCoalesingInIBSSAllowed = + pMac->roam.configParam.isCoalesingInIBSSAllowed; + csrSetChannels(pMac, pParam); status = eHAL_STATUS_SUCCESS; @@ -13055,6 +13063,11 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs // Set wps_state *pBuf = pParam->wps_state; pBuf++; + + // set isCoalesingInIBSSAllowed + *pBuf = pMac->isCoalesingInIBSSAllowed; + pBuf++; + //Persona *pBuf = (tANI_U8)pParam->bssPersona; pBuf++; diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index dd5a89cd446b..4061eed537dc 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -1477,6 +1477,9 @@ eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams) /* update p2p offload status */ pMac->pnoOffload = pSmeConfigParams->pnoOffload; + pMac->isCoalesingInIBSSAllowed = + pSmeConfigParams->csrConfig.isCoalesingInIBSSAllowed; + return status; } |
