From e6c35ab600dc0063db0655cf24ad577a1953d7a9 Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Tue, 23 Jun 2020 16:54:51 +0800 Subject: [PATCH] qcacld-3.0: Replace channel with freq for 6G Replace WLAN_REG_IS_24GHZ_CH with WLAN_REG_IS_24GHZ_CH_FREQ. in TDLS. Change-Id: I6c0ee6ec3a2d24cc0c826f93527d4655925cc6cd CRs-Fixed: 2717000 --- components/tdls/core/src/wlan_tdls_cmds_process.c | 14 +++++++------- core/sme/src/csr/csr_api_roam.c | 4 ---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/components/tdls/core/src/wlan_tdls_cmds_process.c b/components/tdls/core/src/wlan_tdls_cmds_process.c index 9876ce42f4a1..d12014dfea6c 100644 --- a/components/tdls/core/src/wlan_tdls_cmds_process.c +++ b/components/tdls/core/src/wlan_tdls_cmds_process.c @@ -2207,8 +2207,9 @@ QDF_STATUS tdls_process_antenna_switch(struct tdls_antenna_switch_request *req) int ant_switch_state = 0; uint32_t vdev_id; enum QDF_OPMODE opmode; - uint8_t channel; + qdf_freq_t freq; struct tdls_osif_indication ind; + enum policy_mgr_con_mode mode; if (!req) { tdls_err("null req"); @@ -2242,14 +2243,13 @@ QDF_STATUS tdls_process_antenna_switch(struct tdls_antenna_switch_request *req) vdev_id = wlan_vdev_get_id(vdev); opmode = wlan_vdev_mlme_get_opmode(vdev); - channel = wlan_freq_to_chan( - policy_mgr_get_channel( - soc_obj->soc, - policy_mgr_convert_device_mode_to_qdf_type(opmode), - &vdev_id)); + mode = policy_mgr_convert_device_mode_to_qdf_type(opmode); + freq = policy_mgr_get_channel(soc_obj->soc, + mode, + &vdev_id); /* Check supported nss for TDLS, if is 1x1, no need to teardown links */ - if (WLAN_REG_IS_24GHZ_CH(channel)) + if (WLAN_REG_IS_24GHZ_CH_FREQ(freq)) vdev_nss = soc_obj->tdls_configs.tdls_vdev_nss_2g; else vdev_nss = soc_obj->tdls_configs.tdls_vdev_nss_5g; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index b92e28e680f2..587221329de9 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -13040,10 +13040,6 @@ csr_compute_mode_and_band(struct mac_context *mac_ctx, *band = (mac_ctx->mlme_cfg->gen.band == BAND_2G ? REG_BAND_2G : REG_BAND_5G); if (REG_BAND_2G == *band) { - /* - * See reason in else if ( WLAN_REG_IS_24GHZ_CH - * (opr_ch) ) to pick 11B - */ *dot11_mode = eCSR_CFG_DOT11_MODE_11B; } else { /* prefer 5GHz */