[PATCH 6/7] ath10k: make wmi timeout trigger hw restart

Michal Kazior michal.kazior at tieto.com
Fri May 9 05:35:56 PDT 2014


If tx credits aren't replenished for too long
firmware and driver state get out of sync. It
doesn't matter if firmware recovers a little later
on its own since by then it's already too late.

Signed-off-by: Michal Kazior <michal.kazior at tieto.com>
---
 drivers/net/wireless/ath/ath10k/wmi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 159d744..e33c811 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -634,6 +634,11 @@ static int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb,
 	if (ret)
 		dev_kfree_skb_any(skb);
 
+	if (ret == -EAGAIN) {
+		/* no credits for 3 seconds means fw is practically dead */
+		ath10k_core_restart(ar);
+	}
+
 	return ret;
 }
 
-- 
1.8.5.3




More information about the ath10k mailing list