]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ath10k: add ATH10K_FW_FEATURE_IGNORE_OTP_RESULT
authorKalle Valo <kvalo@qca.qualcomm.com>
Tue, 28 Apr 2015 17:19:30 +0000 (20:19 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 4 May 2015 17:48:59 +0000 (20:48 +0300)
qca6174 otp binary seems to always return an error to the host, even if the
calibration succeeded. Add a firmware feature flag to detect if the firmware
image which have this problem and workaround the issue in ath10k by ignoring
the error code.

I was also considering making this hw specific flag but as this is strictly a
firmware issue it's best to handle this via a firmware feature flag so that it
will be easy to disable the workaround.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/core.h

index 987b266278a85915eb0a1936f9c5010386459cf9..bcccae19325d8f77da713a37956514ee5f97c1b9 100644 (file)
@@ -387,7 +387,9 @@ static int ath10k_download_and_run_otp(struct ath10k *ar)
 
        ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot otp execute result %d\n", result);
 
-       if (!skip_otp && result != 0) {
+       if (!(skip_otp || test_bit(ATH10K_FW_FEATURE_IGNORE_OTP_RESULT,
+                                  ar->fw_features))
+           && result != 0) {
                ath10k_err(ar, "otp calibration failed: %d", result);
                return -EINVAL;
        }
index 8444adf42195da94ddbbead4a34018bc4f119714..827b3d79ed0c97f5496b0de7064dccdd7b30dbbc 100644 (file)
@@ -460,6 +460,9 @@ enum ath10k_fw_features {
         */
        ATH10K_FW_FEATURE_WOWLAN_SUPPORT = 6,
 
+       /* Don't trust error code from otp.bin */
+       ATH10K_FW_FEATURE_IGNORE_OTP_RESULT,
+
        /* keep last */
        ATH10K_FW_FEATURE_COUNT,
 };