0012-wifi-ath11k-Fix-qmi_msg_handler-data-structure-initi.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. From ed3725e15a154ebebf44e0c34806c57525483f92 Mon Sep 17 00:00:00 2001
  2. From: Rahul Bhattacharjee <quic_rbhattac@quicinc.com>
  3. Date: Fri, 21 Oct 2022 14:31:26 +0530
  4. Subject: [PATCH] wifi: ath11k: Fix qmi_msg_handler data structure
  5. initialization
  6. qmi_msg_handler is required to be null terminated by QMI module.
  7. There might be a case where a handler for a msg id is not present in the
  8. handlers array which can lead to infinite loop while searching the handler
  9. and therefore out of bound access in qmi_invoke_handler().
  10. Hence update the initialization in qmi_msg_handler data structure.
  11. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
  12. Signed-off-by: Rahul Bhattacharjee <quic_rbhattac@quicinc.com>
  13. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  14. Link: https://lore.kernel.org/r/20221021090126.28626-1-quic_rbhattac@quicinc.com
  15. ---
  16. drivers/net/wireless/ath/ath11k/qmi.c | 3 +++
  17. 1 file changed, 3 insertions(+)
  18. --- a/drivers/net/wireless/ath/ath11k/qmi.c
  19. +++ b/drivers/net/wireless/ath/ath11k/qmi.c
  20. @@ -1702,6 +1702,9 @@ static struct qmi_elem_info qmi_wlfw_fw_
  21. .data_type = QMI_EOTI,
  22. .array_type = NO_ARRAY,
  23. },
  24. +
  25. + /* end of list */
  26. + {},
  27. };
  28. static int ath11k_qmi_host_cap_send(struct ath11k_base *ab)