[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250521-ath12k-fix-ah-regd_updated-v1-1-9737de5bf98e@oss.qualcomm.com>
Date: Wed, 21 May 2025 22:29:29 +0530
From: Aditya Kumar Singh <aditya.kumar.singh@....qualcomm.com>
To: Jeff Johnson <jjohnson@...nel.org>, Kang Yang <quic_kangyang@...cinc.com>,
Wen Gong <quic_wgong@...cinc.com>,
Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@....qualcomm.com>,
Baochen Qiang <quic_bqiang@...cinc.com>
Cc: Jeff Johnson <jeff.johnson@....qualcomm.com>,
linux-wireless@...r.kernel.org, ath12k@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Aditya Kumar Singh <aditya.kumar.singh@....qualcomm.com>
Subject: [PATCH ath-next 1/3] wifi: ath12k: fix regdomain update failure
after 11D scan completes
From: Baochen Qiang <quic_bqiang@...cinc.com>
In the current implementation of ath12k_regd_update(), the ah->regd_updated
flag is used to ensure that the regulatory domain is updated only once per
radio. During MAC registration, this function is called to push the default
regulatory domain to cfg80211. At that point, the hardware state is not on
and hence ah->regd_updated remains false.
However, after commit 4c546023d71a ("wifi: ath12k: update regulatory rules
when interface added"), ath12k_reg_handle_chan_list() is invoked when an
interface is added, which in turn calls ath12k_regd_update(). By this time,
hardware state is on and consecutively ah->regd_updated becomes true.
Later, when the 11D scan completes and a new regulatory domain is received
from the firmware, the host attempts to update cfg80211 again via
ath12k_regd_update(). But since ah->regd_updated is already true, the
update is skipped.
>From the user's perspective, this results in a failure to connect to 6 GHz
APs, as the default regulatory domain (the only one pushed to cfg80211)
does not include 6 GHz support.
To resolve this, reset the ah->regd_updated flag when handling the 11D
regulatory domain update.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1
Fixes: 591de41d7008 ("wifi: ath12k: add 11d scan offload support")
Signed-off-by: Baochen Qiang <quic_bqiang@...cinc.com>
Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@....qualcomm.com>
---
drivers/net/wireless/ath/ath12k/wmi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index 72e7730c7694bc7a5fdcf007fee1310bf67b5654..60e2444fe08cefa39ae218d07eb9736d2a0c982b 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -6125,6 +6125,7 @@ static int ath12k_reg_11d_new_cc_event(struct ath12k_base *ab, struct sk_buff *s
pdev = &ab->pdevs[i];
ar = pdev->ar;
ar->state_11d = ATH12K_11D_IDLE;
+ ar->ah->regd_updated = false;
complete(&ar->completed_11d_scan);
}
--
2.34.1
Powered by blists - more mailing lists