2626d780316e13fb56933a5b8af28f95a2414e0c
[openwrt.git] / package / kernel / mac80211 / patches / 920-ath10k_allow_fallback_to_board_bin_on_empty_otp_stream.patch
1 --- a/drivers/net/wireless/ath/ath10k/core.c
2 +++ b/drivers/net/wireless/ath/ath10k/core.c
3 @@ -391,8 +391,13 @@ static int ath10k_download_and_run_otp(s
4         if (!(skip_otp || test_bit(ATH10K_FW_FEATURE_IGNORE_OTP_RESULT,
5                                    ar->fw_features))
6             && result != 0) {
7 -               ath10k_err(ar, "otp calibration failed: %d", result);
8 -               return -EINVAL;
9 +               if (result == 2) {
10 +                       ath10k_warn(ar, "otp stream is empty, using board.bin contents");
11 +                       return 0;
12 +               } else {
13 +                       ath10k_err(ar, "otp calibration failed: %d", result);
14 +                       return -EINVAL;
15 +               }
16         }
17  
18         return 0;