linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: add ATH10K_FW_FEATURE_IGNORE_OTP_RESULT
@ 2015-04-27 14:24 Kalle Valo
  2015-05-04 17:55 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Kalle Valo @ 2015-04-27 14:24 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless

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 |    4 +++-
 drivers/net/wireless/ath/ath10k/core.h |    3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 987b266278a8..bcccae19325d 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -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;
 	}
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 8444adf42195..827b3d79ed0c 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -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,
 };


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath10k: add ATH10K_FW_FEATURE_IGNORE_OTP_RESULT
  2015-04-27 14:24 [PATCH] ath10k: add ATH10K_FW_FEATURE_IGNORE_OTP_RESULT Kalle Valo
@ 2015-05-04 17:55 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2015-05-04 17:55 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless

Kalle Valo <kvalo@qca.qualcomm.com> writes:

> 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>

Applied.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-04 17:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-27 14:24 [PATCH] ath10k: add ATH10K_FW_FEATURE_IGNORE_OTP_RESULT Kalle Valo
2015-05-04 17:55 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).