936-ath10k_skip_otp_check.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --- a/drivers/net/wireless/ath/ath10k/core.c
  2. +++ b/drivers/net/wireless/ath/ath10k/core.c
  3. @@ -1165,9 +1165,6 @@ static int ath10k_core_fetch_firmware_fi
  4. {
  5. int ret;
  6. - /* calibration file is optional, don't check for any errors */
  7. - ath10k_fetch_cal_file(ar);
  8. -
  9. ar->fw_api = 5;
  10. ath10k_dbg(ar, ATH10K_DBG_BOOT, "trying fw api %d\n", ar->fw_api);
  11. @@ -1870,6 +1867,9 @@ static int ath10k_core_probe_fw(struct a
  12. goto err_power_down;
  13. }
  14. + /* calibration file is optional, don't check for any errors */
  15. + int calret = ath10k_fetch_cal_file(ar);
  16. +
  17. ret = ath10k_core_fetch_firmware_files(ar);
  18. if (ret) {
  19. ath10k_err(ar, "could not fetch firmware files (%d)\n", ret);
  20. @@ -1892,11 +1892,14 @@ static int ath10k_core_probe_fw(struct a
  21. "could not load pre cal data: %d\n", ret);
  22. }
  23. - ret = ath10k_core_get_board_id_from_otp(ar);
  24. - if (ret && ret != -EOPNOTSUPP) {
  25. - ath10k_err(ar, "failed to get board id from otp: %d\n",
  26. - ret);
  27. - goto err_free_firmware_files;
  28. + /* otp and board file not needed if calibration data is present */
  29. + if (calret) {
  30. + ret = ath10k_core_get_board_id_from_otp(ar);
  31. + if (ret && ret != -EOPNOTSUPP) {
  32. + ath10k_err(ar, "failed to get board id from otp: %d\n",
  33. + ret);
  34. + return ret;
  35. + }
  36. }
  37. ret = ath10k_core_fetch_board_file(ar);