1 --- a/drivers/net/wireless/ath/ath10k/core.c
2 +++ b/drivers/net/wireless/ath/ath10k/core.c
3 @@ -1282,9 +1282,6 @@ static int ath10k_core_fetch_firmware_fi
7 - /* calibration file is optional, don't check for any errors */
8 - ath10k_fetch_cal_file(ar);
11 ath10k_dbg(ar, ATH10K_DBG_BOOT, "trying fw api %d\n", ar->fw_api);
13 @@ -2054,7 +2051,7 @@ EXPORT_SYMBOL(ath10k_core_stop);
14 static int ath10k_core_probe_fw(struct ath10k *ar)
16 struct bmi_target_info target_info;
18 + int calret, ret = 0;
20 ret = ath10k_hif_power_up(ar);
22 @@ -2078,6 +2075,9 @@ static int ath10k_core_probe_fw(struct a
26 + /* calibration file is optional, don't check for any errors */
27 + calret = ath10k_fetch_cal_file(ar);
29 ret = ath10k_core_fetch_firmware_files(ar);
31 ath10k_err(ar, "could not fetch firmware files (%d)\n", ret);
32 @@ -2100,11 +2100,14 @@ static int ath10k_core_probe_fw(struct a
33 "could not load pre cal data: %d\n", ret);
36 - ret = ath10k_core_get_board_id_from_otp(ar);
37 - if (ret && ret != -EOPNOTSUPP) {
38 - ath10k_err(ar, "failed to get board id from otp: %d\n",
40 - goto err_free_firmware_files;
41 + /* otp and board file not needed if calibration data is present */
43 + ret = ath10k_core_get_board_id_from_otp(ar);
44 + if (ret && ret != -EOPNOTSUPP) {
45 + ath10k_err(ar, "failed to get board id from otp: %d\n",
47 + goto err_free_firmware_files;
51 ret = ath10k_core_fetch_board_file(ar);