From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
To: Konrad Dybcio <konradybcio@kernel.org>,
Jeff Johnson <jjohnson@kernel.org>,
Vasanthakumar Thiagarajan
<vasanthakumar.thiagarajan@oss.qualcomm.com>,
Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Cc: Jeff Johnson <jeff.johnson@oss.qualcomm.com>,
linux-wireless@vger.kernel.org, ath12k@lists.infradead.org,
linux-kernel@vger.kernel.org,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Subject: Re: [PATCH ath-next] wifi: ath12k: wmi: Complete regulatory update for dropped events
Date: Wed, 19 Aug 2026 09:50:39 +0800 [thread overview]
Message-ID: <f4f1e338-1206-46a1-bbfd-79fb768dc382@oss.qualcomm.com> (raw)
In-Reply-To: <20260818-topic-wifi_reg_fix-v1-1-18c7c289e528@oss.qualcomm.com>
On 8/18/2026 10:57 PM, Konrad Dybcio wrote:
> 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>
>
there is a similar patch [1] as part of a series [2]:
[1]
https://lore.kernel.org/all/20260729-ath12k-regd-wait-timeout-v1-1-504aa6e7e93c@oss.qualcomm.com/
[2]
https://lore.kernel.org/all/20260729-ath12k-regd-wait-timeout-v1-0-504aa6e7e93c@oss.qualcomm.com/
next prev parent reply other threads:[~2026-08-19 1:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-08-19 7:43 ` Konrad Dybcio
2026-08-19 10:06 ` Baochen Qiang
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=f4f1e338-1206-46a1-bbfd-79fb768dc382@oss.qualcomm.com \
--to=baochen.qiang@oss.qualcomm.com \
--cc=aditya.kumar.singh@oss.qualcomm.com \
--cc=ath12k@lists.infradead.org \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=jjohnson@kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.