From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
To: Shenghan Gao <gsh20040816@gmail.com>, Jeff Johnson <jjohnson@kernel.org>
Cc: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>,
Vasanthakumar Thiagarajan
<vasanthakumar.thiagarajan@oss.qualcomm.com>,
linux-wireless@vger.kernel.org, ath12k@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH ath-current] wifi: ath12k: fix frequency range for single-pdev devices
Date: Mon, 20 Jul 2026 16:34:37 +0800 [thread overview]
Message-ID: <5ca16013-e8a0-4403-a2b3-b3b43ea2bb2d@oss.qualcomm.com> (raw)
In-Reply-To: <20260715065218.41232-1-gsh20040816@gmail.com>
On 7/15/2026 2:52 PM, Shenghan Gao wrote:
> Commit 0d777aa2ca77 ("wifi: ath12k: fix mac pdev frequency range update")
> made ath12k_regd_update() handle each supported band independently.
> However, it uses WMI band capability values as indices into
> pdev->cap.band[]. Those values are bit flags, while cap.band[] is indexed
> by enum nl80211_band. As a result, the 2.4 GHz lookup reads the
> 5 GHz entry, while the 5 GHz lookup reads the 60 GHz entry.
>
> Also, the 5 GHz range is skipped whenever the radio supports 6 GHz. This
> is valid when 5 and 6 GHz belong to separate pdevs, but not for single-pdev
> devices such as WCN7850, where the same pdev covers both bands. After a
> regulatory update, 5 GHz is therefore omitted from ar->freq_range and later
> filtered out of the channel list sent to firmware.
>
> On the tested WCN7850, the 11d regulatory update left the frequency range
> at 2402-2482 MHz and sent 13 channels to firmware. A subsequent 5 GHz scan
can you share more details on how the frequency range is updated to cover only 2 GHz band ?
> failed with WMI_SCAN_REASON_INTERNAL_FAILURE. With both ranges combined,
> the range is 2402-5835 MHz and 26 channels are sent to firmware.
>
> Index cap.band[] with NL80211_BAND_* and update 5 GHz for single-pdev
> devices even when 6 GHz is supported.
>
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
>
> Fixes: 0d777aa2ca77 ("wifi: ath12k: fix mac pdev frequency range update")
> Cc: stable@vger.kernel.org
> Assisted-by: Codex:GPT-5.6 Sol
> Signed-off-by: Shenghan Gao <gsh20040816@gmail.com>
> ---
> Testing notes:
>
> - Runtime testing was performed on WCN7850 under the CN regulatory domain.
> - 2.4 and 5 GHz scanning and 5 GHz association were verified.
> - 6 GHz operation was not tested because it is unavailable under the CN
> regulatory domain.
> - QCC2072 was not tested because the hardware was not available.
>
> drivers/net/wireless/ath/ath12k/reg.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath12k/reg.c b/drivers/net/wireless/ath/ath12k/reg.c
> index 89abf2e87ad1..c3bb1df2b1e2 100644
> --- a/drivers/net/wireless/ath/ath12k/reg.c
> +++ b/drivers/net/wireless/ath/ath12k/reg.c
> @@ -300,7 +300,7 @@ int ath12k_regd_update(struct ath12k *ar, bool init)
>
> if (supported_bands & WMI_HOST_WLAN_2GHZ_CAP) {
> if (ab->hw_params->single_pdev_only) {
> - phy_id = ar->pdev->cap.band[WMI_HOST_WLAN_2GHZ_CAP].phy_id;
> + phy_id = ar->pdev->cap.band[NL80211_BAND_2GHZ].phy_id;
> reg_cap = &ab->hal_reg_cap[phy_id];
> }
>
> @@ -310,9 +310,10 @@ int ath12k_regd_update(struct ath12k *ar, bool init)
> ath12k_mac_update_freq_range(ar, freq_low, freq_high);
> }
>
> - if (supported_bands & WMI_HOST_WLAN_5GHZ_CAP && !ar->supports_6ghz) {
> + if (supported_bands & WMI_HOST_WLAN_5GHZ_CAP &&
> + (!ar->supports_6ghz || ab->hw_params->single_pdev_only)) {
> if (ab->hw_params->single_pdev_only) {
> - phy_id = ar->pdev->cap.band[WMI_HOST_WLAN_5GHZ_CAP].phy_id;
> + phy_id = ar->pdev->cap.band[NL80211_BAND_5GHZ].phy_id;
> reg_cap = &ab->hal_reg_cap[phy_id];
> }
>
>
> base-commit: a1a21995c2e1cc2ca6b2226cfe4f5f018370182a
next prev parent reply other threads:[~2026-07-20 8:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 6:52 [PATCH ath-current] wifi: ath12k: fix frequency range for single-pdev devices Shenghan Gao
2026-07-20 8:34 ` Baochen Qiang [this message]
2026-07-20 9:25 ` Shenghan Gao
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=5ca16013-e8a0-4403-a2b3-b3b43ea2bb2d@oss.qualcomm.com \
--to=baochen.qiang@oss.qualcomm.com \
--cc=aditya.kumar.singh@oss.qualcomm.com \
--cc=ath12k@lists.infradead.org \
--cc=gsh20040816@gmail.com \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=vasanthakumar.thiagarajan@oss.qualcomm.com \
/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