From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <kevin_yang@realtek.com>
Subject: [PATCH 2/8] wifi: rtw89: fw: scan offload prohibit all 6 GHz channel if no 6 GHz sband
Date: Fri, 12 Apr 2024 19:57:23 +0800 [thread overview]
Message-ID: <20240412115729.8316-3-pkshih@realtek.com> (raw)
In-Reply-To: <20240412115729.8316-1-pkshih@realtek.com>
From: Zong-Zhe Yang <kevin_yang@realtek.com>
We have some policy via BIOS to block uses of 6 GHz. In this case, 6 GHz
sband will be NULL even if it is WiFi 7 chip. So, add NULL handling here
to avoid crash.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/fw.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 74d0d515ada0..d9ab781fa0e6 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -4689,6 +4689,10 @@ static void rtw89_scan_get_6g_disabled_chan(struct rtw89_dev *rtwdev,
u8 i, idx;
sband = rtwdev->hw->wiphy->bands[NL80211_BAND_6GHZ];
+ if (!sband) {
+ option->prohib_chan = U64_MAX;
+ return;
+ }
for (i = 0; i < sband->n_channels; i++) {
chan = &sband->channels[i];
--
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 ` Ping-Ke Shih [this message]
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 ` [PATCH 5/8] wifi: rtw89: regd: block 6 GHz by policy if not specific country Ping-Ke Shih
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-3-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).