From: Michael Pfeifroth <micpf@westermo.com>
To: Jeff Johnson <jjohnson@kernel.org>
Cc: linux-wireless@vger.kernel.org, ath12k@lists.infradead.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH] wifi: ath12k: fix freq range overflow when reg rules not yet parsed
Date: Thu, 3 Sep 2026 15:29:38 +0200 [thread overview]
Message-ID: <apl2QtZu6EwGL0dD@mpf-ESPRIMO-P9012> (raw)
ath12k_regd_update() resets ab->reg_freq_{2,5,6}ghz.start_freq to INT_MAX
before the per-band regulatory rules are parsed, and firmware delivers the
2 GHz rules before the 5/6 GHz ones. If it runs for a radio whose rules are
not applied yet, freq_low stays at INT_MAX, and MHZ_TO_KHZ(freq_low)
overflows u32 into an inverted, empty range. cfg80211 then rejects AP
bring-up on that band with "Failed to set beacon parameters".
Reject non-positive-width ranges; a later ath12k_regd_update() installs the
correct range once the rules exist.
Fixes: 0d777aa2ca77 ("wifi: ath12k: fix mac pdev frequency range update")
Cc: stable@vger.kernel.org
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 99bf5cf79..654c58d7c 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -14125,7 +14125,7 @@ EXPORT_SYMBOL(ath12k_mac_op_set_rekey_data);
void ath12k_mac_update_freq_range(struct ath12k *ar,
u32 freq_low, u32 freq_high)
{
- if (!(freq_low && freq_high))
+ if (!freq_low || freq_low >= freq_high)
return;
if (ar->freq_range.start_freq || ar->freq_range.end_freq) {
base-commit: 1b78070aaef63512688aebfbc82365ef9d6660f1
--
2.34.1
reply other threads:[~2026-09-03 13:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=apl2QtZu6EwGL0dD@mpf-ESPRIMO-P9012 \
--to=micpf@westermo.com \
--cc=ath12k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=stable@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