2016-05-27 14:26:46 +00:00
|
|
|
--- a/drivers/net/wireless/ath/ath10k/core.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
2017-02-24 10:57:27 +00:00
|
|
|
@@ -1362,9 +1362,6 @@ static int ath10k_core_fetch_firmware_fi
|
2016-05-27 14:26:46 +00:00
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
- /* calibration file is optional, don't check for any errors */
|
|
|
|
- ath10k_fetch_cal_file(ar);
|
|
|
|
-
|
|
|
|
ar->fw_api = 5;
|
|
|
|
ath10k_dbg(ar, ATH10K_DBG_BOOT, "trying fw api %d\n", ar->fw_api);
|
|
|
|
|
2017-02-24 10:57:27 +00:00
|
|
|
@@ -2149,7 +2146,7 @@ EXPORT_SYMBOL(ath10k_core_stop);
|
2016-07-09 13:00:30 +00:00
|
|
|
static int ath10k_core_probe_fw(struct ath10k *ar)
|
|
|
|
{
|
|
|
|
struct bmi_target_info target_info;
|
|
|
|
- int ret = 0;
|
|
|
|
+ int calret, ret = 0;
|
|
|
|
|
|
|
|
ret = ath10k_hif_power_up(ar);
|
|
|
|
if (ret) {
|
2017-02-24 10:57:27 +00:00
|
|
|
@@ -2173,6 +2170,9 @@ static int ath10k_core_probe_fw(struct a
|
2016-05-27 14:26:46 +00:00
|
|
|
goto err_power_down;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ /* calibration file is optional, don't check for any errors */
|
2016-07-09 13:00:30 +00:00
|
|
|
+ calret = ath10k_fetch_cal_file(ar);
|
2016-05-27 14:26:46 +00:00
|
|
|
+
|
|
|
|
ret = ath10k_core_fetch_firmware_files(ar);
|
|
|
|
if (ret) {
|
|
|
|
ath10k_err(ar, "could not fetch firmware files (%d)\n", ret);
|
2017-02-24 10:57:27 +00:00
|
|
|
@@ -2195,11 +2195,14 @@ static int ath10k_core_probe_fw(struct a
|
2016-05-27 14:26:46 +00:00
|
|
|
"could not load pre cal data: %d\n", ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
- ret = ath10k_core_get_board_id_from_otp(ar);
|
|
|
|
- if (ret && ret != -EOPNOTSUPP) {
|
|
|
|
- ath10k_err(ar, "failed to get board id from otp: %d\n",
|
|
|
|
- ret);
|
|
|
|
- goto err_free_firmware_files;
|
|
|
|
+ /* otp and board file not needed if calibration data is present */
|
|
|
|
+ if (calret) {
|
|
|
|
+ ret = ath10k_core_get_board_id_from_otp(ar);
|
|
|
|
+ if (ret && ret != -EOPNOTSUPP) {
|
|
|
|
+ ath10k_err(ar, "failed to get board id from otp: %d\n",
|
|
|
|
+ ret);
|
2016-05-16 07:10:56 +00:00
|
|
|
+ goto err_free_firmware_files;
|
2016-05-27 14:26:46 +00:00
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
2017-02-24 10:57:27 +00:00
|
|
|
ret = ath10k_core_check_smbios(ar);
|