diff options
| author | Peng Xu <pxu@qca.qualcomm.com> | 2015-07-14 14:49:45 -0700 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-07-27 15:58:56 +0530 |
| commit | b5bebcfb82cf357e31f37cf55e3b0a4e8507bfbc (patch) | |
| tree | f90fbfd2dc6f7840b303cf343467fa37f83c1dda | |
| parent | 6d1437cd833e0c6e2aeee2e26da5d708605577f5 (diff) | |
qca-cld2.0: Add secondary channel info for channel bonding
For 2.4G HT40 case, secondary channel information is needed
when setting the channel bonding mode. Add secondary channel
when invoking sme_SelectCBMode function.
Change-Id: Ic252cfea67e69cb8510697c143408a6f35f84c28
CRs-fixed: 872309
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_assoc.c | 1 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 4 | ||||
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 1 | ||||
| -rw-r--r-- | CORE/SAP/src/sapApiLinkCntl.c | 15 | ||||
| -rw-r--r-- | CORE/SAP/src/sapChSelect.c | 1 | ||||
| -rw-r--r-- | CORE/SAP/src/sapFsm.c | 7 | ||||
| -rw-r--r-- | CORE/SAP/src/sapModule.c | 5 | ||||
| -rw-r--r-- | CORE/SME/inc/sme_Api.h | 3 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 28 |
9 files changed, 44 insertions, 21 deletions
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index 00748e745cca..27982f0315f0 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -2074,6 +2074,7 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs sme_SelectCBMode(WLAN_HDD_GET_HAL_CTX(sap_adapter), hdd_ap_ctx->sapConfig.SapHw_mode, hdd_ap_ctx->operatingChannel, + hdd_ap_ctx->sapConfig.sec_ch, &hdd_ap_ctx->sapConfig.vht_channel_width, hdd_ap_ctx->sapConfig.ch_width_orig); /* diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 7d6bc5b319f7..762ad64fcde5 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -10669,6 +10669,7 @@ __wlan_hdd_cfg80211_set_channel(struct wiphy *wiphy, else smeConfig.csrConfig.channelBondingMode5GHz = eCSR_INI_SINGLE_CHANNEL_CENTERED; + sap_config->sec_ch = 0; #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)) && !defined(WITH_BACKPORTS) sap_config->ch_width_orig = eHT_CHANNEL_WIDTH_20MHZ; @@ -11336,6 +11337,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, pConfig->vht_channel_width = pConfig->ch_width_orig; sme_SelectCBMode(hHal, pConfig->SapHw_mode, pConfig->channel, + pConfig->sec_ch, &pConfig->vht_channel_width, pConfig->ch_width_orig); // ht_capab is not what the name conveys,this is used for protection bitmap pConfig->ht_capab = iniConfig->apProtection; @@ -15004,7 +15006,7 @@ void hdd_select_cbmode(hdd_adapter_t *pAdapter, v_U8_t operationChannel) /* This call decides required channel bonding mode */ sme_SelectCBMode((WLAN_HDD_GET_CTX(pAdapter)->hHal), hdd_cfg_xlate_to_csr_phy_mode(hddDot11Mode), - operationChannel, + operationChannel, 0, &vht_channel_width, vht_channel_width); } diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index f9815f4b2886..127e40b10a0e 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -14061,6 +14061,7 @@ void wlan_hdd_check_sta_ap_concurrent_ch_intf(void *data) sme_SelectCBMode(hHal, pHddApCtx->sapConfig.SapHw_mode, pHddApCtx->sapConfig.channel, + pHddApCtx->sapConfig.sec_ch, &vht_channel_width, pHddApCtx->sapConfig.ch_width_orig); #ifdef WLAN_FEATURE_MBSSID wlan_sap_set_vht_ch_width(pHddApCtx->sapContext, vht_channel_width); diff --git a/CORE/SAP/src/sapApiLinkCntl.c b/CORE/SAP/src/sapApiLinkCntl.c index cb668f05db4f..6ca4e7bdd4df 100644 --- a/CORE/SAP/src/sapApiLinkCntl.c +++ b/CORE/SAP/src/sapApiLinkCntl.c @@ -236,7 +236,8 @@ WLANSAP_ScanCallback sme_SelectCBMode(halHandle, psapContext->csrRoamProfile.phyMode, - psapContext->channel, &psapContext->vht_channel_width, + psapContext->channel, psapContext->secondary_ch, + &psapContext->vht_channel_width, psapContext->ch_width_orig); #ifdef SOFTAP_CHANNEL_RANGE if(psapContext->channelList != NULL) @@ -283,16 +284,10 @@ void sap_config_acs_result(tHalHandle hal, ptSapContext sap_ctx, uint32_t sec_ch sap_ctx->acs_cfg->ht_sec_ch = 0; cb_mode = sme_SelectCBMode(hal, sap_ctx->csrRoamProfile.phyMode, - channel, &sap_ctx->acs_cfg->ch_width, + channel, sec_ch, + &sap_ctx->acs_cfg->ch_width, sap_ctx->acs_cfg->ch_width); - if (channel >= 5 && channel <= 7 && sec_ch != 0) { - if (sec_ch > sap_ctx->acs_cfg->pri_ch) - cb_mode = eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY; - else - cb_mode = eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY; - } - if (cb_mode == eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY) { sap_ctx->acs_cfg->ht_sec_ch = sap_ctx->acs_cfg->pri_ch + 4; } else if (cb_mode == eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY) { @@ -1135,7 +1130,7 @@ WLANSAP_RoamCallback { sme_SelectCBMode(hHal, phyMode, pMac->sap.SapDfsInfo.target_channel, - &sapContext->vht_channel_width, + 0, &sapContext->vht_channel_width, sapContext->ch_width_orig); } diff --git a/CORE/SAP/src/sapChSelect.c b/CORE/SAP/src/sapChSelect.c index 0e833aa04381..95c37b5ae6eb 100644 --- a/CORE/SAP/src/sapChSelect.c +++ b/CORE/SAP/src/sapChSelect.c @@ -2626,6 +2626,7 @@ v_U8_t sapSelectChannel(tHalHandle halHandle, ptSapContext pSapCtx, tScanResult else if (bestChNum ==14) pSapCtx->acs_cfg->ht_sec_ch = 0; } + pSapCtx->secondary_ch = pSapCtx->acs_cfg->ht_sec_ch; } // Free all the allocated memory diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c index 7eddfb1f0846..d1cacd8f45ca 100644 --- a/CORE/SAP/src/sapFsm.c +++ b/CORE/SAP/src/sapFsm.c @@ -1376,6 +1376,7 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext) pMac->sap.SapDfsInfo.orig_cbMode = sme_SelectCBMode(hHal, sapContext->csrRoamProfile.phyMode, sapContext->channel, + sapContext->secondary_ch, &sapContext->vht_channel_width, sapContext->ch_width_orig); pMac->sap.SapDfsInfo.orig_cbMode = csrConvertCBIniValueToPhyCBState( @@ -2154,7 +2155,7 @@ sapGotoChannelSel Else take whatever comes from configuartion*/ sapContext->channel = con_ch; sme_SelectCBMode(hHal, sapContext->csrRoamProfile.phyMode, - con_ch, &sapContext->vht_channel_width, + con_ch, 0, &sapContext->vht_channel_width, sapContext->ch_width_orig); } #endif @@ -3465,6 +3466,7 @@ sapFsm cbMode = sme_SelectCBMode(hHal, sapContext->csrRoamProfile.phyMode, sapContext->channel, + sapContext->secondary_ch, &sapContext->vht_channel_width, sapContext->ch_width_orig); @@ -3505,6 +3507,7 @@ sapFsm sapContext->channel = ch; sme_SelectCBMode(hHal, sapContext->csrRoamProfile.phyMode, sapContext->channel, + sapContext->secondary_ch, &sapContext->vht_channel_width, sapContext->ch_width_orig); } @@ -3600,7 +3603,7 @@ sapFsm { sme_SelectCBMode(hHal, phyMode, pMac->sap.SapDfsInfo.target_channel, - &sapContext->vht_channel_width, + 0, &sapContext->vht_channel_width, sapContext->ch_width_orig); } diff --git a/CORE/SAP/src/sapModule.c b/CORE/SAP/src/sapModule.c index 4186d69245ec..d746f6a811db 100644 --- a/CORE/SAP/src/sapModule.c +++ b/CORE/SAP/src/sapModule.c @@ -834,6 +834,7 @@ WLANSAP_StartBss pSapCtx->pUsrContext = pUsrContext; pSapCtx->enableOverLapCh = pConfig->enOverLapCh; pSapCtx->acs_cfg = &pConfig->acs_cfg; + pSapCtx->secondary_ch = pConfig->sec_ch; //Set the BSSID to your "self MAC Addr" read the mac address from Configuation ITEM received from HDD pSapCtx->csrRoamProfile.BSSIDs.numOfBSSIDs = 1; @@ -2839,7 +2840,7 @@ WLANSAP_ChannelChangeRequest(v_PVOID_t pSapCtx, tANI_U8 tArgetChannel) */ cbMode = pMac->sap.SapDfsInfo.new_cbMode; vhtChannelWidth = pMac->sap.SapDfsInfo.new_chanWidth; - sme_SelectCBMode(hHal, phyMode, tArgetChannel, &vhtChannelWidth, + sme_SelectCBMode(hHal, phyMode, tArgetChannel, 0, &vhtChannelWidth, pMac->sap.SapDfsInfo.new_chanWidth); sapContext->csrRoamProfile.vht_channel_width = vhtChannelWidth; sapContext->vht_channel_width = vhtChannelWidth; @@ -2977,7 +2978,7 @@ WLANSAP_DfsSendCSAIeRequest(v_PVOID_t pSapCtx) vht_ch_width = pMac->sap.SapDfsInfo.new_chanWidth; cbmode = sme_SelectCBMode(hHal, sapContext->csrRoamProfile.phyMode, - pMac->sap.SapDfsInfo.target_channel, + pMac->sap.SapDfsInfo.target_channel, 0, &vht_ch_width, sapContext->ch_width_orig); if (pMac->sap.SapDfsInfo.target_channel <= 14 || diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h index 45c8256f1931..50718053ec5c 100644 --- a/CORE/SME/inc/sme_Api.h +++ b/CORE/SME/inc/sme_Api.h @@ -3509,7 +3509,8 @@ eCsrPhyMode sme_GetPhyMode(tHalHandle hHal); * SME API to determine the channel bonding mode */ eIniChanBondState sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, - uint8_t channel, uint16_t *vht_channel_width, + uint8_t channel, uint8_t ht_sec_dh, + uint16_t *vht_channel_width, uint16_t ch_width_orig); #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index e5837c63d994..de0d174701fd 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -12048,7 +12048,8 @@ static VOS_STATUS sme_AdjustCBMode(tAniSirGlobal* pMac, * SME API to determine the channel bonding mode */ eIniChanBondState sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, - uint8_t channel, uint16_t *vht_channel_width, + uint8_t channel, uint8_t ht_sec_ch, + uint16_t *vht_channel_width, uint16_t ch_width_orig) { tSmeConfigParams smeConfig; @@ -12088,11 +12089,21 @@ eIniChanBondState sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, smeConfig.csrConfig.channelBondingMode5GHz = eCSR_INI_SINGLE_CHANNEL_CENTERED; *vht_channel_width = eHT_CHANNEL_WIDTH_20MHZ; - } else if (channel >= 1 && channel <= 5) { + } else if (channel >= 1 && channel < 5) { smeConfig.csrConfig.channelBondingMode24GHz = eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY; *vht_channel_width = eHT_CHANNEL_WIDTH_40MHZ; - } else if (channel >= 6 && channel <= 13) { + } else if (channel >= 5 && channel <= 9) { + if (0 != ht_sec_ch) { + if (ht_sec_ch > channel) + smeConfig.csrConfig.channelBondingMode24GHz = + eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY; + else + smeConfig.csrConfig.channelBondingMode24GHz = + eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY; + } + *vht_channel_width = eHT_CHANNEL_WIDTH_40MHZ; + } else if (channel > 9 && channel <= 13) { smeConfig.csrConfig.channelBondingMode24GHz = eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY; *vht_channel_width = eHT_CHANNEL_WIDTH_40MHZ; @@ -12122,10 +12133,17 @@ eIniChanBondState sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, smeConfig.csrConfig.channelBondingMode5GHz = eCSR_INI_SINGLE_CHANNEL_CENTERED; *vht_channel_width = eHT_CHANNEL_WIDTH_20MHZ; - } else if (channel >= 1 && channel <= 5) { + } else if (channel >= 1 && channel < 5) { smeConfig.csrConfig.channelBondingMode24GHz = eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY; - } else if (channel >= 6 && channel <= 13) { + } else if (channel >= 5 && channel <= 9) { + if (ht_sec_ch > channel) + smeConfig.csrConfig.channelBondingMode24GHz = + eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY; + else + smeConfig.csrConfig.channelBondingMode24GHz = + eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY; + } else if (channel > 9 && channel <= 13) { smeConfig.csrConfig.channelBondingMode24GHz = eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY; } else if (channel ==14) { |
