linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFT] ath10k: restart fw on tx-credit timeout
@ 2015-02-06 12:05 Michal Kazior
  2015-02-06 16:15 ` Ben Greear
  2015-02-11 13:30 ` Matti Laakso
  0 siblings, 2 replies; 11+ messages in thread
From: Michal Kazior @ 2015-02-06 12:05 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, malaakso, greearb, Michal Kazior

It makes little sense to continue and let
firmware-host state become inconsistent if a WMI
command can't be submitted to firmware.

This effectively prevents after-affects of
tx-credit starvation bug which include spurious
sta kickout events and inability to associate new
stations after some time when acting as AP.

This should also speed up recovery/teardown in
some cases when firmware stops responding for some
reason.

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

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index aeea1c7..776b257 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1045,9 +1045,15 @@ int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id)
 		(ret != -EAGAIN);
 	}), 3*HZ);
 
-	if (ret)
+	if (ret) {
 		dev_kfree_skb_any(skb);
 
+		if (ret == -EAGAIN) {
+			ath10k_warn(ar, "firmware unresponsive, restarting..\n");
+			queue_work(ar->workqueue, &ar->restart_work);
+		}
+	}
+
 	return ret;
 }
 
-- 
1.8.5.3


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

end of thread, other threads:[~2015-02-14  8:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-06 12:05 [RFT] ath10k: restart fw on tx-credit timeout Michal Kazior
2015-02-06 16:15 ` Ben Greear
2015-02-09  6:24   ` Michal Kazior
2015-02-09 16:03     ` Ben Greear
2015-02-10  6:09       ` Michal Kazior
2015-02-10 17:01         ` Ben Greear
2015-02-11 22:25           ` Ben Greear
2015-02-12  6:55             ` Michal Kazior
2015-02-12 13:21               ` Ben Greear
2015-02-11 13:30 ` Matti Laakso
2015-02-14  8:35   ` Matti Laakso

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