cfg80211: fix 6ghz starting frequency
PATCH 1/1 cfg80211: fix 6ghz starting frequency
Fixes channel to frequency mappings per latest specification IEEE P802.11ax/D6.1
--- net/wireless/util.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
net/wireless/util.c +6 -3
@@ -117,15 +117,18 @@ int ieee80211_freq_khz_to_channel(u32 freq)/* see 802.11 17.3.8.3.2 and Annex J */ if (freq ==2484 )return 14 ; +/* see 802.11ax D6.1 27.3.23.2 and Annex E */ +else if (freq ==5935 ) +return 2 ;else if (freq <2484 )return (freq -2407 ) /5 ;else if (freq >=4910 && freq <=4980 )return (freq -4000 ) /5 ; -else if (freq <5945 ) +else if (freq <5950 )return (freq -5000 ) /5 ;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.23.2 */ +return (freq -5950 ) /5 ;else if (freq >=58320 && freq <=70200 )return (freq -56160 ) /2160 ;else
Signature · 1 line
1.9.1
Quoted 6 lines · Pradeep Kumar Chitrapu
Fixes channel to frequency mappings per latest specification IEEE P802.11ax/D6.1
Fixes d1a1646c ("cfg80211: adapt to new channelization of the 6GHz band")Signed-off-by Pradeep Kumar Chitrapu <[email protected]>---
Please ignore this patch..
Just observed similar patch which is already in review
https://patchwork.kernel.org/patch/11615085/
Johannes Berg
maintainerQuoted 11 lines · Pradeep Kumar Chitrapu
Quoted 7 lines · Pradeep Kumar Chitrapu
Fixes channel to frequency mappings per latest specification IEEE P802.11ax/D6.1
Fixes d1a1646c ("cfg80211: adapt to new channelization of the 6GHzband")
Signed-off-by Pradeep Kumar Chitrapu <[email protected]>---
Please ignore this patch..
Just observed similar patch which is already in review
https://patchwork.kernel.org/patch/11615085/
I also already merged
https://lore.kernel.org/r/[email protected]
If any further changes are needed, please base them on mac80211-next...
johannes
hi Johannes,
We see you accepted the attached patch. But following small
piece is still missing, that should be applied to
the mac80211 tree, in fn. ieee80211_channel_to_freq_khz:
case NL80211_BAND_6GHZ:
/* 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);
rgds
Amar
Quoted 13 lines · Johannes Berg
Quoted 11 lines · Pradeep Kumar Chitrapu
Quoted 7 lines · Pradeep Kumar Chitrapu
Fixes channel to frequency mappings per latest specification IEEE P802.11ax/D6.1
Fixes d1a1646c ("cfg80211: adapt to new channelization of the 6GHzband")
Signed-off-by Pradeep Kumar Chitrapu <[email protected]>---
Please ignore this patch..
Just observed similar patch which is already in review
https://patchwork.kernel.org/patch/11615085/
Quoted 7 lines
I also already merged
https://lore.kernel.org/r/[email protected]
If any further changes are needed, please base them on mac80211-next...
johannes
From 2d9b55508556ccee6410310fb9ea2482fd3328eb Mon Sep 17 00:00:00 2001
From: Amar Singhal <[email protected]>
Date: Fri, 19 Jun 2020 13:52:01 -0700
Subject: [PATCH] cfg80211: Adjust 6 GHz frequency to channel conversion
Adjust the 6 GHz frequency to channel conversion function, the other way around was previously handled.
net/wireless/util.c +5 -3
@@ -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
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project