All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath10k: logging for state change transitions.
@ 2014-08-05 21:42 ` greearb
  0 siblings, 0 replies; 4+ messages in thread
From: greearb @ 2014-08-05 21:42 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath10k, Ben Greear

From: Ben Greear <greearb@candelatech.com>

Print error if device failed to recover.

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

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index b2e7303..ced5eca 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3905,8 +3905,10 @@ static void ath10k_restart_complete(struct ieee80211_hw *hw)
 	/* If device failed to restart it will be in a different state, e.g.
 	 * ATH10K_STATE_WEDGED */
 	if (ar->state == ATH10K_STATE_RESTARTED) {
-		ath10k_info("device successfully recovered\n");
+		ath10k_info("device successfully recovered (state RESTARTED to ON)\n");
 		ar->state = ATH10K_STATE_ON;
+	} else {
+		ath10k_info("device failed to recover (state %d)\n", ar->state);
 	}
 
 	mutex_unlock(&ar->conf_mutex);
-- 
1.7.11.7


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

* [PATCH] ath10k: logging for state change transitions.
@ 2014-08-05 21:42 ` greearb
  0 siblings, 0 replies; 4+ messages in thread
From: greearb @ 2014-08-05 21:42 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ben Greear, ath10k

From: Ben Greear <greearb@candelatech.com>

Print error if device failed to recover.

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

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index b2e7303..ced5eca 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3905,8 +3905,10 @@ static void ath10k_restart_complete(struct ieee80211_hw *hw)
 	/* If device failed to restart it will be in a different state, e.g.
 	 * ATH10K_STATE_WEDGED */
 	if (ar->state == ATH10K_STATE_RESTARTED) {
-		ath10k_info("device successfully recovered\n");
+		ath10k_info("device successfully recovered (state RESTARTED to ON)\n");
 		ar->state = ATH10K_STATE_ON;
+	} else {
+		ath10k_info("device failed to recover (state %d)\n", ar->state);
 	}
 
 	mutex_unlock(&ar->conf_mutex);
-- 
1.7.11.7


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH] ath10k: logging for state change transitions.
  2014-08-05 21:42 ` greearb
@ 2014-08-15 12:16   ` Kalle Valo
  -1 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2014-08-15 12:16 UTC (permalink / raw)
  To: greearb; +Cc: linux-wireless, ath10k

greearb@candelatech.com writes:

> From: Ben Greear <greearb@candelatech.com>
>
> Print error if device failed to recover.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
>  drivers/net/wireless/ath/ath10k/mac.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
> index b2e7303..ced5eca 100644
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -3905,8 +3905,10 @@ static void ath10k_restart_complete(struct ieee80211_hw *hw)
>  	/* If device failed to restart it will be in a different state, e.g.
>  	 * ATH10K_STATE_WEDGED */
>  	if (ar->state == ATH10K_STATE_RESTARTED) {
> -		ath10k_info("device successfully recovered\n");
> +		ath10k_info("device successfully recovered (state RESTARTED to ON)\n");
>  		ar->state = ATH10K_STATE_ON;

Here I think state prints should be in debug level too.

> +	} else {
> +		ath10k_info("device failed to recover (state %d)\n", ar->state);
>  	}

And should this be ath10k_err() as it's an unrecoverable error?

Also I would prefer this kind of indentation:

	if (ar->state != ATH10K_STATE_RESTARTED) {
                ath10k_err("device failed to recover");
                goto out;
        }

	ath10k_info("device successfully recovered\n");
	ar->state = ATH10K_STATE_ON;

-- 
Kalle Valo

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

* Re: [PATCH] ath10k: logging for state change transitions.
@ 2014-08-15 12:16   ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2014-08-15 12:16 UTC (permalink / raw)
  To: greearb; +Cc: linux-wireless, ath10k

greearb@candelatech.com writes:

> From: Ben Greear <greearb@candelatech.com>
>
> Print error if device failed to recover.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
>  drivers/net/wireless/ath/ath10k/mac.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
> index b2e7303..ced5eca 100644
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -3905,8 +3905,10 @@ static void ath10k_restart_complete(struct ieee80211_hw *hw)
>  	/* If device failed to restart it will be in a different state, e.g.
>  	 * ATH10K_STATE_WEDGED */
>  	if (ar->state == ATH10K_STATE_RESTARTED) {
> -		ath10k_info("device successfully recovered\n");
> +		ath10k_info("device successfully recovered (state RESTARTED to ON)\n");
>  		ar->state = ATH10K_STATE_ON;

Here I think state prints should be in debug level too.

> +	} else {
> +		ath10k_info("device failed to recover (state %d)\n", ar->state);
>  	}

And should this be ath10k_err() as it's an unrecoverable error?

Also I would prefer this kind of indentation:

	if (ar->state != ATH10K_STATE_RESTARTED) {
                ath10k_err("device failed to recover");
                goto out;
        }

	ath10k_info("device successfully recovered\n");
	ar->state = ATH10K_STATE_ON;

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

end of thread, other threads:[~2014-08-15 12:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-05 21:42 [PATCH] ath10k: logging for state change transitions greearb
2014-08-05 21:42 ` greearb
2014-08-15 12:16 ` Kalle Valo
2014-08-15 12:16   ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.