[PATCH ath-next] wifi: ath11k: don't warn when a country leaves a pdev without channels

From: Christopher Griffin via B4 Relay

Date: Sat Oct 31 2026 - 11:30:42 EST


From: Christopher Griffin <christophergriffin05@xxxxxxxxx>

ath11k_reg_update_chan_list() hits a WARN_ON() and returns -EINVAL when
none of the pdev's channels is enabled. Userspace can reach that by
setting a country. On an Arista C-360, whose QCN9074 is a 6 GHz-only
pdev, "iw reg set CA" left that wiphy with no enabled channel, and the
driver-initiated regulatory notifier then warned:

WARNING: ... at drivers/net/wireless/ath/ath11k/reg.c:146 ath11k_reg_update_chan_list+0x368/0x3c0
ath11k_pci 0000:01:00.0: failed to update channel list: -22

A domain with no channel for a pdev is not a driver fault. There is no
list to send (ath11k_wmi_send_scan_chan_list_cmd() sends nothing for
zero channels anyway), no vdev can start on the pdev meanwhile, and the
next domain that enables a channel sends the whole list again. ath12k
already treats this case as a debug message.

Log it at debug level and return 0. That also covers
ath11k_mac_op_start(), which ignores the return value but hits the same
WARN_ON() when the radio is started in such a domain.

Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.r4-00683-QCAHKSWPL_SILICONZ-1

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Christopher Griffin <christophergriffin05@xxxxxxxxx>
---
Seen on an Arista C-360, whose QCN9074 is a 6 GHz-only pdev.
---
drivers/net/wireless/ath/ath11k/reg.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/reg.c b/drivers/net/wireless/ath/ath11k/reg.c
index 1030e119fd903..d6457ff3f591a 100644
--- a/drivers/net/wireless/ath/ath11k/reg.c
+++ b/drivers/net/wireless/ath/ath11k/reg.c
@@ -145,8 +145,16 @@ int ath11k_reg_update_chan_list(struct ath11k *ar, bool wait)
}
}

- if (WARN_ON(!num_channels))
- return -EINVAL;
+ /* A regulatory domain can leave a pdev with no usable channel, as
+ * one without 6 GHz rules leaves a 6 GHz-only radio. There is no
+ * list to send then; the domain that enables a channel again sends it.
+ */
+ if (!num_channels) {
+ ath11k_dbg(ar->ab, ATH11K_DBG_REG,
+ "no enabled channel on pdev %u, channel list not sent\n",
+ ar->pdev->pdev_id);
+ return 0;
+ }

params = kzalloc_flex(*params, ch_param, num_channels);
if (!params)

---
base-commit: a3ddbb45768717b5c9f923489387cf55c838d1ad
change-id: 20261031-b107-reg-no-channels-66b15810d920

Best regards,
--
Christopher Griffin <christophergriffin05@xxxxxxxxx>