diff mbox

[3/3] ath10k: add otp and firmware boot error messages.

Message ID 1395428150-31996-3-git-send-email-greearb@candelatech.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ben Greear March 21, 2014, 6:55 p.m. UTC
From: Ben Greear <greearb@candelatech.com>

If OTP or firmware fails to load properly, print out some
extra info in the kernel logs.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Comments

Kalle Valo March 24, 2014, 11:25 a.m. UTC | #1
greearb@candelatech.com writes:

> From: Ben Greear <greearb@candelatech.com>
>
> If OTP or firmware fails to load properly, print out some
> extra info in the kernel logs.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>

[...]

> @@ -597,12 +598,16 @@ static int ath10k_init_download_firmware(struct ath10k *ar)
>  		return ret;
>  
>  	ret = ath10k_download_and_run_otp(ar);
> -	if (ret)
> +	if (ret) {
> +		ath10k_err("boot otp execute result %d\n", ret);
>  		return ret;
> +	}

"failed to run otp: %d\n"

>  	ret = ath10k_download_fw(ar);
> -	if (ret)
> +	if (ret) {
> +		ath10k_err("boot download firmware result %d\n", ret);
>  		return ret;
> +	}

"failed to download firmware: %d\n"

And I think you should add the same for ath10k_download_board_data()
call before these two, it neither prints anything when an error happens.
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index bf5119f..6b61aa7 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -255,7 +255,8 @@  static int ath10k_download_and_run_otp(struct ath10k *ar)
 	/* OTP is optional */
 
 	if (!ar->otp_data || !ar->otp_len) {
-		ath10k_warn("Not running otp, calibration will be incorrect!\n");
+		ath10k_warn("Not running otp, calibration will be incorrect (otp-data %p otp_len %zd)!\n",
+			    ar->otp_data, ar->otp_len);
 		return 0;
 	}
 
@@ -597,12 +598,16 @@  static int ath10k_init_download_firmware(struct ath10k *ar)
 		return ret;
 
 	ret = ath10k_download_and_run_otp(ar);
-	if (ret)
+	if (ret) {
+		ath10k_err("boot otp execute result %d\n", ret);
 		return ret;
+	}
 
 	ret = ath10k_download_fw(ar);
-	if (ret)
+	if (ret) {
+		ath10k_err("boot download firmware result %d\n", ret);
 		return ret;
+	}
 
 	return ret;
 }