diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index f208c334c972..5fe3d1f1ca4c 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -4932,9 +4932,8 @@ int wlan_hdd_disable_channels(struct hdd_context *hdd_ctx) } for (i = 0; i < cache_chann->num_channels; i++) { - freq = wlan_reg_chan_to_freq(hdd_ctx->pdev, - cache_chann-> - channel_info[i].channel_num); + freq = wlan_reg_legacy_chan_to_freq(hdd_ctx->pdev, + cache_chann->channel_info[i].channel_num); if (!freq) continue; wiphy_channel = wlan_hdd_get_wiphy_channel(wiphy, freq); diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index e0594e6627df..4cd1ed3aa8ba 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -1199,7 +1199,7 @@ hdd_parse_channellist(struct hdd_context *hdd_ctx, return -EINVAL; } channel_freq_list[j] = - wlan_reg_chan_to_freq(hdd_ctx->pdev, temp_int); + wlan_reg_legacy_chan_to_freq(hdd_ctx->pdev, temp_int); hdd_debug("Channel %d added to preferred channel list", channel_freq_list[j]); diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 66e3bf258702..18f491eb3be9 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -2141,9 +2141,8 @@ lim_roam_fill_bss_descr(struct mac_context *mac, bss_desc_ptr->chan_freq = parsed_frm_ptr->chan_freq; } else if (parsed_frm_ptr->HTInfo.present) { bss_desc_ptr->chan_freq = - wlan_reg_chan_to_freq(mac->pdev, - parsed_frm_ptr->HTInfo. - primaryChannel); + wlan_reg_legacy_chan_to_freq(mac->pdev, + parsed_frm_ptr->HTInfo.primaryChannel); } else { /* * If DS Params or HTIE is not present in the probe resp or diff --git a/core/wma/inc/wma_api.h b/core/wma/inc/wma_api.h index 35006c9f369b..1bca010ebfc6 100644 --- a/core/wma/inc/wma_api.h +++ b/core/wma/inc/wma_api.h @@ -152,13 +152,13 @@ void wma_get_fw_phy_mode_for_freq_cb(uint32_t freq, uint32_t chan_width, uint32_t *phy_mode); /** * wma_get_phy_mode_cb() - Callback to get current PHY Mode. - * @chan: channel number + * @freq: channel frequency * @chan_width: maximum channel width possible * @phy_mode: PHY Mode * * Return: None */ -void wma_get_phy_mode_cb(uint8_t chan, uint32_t chan_width, +void wma_get_phy_mode_cb(qdf_freq_t freq, uint32_t chan_width, enum wlan_phymode *phy_mode); QDF_STATUS wma_set_htconfig(uint8_t vdev_id, uint16_t ht_capab, int value); diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 4004befc14fd..e305f627d2dc 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -2751,12 +2751,11 @@ void wma_get_fw_phy_mode_for_freq_cb(uint32_t freq, uint32_t chan_width, *phy_mode = wma_host_to_fw_phymode(host_phy_mode); } -void wma_get_phy_mode_cb(uint8_t chan, uint32_t chan_width, +void wma_get_phy_mode_cb(qdf_freq_t freq, uint32_t chan_width, enum wlan_phymode *phy_mode) { uint32_t dot11_mode; struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE); - uint32_t freq; if (!mac) { wma_err("MAC context is NULL"); @@ -2764,7 +2763,6 @@ void wma_get_phy_mode_cb(uint8_t chan, uint32_t chan_width, return; } - freq = wlan_reg_chan_to_freq(mac->pdev, chan); dot11_mode = mac->mlme_cfg->dot11_mode.dot11_mode; *phy_mode = wma_chan_phy_mode(freq, chan_width, dot11_mode); } diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index f7d839f5cd2f..cb115d0fa691 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -2903,7 +2903,8 @@ static void wma_update_phymode_on_roam(tp_wma_handle wma, uint8_t *bssid, bss_phymode = wma_fw_to_host_phymode(WMI_GET_CHANNEL_MODE(chan)); else - wma_get_phy_mode_cb(channel, iface->chan_width, &bss_phymode); + wma_get_phy_mode_cb(iface->ch_freq, + iface->chan_width, &bss_phymode); vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(iface->vdev); /* Update vdev mlme channel info after roaming */