summaryrefslogtreecommitdiff
path: root/net/wireless/util.c
diff options
context:
space:
mode:
authorArend van Spriel <arend.vanspriel@broadcom.com>2019-09-03 14:39:32 +0300
committerJohannes Berg <johannes.berg@intel.com>2019-09-11 10:12:55 +0300
commitdf5d7a88bc9409aff60f67d82ee25715fa48a22d (patch)
treed0c2613daca641fcac48dfbc68bbb5ec7e1435b5 /net/wireless/util.c
parentc8cd6e7f159e6f8d79a23df4aeaa7a540415951b (diff)
downloadlinux-df5d7a88bc9409aff60f67d82ee25715fa48a22d.tar.xz
cfg80211: fix boundary value in ieee80211_frequency_to_channel()
The boundary value used for the 6G band was incorrect as it would result in invalid 6G channel number for certain frequencies. Reported-by: Amar Singhal <asinghal@codeaurora.org> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://lore.kernel.org/r/1567510772-24263-1-git-send-email-arend.vanspriel@broadcom.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r--net/wireless/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index c99939067bb0..006f3eac00f7 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -116,7 +116,7 @@ int ieee80211_frequency_to_channel(int freq)
return (freq - 2407) / 5;
else if (freq >= 4910 && freq <= 4980)
return (freq - 4000) / 5;
- else if (freq < 5940)
+ else if (freq < 5945)
return (freq - 5000) / 5;
else if (freq <= 45000) /* DMG band lower limit */
/* see 802.11ax D4.1 27.3.22.2 */