On Tue, 25 Nov 2025 at 11:27, David Heidelberg <[email protected]> wrote: > > Sadly, this is too early in the initialization process and we get NULL > deref, similar to [1]. >
[dropped splat] > > If no objection raised, I would go back to the original device-tree > property way then (as also another device in need of this quirk showed up). Please fix the NULL deref instead. This is a property of the firmware rather than a device. > > David > > [1] > https://lore.kernel.org/ath10k/[email protected]/ > > On 11/11/2025 13:34, David Heidelberg via B4 Relay wrote: > > From: David Heidelberg <[email protected]> > > > > There are firmware versions which do not support host capability > > QMI request. We suspect either the host cap is not implemented or > > there may be firmware specific issues, but apparently there seem > > to be a generation of firmware that has this particular behavior. > > > > For example, firmware build on Xiaomi Poco F1 (sdm845) phone: > > "QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1" > > > > If we do not skip the host cap QMI request on Xiaomi Poco F1, > > then we get a QMI_ERR_MALFORMED_MSG_V01 error message in the > > ath10k_qmi_host_cap_send_sync(). But this error message is not > > fatal to the firmware nor to the ath10k driver and we can still > > bring up the WiFi services successfully if we just ignore it. > > > > Hence introducing this firmware quirk to skip host capability > > QMI request for the firmware versions which do not support this > > feature. > > > > Suggested-by: Dmitry Baryshkov <[email protected]> > > Signed-off-by: David Heidelberg <[email protected]> > > --- > > drivers/net/wireless/ath/ath10k/core.c | 1 + > > drivers/net/wireless/ath/ath10k/core.h | 3 +++ > > drivers/net/wireless/ath/ath10k/qmi.c | 13 ++++++++++--- > > 3 files changed, 14 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/wireless/ath/ath10k/core.c > > b/drivers/net/wireless/ath/ath10k/core.c > > index 7c2939cbde5f0..7602631696798 100644 > > --- a/drivers/net/wireless/ath/ath10k/core.c > > +++ b/drivers/net/wireless/ath/ath10k/core.c > > @@ -773,6 +773,7 @@ static const char *const ath10k_core_fw_feature_str[] = > > { > > [ATH10K_FW_FEATURE_SINGLE_CHAN_INFO_PER_CHANNEL] = > > "single-chan-info-per-channel", > > [ATH10K_FW_FEATURE_PEER_FIXED_RATE] = "peer-fixed-rate", > > [ATH10K_FW_FEATURE_IRAM_RECOVERY] = "iram-recovery", > > + [ATH10K_FW_FEATURE_NO_HOST_CAP_QMI_REQ] = "no-host-cap-qmi-req", > > }; > > > > static unsigned int ath10k_core_get_fw_feature_str(char *buf, > > diff --git a/drivers/net/wireless/ath/ath10k/core.h > > b/drivers/net/wireless/ath/ath10k/core.h > > index 73a9db302245d..b20541e4046f8 100644 > > --- a/drivers/net/wireless/ath/ath10k/core.h > > +++ b/drivers/net/wireless/ath/ath10k/core.h > > @@ -838,6 +838,9 @@ enum ath10k_fw_features { > > /* Firmware support IRAM recovery */ > > ATH10K_FW_FEATURE_IRAM_RECOVERY = 22, > > > > + /* Firmware does not support host capability QMI request */ > > + ATH10K_FW_FEATURE_NO_HOST_CAP_QMI_REQ = 23, > > + > > /* keep last */ > > ATH10K_FW_FEATURE_COUNT, > > }; > > diff --git a/drivers/net/wireless/ath/ath10k/qmi.c > > b/drivers/net/wireless/ath/ath10k/qmi.c > > index 8275345631a0b..5dc8ea39372c1 100644 > > --- a/drivers/net/wireless/ath/ath10k/qmi.c > > +++ b/drivers/net/wireless/ath/ath10k/qmi.c > > @@ -819,9 +819,16 @@ 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_FW_FEATURE_NO_HOST_CAP_QMI_REQ, > > + ar->running_fw->fw_file.fw_features)) { > > + ret = ath10k_qmi_host_cap_send_sync(qmi); > > + if (ret) > > + return; > > + } > > > > ret = ath10k_qmi_msa_mem_info_send_sync_msg(qmi); > > if (ret) > > > > -- > David Heidelberg > -- With best wishes Dmitry
