OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47df8e0
)
cfg80211: Adjust 6 GHz frequency to channel conversion
author
Amar Singhal
<asinghal@codeaurora.org>
Fri, 19 Jun 2020 20:52:01 +0000
(13:52 -0700)
committer
Johannes Berg
<johannes.berg@intel.com>
Thu, 27 Aug 2020 08:53:21 +0000
(10:53 +0200)
Adjust the 6 GHz frequency to channel conversion function,
the other way around was previously handled.
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
Link:
https://lore.kernel.org/r/1592599921-10607-1-git-send-email-asinghal@codeaurora.org
[rewrite commit message, hard-code channel 2]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/util.c
patch
|
blob
|
history
diff --git
a/net/wireless/util.c
b/net/wireless/util.c
index
dfad1c0
..
c62eb3d
100644
(file)
--- a/
net/wireless/util.c
+++ b/
net/wireless/util.c
@@
-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 < 59
4
5)
+ else if (freq < 59
2
5)
return (freq - 5000) / 5;
+ else if (freq == 5935)
+ return 2;
else if (freq <= 45000) /* DMG band lower limit */
- /* see 802.11ax D
4
.1 27.3.22.2 */
- return (freq - 59
4
0) / 5;
+ /* see 802.11ax D
6
.1 27.3.22.2 */
+ return (freq - 59
5
0) / 5;
else if (freq >= 58320 && freq <= 70200)
return (freq - 56160) / 2160;
else