mbox series

[ath-next,0/3] wifi: ath12k: fix several regdomain update issues

Message ID 20250521-ath12k-fix-ah-regd_updated-v1-0-9737de5bf98e@oss.qualcomm.com
Headers show
Series wifi: ath12k: fix several regdomain update issues | expand

Message

Aditya Kumar Singh May 21, 2025, 4:59 p.m. UTC
Following commit 4c546023d71a ("wifi: ath12k: update regulatory rules when
interface added"), the WCN7850 fails to connect to a 6 GHz AP due to
ah->regd_updated not being reset. This issue is addressed in patch 1.

For the same reason, regulatory domain updates also fail during interface
addition and connection establishment. These issues are resolved in
patches 2 and 3, respectively.

---
Baochen Qiang (3):
      wifi: ath12k: fix regdomain update failure after 11D scan completes
      wifi: ath12k: fix regdomain update failure when adding interface
      wifi: ath12k: fix regdomain update failure when connection establishes

 drivers/net/wireless/ath/ath12k/mac.c | 2 ++
 drivers/net/wireless/ath/ath12k/reg.c | 2 +-
 drivers/net/wireless/ath/ath12k/wmi.c | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)
---
base-commit: 5b5f14fc4d737a956dedafb996459c4276f4fa49
change-id: 20250521-ath12k-fix-ah-regd_updated-630a550a0e79

Comments

Aditya Kumar Singh May 21, 2025, 4:59 p.m. UTC | #1
From: Baochen Qiang <quic_bqiang@quicinc.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.
Jeff Johnson May 21, 2025, 9:04 p.m. UTC | #2
On Wed, 21 May 2025 22:29:28 +0530, Aditya Kumar Singh wrote:
> Following commit 4c546023d71a ("wifi: ath12k: update regulatory rules when
> interface added"), the WCN7850 fails to connect to a 6 GHz AP due to
> ah->regd_updated not being reset. This issue is addressed in patch 1.
> 
> For the same reason, regulatory domain updates also fail during interface
> addition and connection establishment. These issues are resolved in
> patches 2 and 3, respectively.
> 
> [...]

Applied, thanks!

[1/3] wifi: ath12k: fix regdomain update failure after 11D scan completes
      commit: d662c14a51910ba0ad66afd248b601ba30b9f7f1
[2/3] wifi: ath12k: fix regdomain update failure when adding interface
      commit: 37e775a0a9d79a031d28d9e21480f99f448e9215
[3/3] wifi: ath12k: fix regdomain update failure when connection establishes
      commit: 886bb3624e4c9914a943b63fcfdf30b8d2f2b66e

Best regards,