From: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org,
Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Subject: [PATCH] cfg80211: fix 6ghz starting frequency
Date: Sun, 21 Jun 2020 23:37:49 -0700 [thread overview]
Message-ID: <1592807869-781-1-git-send-email-pradeepc@codeaurora.org> (raw)
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 <pradeepc@codeaurora.org>
---
net/wireless/util.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 4d3b76f94f55..0eee55476d79 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -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
--
1.9.1
next reply other threads:[~2020-06-22 6:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 6:37 Pradeep Kumar Chitrapu [this message]
2020-06-22 7:20 ` [PATCH] cfg80211: fix 6ghz starting frequency Pradeep Kumar Chitrapu
2020-06-22 7:26 ` Johannes Berg
2020-08-31 21:29 ` asinghal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1592807869-781-1-git-send-email-pradeepc@codeaurora.org \
--to=pradeepc@codeaurora.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.