The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH ath-next] wifi: ath12k: wmi: Complete regulatory update for dropped events
@ 2026-08-18 14:57 Konrad Dybcio
  2026-08-19  1:50 ` Baochen Qiang
  0 siblings, 1 reply; 4+ messages in thread
From: Konrad Dybcio @ 2026-08-18 14:57 UTC (permalink / raw)
  To: Jeff Johnson, Vasanthakumar Thiagarajan, Aditya Kumar Singh
  Cc: Jeff Johnson, linux-wireless, ath12k, linux-kernel, Konrad Dybcio,
	Baochen Qiang

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

If ath12k_reg_validate_reg_info() returns STATUS_FALLBACK/DROP (which
are not fatal), the code then jumps to mem_free with pdev_idx still set
to 255, making the following completion never take place.

That then results in repeating "Timeout while waiting for regulatory
update" messages, as observed e.g. on a Glymur-based ASUS Zenbook A16.

Fix that by updating the pdev_idx right after the actually-fatal case
of not being able to extract the reg info data is ruled out.

Fixes: 906619a00967 ("wifi: ath12k: handle regulatory hints during mac registration")
Suggested-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 drivers/net/wireless/ath/ath12k/wmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index d5160af60e00..4ac78ba6c790 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -6975,6 +6975,8 @@ static int ath12k_reg_chan_list_event(struct ath12k_base *ab, struct sk_buff *sk
 		goto mem_free;
 	}
 
+	pdev_idx = reg_info->phy_id;
+
 	ret = ath12k_reg_validate_reg_info(ab, reg_info);
 	if (ret == ATH12K_REG_STATUS_FALLBACK) {
 		ath12k_warn(ab, "failed to validate reg info %d\n", ret);
@@ -6991,7 +6993,6 @@ static int ath12k_reg_chan_list_event(struct ath12k_base *ab, struct sk_buff *sk
 	}
 
 	/* free old reg_info if it exist */
-	pdev_idx = reg_info->phy_id;
 	if (ab->reg_info[pdev_idx]) {
 		ath12k_reg_reset_reg_info(ab->reg_info[pdev_idx]);
 		kfree(ab->reg_info[pdev_idx]);

---
base-commit: e6664f2b33db9b6811eb4cec109f06cb2b4f458d
change-id: 20260818-topic-wifi_reg_fix-a20c9256c5fd

Best regards,
--  
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-19 10:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 14:57 [PATCH ath-next] wifi: ath12k: wmi: Complete regulatory update for dropped events Konrad Dybcio
2026-08-19  1:50 ` Baochen Qiang
2026-08-19  7:43   ` Konrad Dybcio
2026-08-19 10:06     ` Baochen Qiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox