Skip to contentSkip to conversation

ath10k: logging for state change transitions.

PATCH In review [email protected] 2 participants 2 messages Aug 5, 2014 – Aug 15, 2014 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: logging for state change transitions.

From: Ben Greear <[email protected]>

Print error if device failed to recover.

---
 drivers/net/wireless/ath/ath10k/mac.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/mac.c +3 -1
index b2e7303..ced5eca 100644
@@ -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);
Signature · 1 line
1.7.11.7
#1 lore raw
Quoted 14 lines · [email protected] writes:

From: Ben Greear <[email protected]>

Print error if device failed to recover.

---
 drivers/net/wireless/ath/ath10k/mac.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/mac.c +0 -0
index b2e7303..ced5eca 100644

drivers/net/wireless/ath/ath10k/mac.c static void ath10k_restart_complete(struct ieee80211_hw *hw) · line 3909

Quoted 6 lines
drivers/net/wireless/ath/ath10k/mac.c +1 -1
@@ -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.

drivers/net/wireless/ath/ath10k/mac.c static void ath10k_restart_complete(struct ieee80211_hw *hw) · line 3912

Quoted 3 lines
drivers/net/wireless/ath/ath10k/mac.c +2 -0
+	} 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;
Signature · 1 line
Kalle Valo