]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: ath10k: do not always wait for MSA_READY indicator
authorMarc Gonzalez <mgonzalez@freebox.fr>
Mon, 29 Apr 2024 14:06:29 +0000 (16:06 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Mon, 13 May 2024 14:15:48 +0000 (17:15 +0300)
The ath10k driver waits for an "MSA_READY" indicator
to complete initialization. If the indicator is not
received, then the device remains unusable.

Several msm8998-based devices are affected by this issue.
Oddly, it seems safe to NOT wait for the indicator, and
proceed immediately when QMI_EVENT_SERVER_ARRIVE.

fw_version 0x100204b2
fw_build_timestamp 2019-09-04 03:01
fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.1.0-01202-QCAHLSWMTPLZ-1.221523.2

Jeff Johnson wrote:

  The feedback I received was "it might be ok to change all ath10k qmi
  to skip waiting for msa_ready", and it was pointed out that ath11k
  (and ath12k) do not wait for it.

  However with so many deployed devices, "might be ok" isn't a strong
  argument for changing the default behavior.

Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/23540303-5816-45d5-a1af-5f09d645a73b@freebox.fr
drivers/net/wireless/ath/ath10k/qmi.c
drivers/net/wireless/ath/ath10k/qmi.h

index 38e939f572a9ed5aeafee612838ba04f25e7c006..f1f33af0170a08744ae658130e29781c0e5bedfb 100644 (file)
@@ -1040,6 +1040,10 @@ static void ath10k_qmi_driver_event_work(struct work_struct *work)
                switch (event->type) {
                case ATH10K_QMI_EVENT_SERVER_ARRIVE:
                        ath10k_qmi_event_server_arrive(qmi);
+                       if (qmi->no_msa_ready_indicator) {
+                               ath10k_info(ar, "qmi not waiting for msa_ready indicator");
+                               ath10k_qmi_event_msa_ready(qmi);
+                       }
                        break;
                case ATH10K_QMI_EVENT_SERVER_EXIT:
                        ath10k_qmi_event_server_exit(qmi);
@@ -1048,6 +1052,10 @@ static void ath10k_qmi_driver_event_work(struct work_struct *work)
                        ath10k_qmi_event_fw_ready_ind(qmi);
                        break;
                case ATH10K_QMI_EVENT_MSA_READY_IND:
+                       if (qmi->no_msa_ready_indicator) {
+                               ath10k_warn(ar, "qmi unexpected msa_ready indicator");
+                               break;
+                       }
                        ath10k_qmi_event_msa_ready(qmi);
                        break;
                default:
@@ -1077,6 +1085,9 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size)
        if (of_property_read_bool(dev->of_node, "qcom,msa-fixed-perm"))
                qmi->msa_fixed_perm = true;
 
+       if (of_property_read_bool(dev->of_node, "qcom,no-msa-ready-indicator"))
+               qmi->no_msa_ready_indicator = true;
+
        ret = qmi_handle_init(&qmi->qmi_hdl,
                              WLFW_BDF_DOWNLOAD_REQ_MSG_V01_MAX_MSG_LEN,
                              &ath10k_qmi_ops, qmi_msg_handler);
index 89464239fe96aa8d53c5434bd9b3e82dd2033ba1..0816eb4e4a18a3f3641eb64d11a4db2a36ad7616 100644 (file)
@@ -107,6 +107,7 @@ struct ath10k_qmi {
        char fw_build_timestamp[MAX_TIMESTAMP_LEN + 1];
        struct ath10k_qmi_cal_data cal_data[MAX_NUM_CAL_V01];
        bool msa_fixed_perm;
+       bool no_msa_ready_indicator;
        enum ath10k_qmi_state state;
 };