linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org,
	Arend van Spriel <arend.vanspriel@broadcom.com>
Subject: [PATCH V3 2/8] cfg80211: add 6GHz UNII band definitions
Date: Fri,  2 Aug 2019 13:30:59 +0200	[thread overview]
Message-ID: <1564745465-21234-3-git-send-email-arend.vanspriel@broadcom.com> (raw)
In-Reply-To: <1564745465-21234-1-git-send-email-arend.vanspriel@broadcom.com>

For the new 6GHz there are new UNII band definitions as listed
in the FCC notice [1].

[1] https://docs.fcc.gov/public/attachments/FCC-18-147A1_Rcd.pdf

Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Leon Zegers <leon.zegers@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 net/wireless/reg.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 4831ad74..646107a 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -3806,8 +3806,9 @@ void wiphy_regulatory_deregister(struct wiphy *wiphy)
 }
 
 /*
- * See http://www.fcc.gov/document/5-ghz-unlicensed-spectrum-unii, for
- * UNII band definitions
+ * See FCC notices for UNII band definitions
+ *  5GHz: https://www.fcc.gov/document/5-ghz-unlicensed-spectrum-unii
+ *  6GHz: https://www.fcc.gov/document/fcc-proposes-more-spectrum-unlicensed-use-0
  */
 int cfg80211_get_unii(int freq)
 {
@@ -3831,6 +3832,22 @@ int cfg80211_get_unii(int freq)
 	if (freq > 5725 && freq <= 5825)
 		return 4;
 
+	/* UNII-5 */
+	if (freq > 5925 && freq <= 6425)
+		return 5;
+
+	/* UNII-6 */
+	if (freq > 6425 && freq <= 6525)
+		return 6;
+
+	/* UNII-7 */
+	if (freq > 6525 && freq <= 6875)
+		return 7;
+
+	/* UNII-8 */
+	if (freq > 6875 && freq <= 7125)
+		return 8;
+
 	return -EINVAL;
 }
 
-- 
1.9.1


  parent reply	other threads:[~2019-08-02 11:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02 11:30 [PATCH V3 0/8] nl80211: add 6GHz band support Arend van Spriel
2019-08-02 11:30 ` [PATCH V3 1/8] nl80211: add 6GHz band definition to enum nl80211_band Arend van Spriel
2019-08-02 11:30 ` Arend van Spriel [this message]
2019-08-02 11:31 ` [PATCH V3 3/8] cfg80211: util: add 6GHz channel to freq conversion and vice versa Arend van Spriel
2019-08-02 11:31 ` [PATCH V3 4/8] cfg80211: extend ieee80211_operating_class_to_band() for 6GHz Arend van Spriel
2019-08-02 11:31 ` [PATCH V3 5/8] cfg80211: add 6GHz in code handling array with NUM_NL80211_BANDS entries Arend van Spriel
2019-08-02 11:31 ` [PATCH V3 6/8] cfg80211: use same IR permissive rules for 6GHz band Arend van Spriel
2019-08-02 11:31 ` [PATCH V3 7/8] cfg80211: ibss: use 11a mandatory rates for 6GHz band operation Arend van Spriel
2019-08-02 11:31 ` [PATCH V3 8/8] cfg80211: apply same mandatory rate flags for 5GHz and 6GHz Arend van Spriel
     [not found] ` <eddfd4e1abbd1dc57858fff61ee2523b@codeaurora.org>
2019-09-21 18:49   ` [PATCH V3 0/8] nl80211: add 6GHz band support Arend Van Spriel

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=1564745465-21234-3-git-send-email-arend.vanspriel@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).