mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
qcacld-3.0: Avoid sending invalid frequency to ieee80211_frequency_to_channel
Avoid converting invalid frequency i.e zero frequency to channel using
ieee80211_frequency_to_channel() function.
Change-Id: I4a32591e313183348180a1d30a950b4b174a27cc
CRs-Fixed: 1047642
This commit is contained in:
parent
49a5ffc904
commit
174c3fcf46
1 changed files with 8 additions and 5 deletions
|
|
@ -6436,12 +6436,15 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy,
|
|||
*/
|
||||
|
||||
channel = ieee80211_frequency_to_channel(chandef->chan->center_freq);
|
||||
|
||||
if (NL80211_CHAN_WIDTH_80P80 == chandef->width ||
|
||||
NL80211_CHAN_WIDTH_160 == chandef->width)
|
||||
channel_seg2 =
|
||||
ieee80211_frequency_to_channel(chandef->center_freq2);
|
||||
else
|
||||
channel_seg2 = 0;
|
||||
NL80211_CHAN_WIDTH_160 == chandef->width) {
|
||||
if (chandef->center_freq2)
|
||||
channel_seg2 = ieee80211_frequency_to_channel(
|
||||
chandef->center_freq2);
|
||||
else
|
||||
hdd_err("Invalid center_freq2");
|
||||
}
|
||||
|
||||
/* Check freq range */
|
||||
if ((WNI_CFG_CURRENT_CHANNEL_STAMIN > channel) ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue