projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8cd6e7
)
cfg80211: fix boundary value in ieee80211_frequency_to_channel()
author
Arend van Spriel
<arend.vanspriel@broadcom.com>
Tue, 3 Sep 2019 11:39:32 +0000
(13:39 +0200)
committer
Johannes Berg
<johannes.berg@intel.com>
Wed, 11 Sep 2019 07:12:55 +0000
(09:12 +0200)
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>
net/wireless/util.c
patch
|
blob
|
blame
|
history
diff --git
a/net/wireless/util.c
b/net/wireless/util.c
index c99939067bb01e20893f6487ed5f2987f6be53d5..006f3eac00f790f77a2fa67f75f95dc848ce1d05 100644
(file)
--- 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 < 594
0
)
+ else if (freq < 594
5
)
return (freq - 5000) / 5;
else if (freq <= 45000) /* DMG band lower limit */
/* see 802.11ax D4.1 27.3.22.2 */