summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Kodukula <quic_akodukul@quicinc.com>2019-10-16 18:50:45 +0530
committerPaul Chen <chenpaul@google.com>2020-07-31 03:13:02 +0000
commitabd91aa572bb7aef4322df8c5a0087b9dafd1e6f (patch)
tree33fadf8631a4418ceddb1082776eea0dbc2bb775
parent8c8cc0631d1d3fccbcc73186a20fb5dfb1c0d277 (diff)
downloadqca-wfi-host-cmn-abd91aa572bb7aef4322df8c5a0087b9dafd1e6f.tar.gz
qcacmn: Invoke correct api to convert channel to frequency
Currently wifi update channel bw api is using legacy api wlan reg get chan freq to convert channel numbers to the frequency which does not take care of the bonded channels and returns invalid channel number error code for bonded channels which results in undefined behavior on the user space application which is using the result of this api. To address above issue, use the correct api to convert channel number to frequency. Change-Id: I80295b0ff502747d5655642f2506283bd3ba0b52 CRs-fixed: 2547546 Bug: 160372750 Signed-off-by: Aditya Kodukula <quic_akodukul@quicinc.com>
-rw-r--r--umac/wifi_pos/src/wifi_pos_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/umac/wifi_pos/src/wifi_pos_main.c b/umac/wifi_pos/src/wifi_pos_main.c
index 7bc766aff..f4fa8eefa 100644
--- a/umac/wifi_pos/src/wifi_pos_main.c
+++ b/umac/wifi_pos/src/wifi_pos_main.c
@@ -223,8 +223,9 @@ static void wifi_update_channel_bw_info(struct wlan_objmgr_psoc *psoc,
wlan_reg_set_channel_params(pdev, chan, sec_ch_2g, &ch_params);
if (ch_params.center_freq_seg0)
chan_info->band_center_freq1 =
- wlan_reg_get_channel_freq(pdev,
- ch_params.center_freq_seg0);
+ wlan_reg_legacy_chan_to_freq(
+ pdev,
+ ch_params.center_freq_seg0);
wifi_pos_psoc->wifi_pos_get_phy_mode(chan, ch_params.ch_width,
&phy_mode);