[PATCH] wifi: ath11k: Warn when loading regdb fails

From: Jason Lee via B4 Relay

Date: Fri Oct 30 2026 - 20:13:21 EST


From: Jason Lee <jay@xxxxxxx>

ath11k_qmi_event_load_bdf() loads the regulatory database before the
board data file on hardware that supports it, but ignores the return
value of ath11k_qmi_load_bdf_qmi(ab, true). When the regdb is present
and cannot be loaded, the driver carries on silently and nothing in the
log says why the external regdb.bin is not being used.

regdb.bin is optional, so a missing file (-ENOENT) stays quiet, as it
is today (ath11k_core_fetch_regdb() already reports it at debug level).
Any other error is now reported with a warning. Loading still continues
either way, so behaviour does not change.

Compile tested only.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=216664
Signed-off-by: Jason Lee <jay@xxxxxxx>
---
Compile tested only (x86_64 defconfig + ATH11K/ATH11K_PCI=m, W=1, no new
warnings); I don't have ath11k hardware to test on.

An AI assistant helped find this bug report and draft the change.
---
drivers/net/wireless/ath/ath11k/qmi.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index 7dc07339b9..e8096aca96 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -2976,8 +2976,12 @@ static int ath11k_qmi_event_load_bdf(struct ath11k_qmi *qmi)
return ret;
}

- if (ab->hw_params.supports_regdb)
- ath11k_qmi_load_bdf_qmi(ab, true);
+ if (ab->hw_params.supports_regdb) {
+ /* regdb is optional, so a missing file is not an error */
+ ret = ath11k_qmi_load_bdf_qmi(ab, true);
+ if (ret < 0 && ret != -ENOENT)
+ ath11k_warn(ab, "failed to load regdb file: %d\n", ret);
+ }

ret = ath11k_qmi_load_bdf_qmi(ab, false);
if (ret < 0) {

---
base-commit: a9547379cb381e2a036e3261a6becc17973ac470
change-id: 20261030-ath11k-regdb-warn-059d9f1d1881

Best regards,
--
Jason Lee <jay@xxxxxxx>