mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] wifi: ath11k: Warn when loading regdb fails
@ 2026-10-31  0:13 Jason Lee via B4 Relay
  0 siblings, 0 replies; only message in thread
From: Jason Lee via B4 Relay @ 2026-10-31  0:13 UTC (permalink / raw)
  To: Jeff Johnson; +Cc: linux-wireless, ath11k, linux-kernel, Jason Lee

From: Jason Lee <jay@ruby.im>

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@ruby.im>
---
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@ruby.im>



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-31  0:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31  0:13 [PATCH] wifi: ath11k: Warn when loading regdb fails Jason Lee via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®