From 7167dc1dfd687e77e898ccb0ca9da49aaff84d8e Mon Sep 17 00:00:00 2001 From: tinlin Date: Mon, 11 Nov 2019 17:05:30 +0800 Subject: [PATCH] qcacld-3.0: Convert legacy channel usage Modify the following API's code and parameters to make sure it is using frequency instead of channel: csr_roam_set_bss_config_cfg Change-Id: I92ffda4ab9fa66340aa1cd75f3fcbb3b3e36b27d CRs-Fixed: 2563211 --- core/sme/src/csr/csr_api_roam.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 0ed453133650..6b8624e79b7b 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -5043,8 +5043,9 @@ QDF_STATUS csr_roam_set_bss_config_cfg(struct mac_context *mac, uint32_t session bool resetCountry) { uint32_t cfgCb = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE; - uint8_t channel = 0; struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId); + uint32_t chan_freq = 0; + if (!pSession) { sme_err("session %d not found", sessionId); return QDF_STATUS_E_FAILURE; @@ -5088,13 +5089,12 @@ QDF_STATUS csr_roam_set_bss_config_cfg(struct mac_context *mac, uint32_t session /* CB */ if (CSR_IS_INFRA_AP(pProfile) || CSR_IS_IBSS(pProfile)) - channel = wlan_reg_freq_to_chan(mac->pdev, pProfile->op_freq); + chan_freq = pProfile->op_freq; else if (bss_desc) - channel = wlan_reg_freq_to_chan(mac->pdev, - bss_desc->chan_freq); - if (0 != channel) { + chan_freq = bss_desc->chan_freq; + if (0 != chan_freq) { /* for now if we are on 2.4 Ghz, CB will be always disabled */ - if (WLAN_REG_IS_24GHZ_CH(channel)) + if (WLAN_REG_IS_24GHZ_CH_FREQ(chan_freq)) cfgCb = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE; else cfgCb = pBssConfig->cbMode;