Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49dc746c authored by Arend van Spriel's avatar Arend van Spriel Committed by nakul kachhwaha
Browse files

cfg80211: add 6GHz UNII band definitions

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: default avatarPieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: default avatarLeon Zegers <leon.zegers@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
Link: https://lore.kernel.org/r/1564745465-21234-3-git-send-email-arend.vanspriel@broadcom.com


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Git-commit: f89769cfdd5a469c9d5791a06a670d424e847477
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git


Change-Id: I15fcecab9ac149195907f460c28bff7a9020a4d5
CRs-Fixed: 2536735
Signed-off-by: default avatarLiangwei Dong <liangwei@codeaurora.org>
parent a29838ef
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -3829,8 +3829,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)
{
@@ -3854,6 +3855,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;
}