summaryrefslogtreecommitdiff
path: root/net/wireless/util.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-09-25 06:19:19 +0200
committerChristoph Hellwig <hch@lst.de>2020-09-25 06:19:19 +0200
commit8c1c6c7588b2faf9dd45fb3cfb7497fd09bbfe7c (patch)
tree50a7ddcfd7e7b1a7e4fb656bb88a036dbcff4bd6 /net/wireless/util.c
parent38225f2ef2f4263fc65acae63fdd4e8489c9ffcf (diff)
parent171d4ff79f965c1f164705ef0aaea102a6ad238b (diff)
Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into dma-mapping-for-next
Pull in the latest 5.9 tree for the commit to revert the V4L2_FLAG_MEMORY_NON_CONSISTENT uapi addition.
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r--net/wireless/util.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 7c5d5365a5eb..6fa99df52f86 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -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:
@@ -123,11 +123,13 @@ int ieee80211_freq_khz_to_channel(u32 freq)
return (freq - 2407) / 5;
else if (freq >= 4910 && freq <= 4980)
return (freq - 4000) / 5;
- else if (freq < 5945)
+ else if (freq < 5925)
return (freq - 5000) / 5;
+ else if (freq == 5935)
+ return 2;
else if (freq <= 45000) /* DMG band lower limit */
- /* see 802.11ax D4.1 27.3.22.2 */
- return (freq - 5940) / 5;
+ /* see 802.11ax D6.1 27.3.22.2 */
+ return (freq - 5950) / 5;
else if (freq >= 58320 && freq <= 70200)
return (freq - 56160) / 2160;
else