0083-wifi-ath11k-Allow-ath11k-to-boot-without-caldata-in-.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From 8aeba427296bff6a6051686f1d139c89a0b00e4c Mon Sep 17 00:00:00 2001
  2. From: Sowmiya Sree Elavalagan <quic_ssreeela@quicinc.com>
  3. Date: Fri, 26 May 2023 12:41:07 +0300
  4. Subject: [PATCH 84/84] wifi: ath11k: Allow ath11k to boot without caldata in
  5. ftm mode
  6. Currently, if ath11k is unable to load the calibration data file it will
  7. always exit. However the calibration data may not be present in factory
  8. test mode, so update the logic to allow the driver to execute in FTM mode
  9. even if downloading the calibration data fails.
  10. Tested-on : IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
  11. Signed-off-by: Sowmiya Sree Elavalagan <quic_ssreeela@quicinc.com>
  12. Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
  13. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  14. Link: https://lore.kernel.org/r/20230517135934.16408-5-quic_rajkbhag@quicinc.com
  15. ---
  16. drivers/net/wireless/ath/ath11k/qmi.c | 10 +++++++++-
  17. 1 file changed, 9 insertions(+), 1 deletion(-)
  18. --- a/drivers/net/wireless/ath/ath11k/qmi.c
  19. +++ b/drivers/net/wireless/ath/ath11k/qmi.c
  20. @@ -1,7 +1,7 @@
  21. // SPDX-License-Identifier: BSD-3-Clause-Clear
  22. /*
  23. * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
  24. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  25. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  26. */
  27. #include <linux/elf.h>
  28. @@ -2460,6 +2460,14 @@ static int ath11k_qmi_load_bdf_qmi(struc
  29. fw_entry = ath11k_core_firmware_request(ab, ATH11K_DEFAULT_CAL_FILE);
  30. if (IS_ERR(fw_entry)) {
  31. + /* Caldata may not be present during first time calibration in
  32. + * factory hence allow to boot without loading caldata in ftm mode
  33. + */
  34. + if (ath11k_ftm_mode) {
  35. + ath11k_info(ab,
  36. + "Booting without cal data file in factory test mode\n");
  37. + return 0;
  38. + }
  39. ret = PTR_ERR(fw_entry);
  40. ath11k_warn(ab,
  41. "qmi failed to load CAL data file:%s\n",