From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <kevin_yang@realtek.com>
Subject: [PATCH 5/8] wifi: rtw89: regd: block 6 GHz by policy if not specific country
Date: Fri, 12 Apr 2024 19:57:26 +0800 [thread overview]
Message-ID: <20240412115729.8316-6-pkshih@realtek.com> (raw)
In-Reply-To: <20240412115729.8316-1-pkshih@realtek.com>
From: Zong-Zhe Yang <kevin_yang@realtek.com>
We allow 6 GHz on target regd if and only if
1. it is a specific country, i.e. not any world-wide cases
2. its 6 GHz is not blocked
So, for world-wide cases, their 6 GHz will be blocked now.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/regd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/regd.c b/drivers/net/wireless/realtek/rtw89/regd.c
index d0857ef60ea6..85a7f902ccf9 100644
--- a/drivers/net/wireless/realtek/rtw89/regd.c
+++ b/drivers/net/wireless/realtek/rtw89/regd.c
@@ -572,10 +572,8 @@ static void rtw89_regd_apply_policy_6ghz(struct rtw89_dev *rtwdev,
int i;
index = rtw89_regd_get_index(regd);
- if (index == RTW89_REGD_MAX_COUNTRY_NUM)
- return;
-
- if (!test_bit(index, regulatory->block_6ghz))
+ if (index != RTW89_REGD_MAX_COUNTRY_NUM &&
+ !test_bit(index, regulatory->block_6ghz))
return;
rtw89_debug(rtwdev, RTW89_DBG_REGD, "%c%c 6 GHz is blocked by policy\n",
--
2.25.1
next prev parent reply other threads:[~2024-04-12 11:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 11:57 [PATCH 0/8] wifi: rtw89: configure 5.9 and 6 GHz channels and power type by BIOS settings Ping-Ke Shih
2024-04-12 11:57 ` [PATCH 1/8] wifi: rtw89: sar: correct TX power boundary for MAC domain Ping-Ke Shih
2024-04-18 1:19 ` Ping-Ke Shih
2024-04-12 11:57 ` [PATCH 2/8] wifi: rtw89: fw: scan offload prohibit all 6 GHz channel if no 6 GHz sband Ping-Ke Shih
2024-04-12 11:57 ` [PATCH 3/8] wifi: rtw89: 8852c: update TX power tables to R69.1 (1 of 2) Ping-Ke Shih
2024-04-12 11:57 ` [PATCH 4/8] wifi: rtw89: 8852c: update TX power tables to R69.1 (2 " Ping-Ke Shih
2024-04-12 11:57 ` Ping-Ke Shih [this message]
2024-04-12 11:57 ` [PATCH 6/8] wifi: rtw89: regd: extend policy of UNII-4 for IC regulatory Ping-Ke Shih
2024-04-12 11:57 ` [PATCH 7/8] wifi: rtw89: acpi: process 6 GHz SP policy from ACPI DSM Ping-Ke Shih
2024-04-12 11:57 ` [PATCH 8/8] wifi: rtw89: regd: handle policy of 6 GHz SP according to BIOS Ping-Ke Shih
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=20240412115729.8316-6-pkshih@realtek.com \
--to=pkshih@realtek.com \
--cc=kevin_yang@realtek.com \
--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 read-only IMAP folder(s) and NNTP newsgroup(s).