mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacmn: Check the state of 4.9G channels in reg_compute_chan_to_freq
In the 5G radio, if the current regulatory domain does not support 4.9Ghz channels, and if 4.9Ghz IEEE channel number 1 to 11 are given as an input to reg_compute_chan_to_freq, instead of returning 0, it returns the corresponding center frequency of the 4.9 Ghz IEEE channel number. This is because the channel state and chan_flags of the 4.9Ghz channel are not checked, that is why it returns the valid channel frequency. To fix this issue, check the channel state and chan_flags of the 4.9Ghz channel before returning the non-zero channel frequency. Change-Id: Icedd74422b4194ac4f1affed7e9f131fb8426986 CRs-Fixed: 2738248
This commit is contained in:
parent
9beeaa95a7
commit
27dc40344d
1 changed files with 10 additions and 9 deletions
|
|
@ -1787,16 +1787,17 @@ 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_IS_49GHZ_FREQ(chan_list[count].center_freq)) {
|
||||
if (chan_list[count].chan_num == chan_num)
|
||||
if ((chan_list[count].state != CHANNEL_STATE_DISABLE) &&
|
||||
!(chan_list[count].chan_flags & REGULATORY_CHAN_DISABLED)) {
|
||||
if (REG_IS_49GHZ_FREQ(chan_list[count].center_freq)) {
|
||||
if (chan_list[count].chan_num == chan_num)
|
||||
break;
|
||||
continue;
|
||||
} else if ((chan_list[count].chan_num >= chan_num) &&
|
||||
(chan_list[count].chan_num !=
|
||||
INVALID_CHANNEL_NUM))
|
||||
break;
|
||||
continue;
|
||||
} else if ((chan_list[count].chan_num >= chan_num) &&
|
||||
(chan_list[count].state != CHANNEL_STATE_DISABLE) &&
|
||||
!(chan_list[count].chan_flags &
|
||||
REGULATORY_CHAN_DISABLED) &&
|
||||
(chan_list[count].chan_num != INVALID_CHANNEL_NUM))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (count == max_chan_range + 1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue