From: Amit Pundir <amit.pundir@linaro.org>
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>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
drivers/net/wireless/ath/ath10k/qmi.c | 13 ++++++++++---
drivers/net/wireless/ath/ath10k/snoc.c | 3 +++
drivers/net/wireless/ath/ath10k/snoc.h | 1 +
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c
index eebd78e7ff6bc..e7f90fd9e9b83 100644
--- a/drivers/net/wireless/ath/ath10k/qmi.c
+++ b/drivers/net/wireless/ath/ath10k/qmi.c
@@ -808,6 +808,7 @@ ath10k_qmi_ind_register_send_sync_msg(struct ath10k_qmi *qmi)
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)
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index f72f236fb9eb3..3106502275781 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -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)
diff --git a/drivers/net/wireless/ath/ath10k/snoc.h b/drivers/net/wireless/ath/ath10k/snoc.h
index 1ecae34687c21..46574fd8f84ee 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.h
+++ b/drivers/net/wireless/ath/ath10k/snoc.h
@@ -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;
--
2.53.0
On 3/25/2026 11:27 PM, David Heidelberg via B4 Relay wrote: > From: Amit Pundir <amit.pundir@linaro.org> > > 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> > Signed-off-by: David Heidelberg <david@ixit.cz> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
On Wed, Mar 25, 2026 at 06:57:16PM +0100, David Heidelberg via B4 Relay wrote: > From: Amit Pundir <amit.pundir@linaro.org> > > 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. Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Jeff, to my knowledge this is the best approach that we have to solve the issue on those devices. > > 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> > Signed-off-by: David Heidelberg <david@ixit.cz> > --- > drivers/net/wireless/ath/ath10k/qmi.c | 13 ++++++++++--- > drivers/net/wireless/ath/ath10k/snoc.c | 3 +++ > drivers/net/wireless/ath/ath10k/snoc.h | 1 + > 3 files changed, 14 insertions(+), 3 deletions(-) -- With best wishes Dmitry
On 3/29/2026 9:26 AM, Dmitry Baryshkov wrote: > On Wed, Mar 25, 2026 at 06:57:16PM +0100, David Heidelberg via B4 Relay wrote: >> From: Amit Pundir <amit.pundir@linaro.org> >> >> 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. > > > Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > Jeff, to my knowledge this is the best approach that we have to solve > the issue on those devices. I'm ok with this approach. I need DT Review or ACK on the 1/3 patch in order to bring the first 2 patches through my ath tree. /jeff
On Mon, Mar 30, 2026 at 11:56:16AM -0700, Jeff Johnson wrote: > On 3/29/2026 9:26 AM, Dmitry Baryshkov wrote: > > On Wed, Mar 25, 2026 at 06:57:16PM +0100, David Heidelberg via B4 Relay wrote: > >> From: Amit Pundir <amit.pundir@linaro.org> > >> > >> 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. > > > > > > Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > > > Jeff, to my knowledge this is the best approach that we have to solve > > the issue on those devices. > > I'm ok with this approach. > > I need DT Review or ACK on the 1/3 patch in order to bring the first 2 patches > through my ath tree. Yes, of course. -- With best wishes Dmitry
March 25, 2026 at 5:57 PM, "David Heidelberg via B4 Relay" <devnull+david.ixit.cz@kernel.org mailto:devnull+david.ixit.cz@kernel.org?to=%22David%20Heidelberg%20via%20B4%20Relay%22%20%3Cdevnull%2Bdavid.ixit.cz%40kernel.org%3E > wrote:
>
> From: Amit Pundir <amit.pundir@linaro.org>
>
> 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>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> drivers/net/wireless/ath/ath10k/qmi.c | 13 ++++++++++---
> drivers/net/wireless/ath/ath10k/snoc.c | 3 +++
> drivers/net/wireless/ath/ath10k/snoc.h | 1 +
> 3 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c
> index eebd78e7ff6bc..e7f90fd9e9b83 100644
> --- a/drivers/net/wireless/ath/ath10k/qmi.c
> +++ b/drivers/net/wireless/ath/ath10k/qmi.c
> @@ -808,6 +808,7 @@ ath10k_qmi_ind_register_send_sync_msg(struct ath10k_qmi *qmi)
> 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)
> diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
> index f72f236fb9eb3..3106502275781 100644
> --- a/drivers/net/wireless/ath/ath10k/snoc.c
> +++ b/drivers/net/wireless/ath/ath10k/snoc.c
> @@ -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)
> diff --git a/drivers/net/wireless/ath/ath10k/snoc.h b/drivers/net/wireless/ath/ath10k/snoc.h
> index 1ecae34687c21..46574fd8f84ee 100644
> --- a/drivers/net/wireless/ath/ath10k/snoc.h
> +++ b/drivers/net/wireless/ath/ath10k/snoc.h
> @@ -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;
>
> --
> 2.53.0
>
Tested-by: Paul Sajna <sajattack@postmarketos.org>
© 2016 - 2026 Red Hat, Inc.