]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: ath10k: Add device-tree quirk to skip host cap QMI requests
authorAmit Pundir <amit.pundir@linaro.org>
Tue, 7 Apr 2026 06:43:55 +0000 (08:43 +0200)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Wed, 8 Apr 2026 17:13:09 +0000 (10:13 -0700)
Some firmware versions do not support the host capability QMI request.
Since this request occurs before firmware-N.bin and board-M.bin are
loaded, the quirk cannot be expressed in the firmware itself.

The root cause is unclear, but there appears to be a generation of
firmware that lacks host capability support.

Without this quirk, ath10k_qmi_host_cap_send_sync() returns
QMI_ERR_MALFORMED_MSG_V01 before loading the firmware. This error is not
fatal - Wi-Fi services still come up successfully if the request is simply
skipped.

Add a device-tree quirk to skip the host capability QMI request on devices
whose firmware does not support it.

For example, firmware build
"QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1"
on Xiaomi Poco F1 phone requires this quirk.

Suggested-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Tested-by: Paul Sajna <sajattack@postmarketos.org>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Link: https://patch.msgid.link/20260407-skip-host-cam-qmi-req-v5-2-dfa8a05c6538@ixit.cz
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath10k/qmi.c
drivers/net/wireless/ath/ath10k/snoc.c
drivers/net/wireless/ath/ath10k/snoc.h

index eebd78e7ff6bc6b78db5e890b7807312f8f365dd..e7f90fd9e9b8399f81642f73905f155f0209bce6 100644 (file)
@@ -808,6 +808,7 @@ out:
 static void ath10k_qmi_event_server_arrive(struct ath10k_qmi *qmi)
 {
        struct ath10k *ar = qmi->ar;
+       struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
        int ret;
 
        ret = ath10k_qmi_ind_register_send_sync_msg(qmi);
@@ -819,9 +820,15 @@ static void ath10k_qmi_event_server_arrive(struct ath10k_qmi *qmi)
                return;
        }
 
-       ret = ath10k_qmi_host_cap_send_sync(qmi);
-       if (ret)
-               return;
+       /*
+        * Skip the host capability request for the firmware versions which
+        * do not support this feature.
+        */
+       if (!test_bit(ATH10K_SNOC_FLAG_SKIP_HOST_CAP_QUIRK, &ar_snoc->flags)) {
+               ret = ath10k_qmi_host_cap_send_sync(qmi);
+               if (ret)
+                       return;
+       }
 
        ret = ath10k_qmi_msa_mem_info_send_sync_msg(qmi);
        if (ret)
index f72f236fb9eb3551e089aed641622568d5069888..3106502275781d32d17a45a661362206144df6b3 100644 (file)
@@ -1362,6 +1362,9 @@ static void ath10k_snoc_quirks_init(struct ath10k *ar)
 
        if (of_property_read_bool(dev->of_node, "qcom,snoc-host-cap-8bit-quirk"))
                set_bit(ATH10K_SNOC_FLAG_8BIT_HOST_CAP_QUIRK, &ar_snoc->flags);
+
+       if (of_property_read_bool(dev->of_node, "qcom,snoc-host-cap-skip-quirk"))
+               set_bit(ATH10K_SNOC_FLAG_SKIP_HOST_CAP_QUIRK, &ar_snoc->flags);
 }
 
 int ath10k_snoc_fw_indication(struct ath10k *ar, u64 type)
index 1ecae34687c212da8edbb6cb880c68e7f5ad9913..46574fd8f84ee4c90434cdd45314f59362bb1a4f 100644 (file)
@@ -51,6 +51,7 @@ enum ath10k_snoc_flags {
        ATH10K_SNOC_FLAG_MODEM_STOPPED,
        ATH10K_SNOC_FLAG_RECOVERY,
        ATH10K_SNOC_FLAG_8BIT_HOST_CAP_QUIRK,
+       ATH10K_SNOC_FLAG_SKIP_HOST_CAP_QUIRK,
 };
 
 struct clk_bulk_data;