mac80211: update to wireless-testing 2015-03-09
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 920-ath10k_allow_fallback_to_board_bin_on_empty_otp_stream.patch
index d04c4abb141a1ead1c62963aafeded4fa2555f35..4c04d4f0ac5d6be405830c3b4a8adbf73d91d672 100644 (file)
@@ -1,14 +1,20 @@
 --- a/drivers/net/wireless/ath/ath10k/core.c
 +++ b/drivers/net/wireless/ath/ath10k/core.c
-@@ -280,7 +280,10 @@ static int ath10k_download_and_run_otp(s
+@@ -387,9 +387,14 @@ static int ath10k_download_and_run_otp(s
  
        ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot otp execute result %d\n", result);
  
--      if (result != 0) {
-+      if (result == 2) {
-+              ath10k_warn(ar, "otp stream is empty, using board.bin contents");
-+              return 0;
-+      } else if (result != 0) {
-               ath10k_err(ar, "otp calibration failed: %d", result);
-               return -EINVAL;
+-      if (!skip_otp && result != 0) {
+-              ath10k_err(ar, "otp calibration failed: %d", result);
+-              return -EINVAL;
++      if (!skip_otp) {
++              if (result == 2) {
++                      ath10k_warn(ar, "otp stream is empty, using board.bin contents");
++                      return 0;
++              } else if (result != 0) {
++                      ath10k_err(ar, "otp calibration failed: %d", result);
++                      return -EINVAL;
++              }
        }
+       return 0;