[PATCH ath-next] wifi: ath12k: wmi: Complete regulatory update for dropped events

Konrad Dybcio konradybcio at kernel.org
Tue Aug 18 07:57:05 PDT 2026


From: Konrad Dybcio <konrad.dybcio at 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 at oss.qualcomm.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio at 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 at oss.qualcomm.com>




More information about the ath12k mailing list