[RFC PATCH] wifi: ath12k: keep regulatory frequency ranges per radio
Baochen Qiang
baochen.qiang at oss.qualcomm.com
Fri Oct 30 00:59:30 PDT 2026
On 10/30/2026 11:34 AM, Lang Jianjun wrote:
> From: Jianjun Lang <lang.jianjun at ntu.edu.sg>
>
> WCN7850 uses one pdev for multiple bands. When it receives CN rules,
> ath12k_regd_update() skips the 5 GHz range because supports_6ghz is set.
> There are no 6 GHz rules to extend the remaining 2.4 GHz range, so the
> firmware channel list loses every 5 GHz channel.
>
> The ranges also live in ath12k_base. An event for another radio can
> replace them before the first radio updates its channel list.
>
> Store the ranges in ath12k_pdev, indexed by nl80211_band. Build each
> set locally and publish it together with the regulatory domain under
> base_lock. Take a complete snapshot for channel initialization and
> regulatory updates. Copy the selected regulatory domain and ranges
> under one lock acquisition so a later event cannot mix generations.
>
> Use the presence of a 5 GHz rule range instead of supports_6ghz to
> select the 5 GHz update. Use nl80211_band indices for the hardware PHY
> lookup and refresh the 5/6 GHz hardware limits for single-pdev devices.
> Reject empty hardware/rule intersections before converting MHz to kHz.
>
> This follows the per-radio design proposed during review of the earlier
> single-pdev fix. The earlier report and review are linked below.
>
> Fixes: 0d777aa2ca77 ("wifi: ath12k: fix mac pdev frequency range update")
> Reported-by: Shenghan Gao <gsh20040816 at gmail.com>
> Link: https://lore.kernel.org/20260715065218.41232-1-gsh20040816@gmail.com/
> Suggested-by: Baochen Qiang <baochen.qiang at oss.qualcomm.com>
> Link: https://lore.kernel.org/9dd4e992-5810-429f-bc54-036c4eb276a7@oss.qualcomm.com/
> Assisted-by: LLM
> Signed-off-by: Jianjun Lang <lang.jianjun at ntu.edu.sg>
duplicate with
https://lore.kernel.org/all/20261027015919.277156-1-mrmrmidoessam@gmail.com/
More information about the ath12k
mailing list