]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
cfg80211: fix 6 GHz channel conversion
authorJohannes Berg <johannes.berg@intel.com>
Thu, 17 Sep 2020 09:52:23 +0000 (11:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 15:36:30 +0000 (17:36 +0200)
[ Upstream commit c0de8776af6543e10d1a5c8969679fd9f6b66fa9 ]

We shouldn't accept any channels bigger than 233, fix that.

Reported-by: Amar <asinghal@codeaurora.org>
Fixes: d1a1646c0de7 ("cfg80211: adapt to new channelization of the 6GHz band")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200917115222.312ba6f1d461.I3a8c8fbcc3cc019814fd9cd0aced7eb591626136@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/wireless/util.c

index a72d2ad6ade8b39969c0ab6bb44d1f7d01ee37f3..0f95844e73d80cce5b55b2c3e71f8a7b93d92e14 100644 (file)
@@ -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: