qcacmn: Check 4.9 GHz channel correctly

4.9 GHz channels cannot be checked using channel number since channel
number can conflict with 2.4 GHz and 6 Ghz channels. So use frequency to
check if channel is 4.9 Ghz.

Change-Id: Ie201d2722edbc7f20ee4faa115910d92afaa3414
CRs-Fixed: 2552810
This commit is contained in:
Amar Singhal
2019-10-23 14:01:39 -07:00
committato da nshrivas
parent ddcd9fbf2e
commit cfec8138ad

Vedi File

@@ -1692,7 +1692,7 @@ static uint16_t reg_compute_chan_to_freq(struct wlan_objmgr_pdev *pdev,
chan_list = pdev_priv_obj->mas_chan_list;
for (count = min_chan_range; count <= max_chan_range; count++) {
if (reg_chan_is_49ghz(pdev, chan_list[count].chan_num)) {
if (REG_IS_49GHZ_FREQ(chan_list[count].center_freq)) {
if (chan_list[count].chan_num == chan_num)
break;
continue;
@@ -1715,7 +1715,7 @@ static uint16_t reg_compute_chan_to_freq(struct wlan_objmgr_pdev *pdev,
goto end;
if ((chan_list[count - 1].chan_num == INVALID_CHANNEL_NUM) ||
reg_chan_is_49ghz(pdev, chan_list[count - 1].chan_num) ||
REG_IS_49GHZ_FREQ(chan_list[count - 1].center_freq) ||
(chan_list[count].chan_num == INVALID_CHANNEL_NUM)) {
reg_err("Channel %d invalid in current reg domain",
chan_num);