Skip to contentSkip to conversation

wifi: ath11k: Warn when loading regdb fails

PATCH New Jason Lee 1 participant 1 message Oct 31 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore

Jason Lee

author
#0 lore raw

PATCH 1/1 wifi: ath11k: Warn when loading regdb fails

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.

---
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(-)
drivers/net/wireless/ath/ath11k/qmi.c +6 -2
index 7dc07339b9..e8096aca96 100644
@@ -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,

Signature · 1 line
Jason Lee <[email protected]>