Commit c0de8776 authored by Johannes Berg's avatar Johannes Berg

cfg80211: fix 6 GHz channel conversion

We shouldn't accept any channels bigger than 233, fix that.
Reported-by: default avatarAmar <asinghal@codeaurora.org>
Fixes: d1a1646c ("cfg80211: adapt to new channelization of the 6GHz band")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200917115222.312ba6f1d461.I3a8c8fbcc3cc019814fd9cd0aced7eb591626136@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 780a8c9e
...@@ -95,7 +95,7 @@ u32 ieee80211_channel_to_freq_khz(int chan, enum nl80211_band band) ...@@ -95,7 +95,7 @@ u32 ieee80211_channel_to_freq_khz(int chan, enum nl80211_band band)
/* see 802.11ax D6.1 27.3.23.2 */ /* see 802.11ax D6.1 27.3.23.2 */
if (chan == 2) if (chan == 2)
return MHZ_TO_KHZ(5935); return MHZ_TO_KHZ(5935);
if (chan <= 253) if (chan <= 233)
return MHZ_TO_KHZ(5950 + chan * 5); return MHZ_TO_KHZ(5950 + chan * 5);
break; break;
case NL80211_BAND_60GHZ: case NL80211_BAND_60GHZ:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment