Skip to content

Commit

Permalink
cfg80211: fix 6 GHz channel conversion
Browse files Browse the repository at this point in the history
We shouldn't accept any channels bigger than 233, fix that.

Reported-by: Amar <[email protected]>
Fixes: d1a1646 ("cfg80211: adapt to new channelization of the 6GHz band")
Signed-off-by: Johannes Berg <[email protected]>
Link: https://lore.kernel.org/r/20200917115222.312ba6f1d461.I3a8c8fbcc3cc019814fd9cd0aced7eb591626136@changeid
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
jmberg-intel committed Sep 18, 2020
1 parent 780a8c9 commit c0de877
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/wireless/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
if (chan == 2)
return MHZ_TO_KHZ(5935);
if (chan <= 253)
if (chan <= 233)
return MHZ_TO_KHZ(5950 + chan * 5);
break;
case NL80211_BAND_60GHZ:
Expand Down

0 comments on commit c0de877

Please sign in to comment.