aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/wmi.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2013-07-16 03:54:35 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2013-07-30 11:01:20 -0400
commitaffd321733eebc92b12cd329505f63e94ae80c93 (patch)
tree2e743c8a0a89f6e6057cd2c8f4b96769dfcdde17 /drivers/net/wireless/ath/ath10k/wmi.c
parent87571bf0b8b27d4a97848ce48de34fa6d3b12db8 (diff)
ath10k: implement device recovery
Restart the hardware if FW crashes. If FW crashes during recovery we leave the hardware in a "wedged" state to avoid recursive recoveries. When in "wedged" state userspace may bring interfaces down (to issue stop()) and then bring one interface (to issue start()) to reload hardware manually. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/wmi.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index b7e7e456b5de..0d25cd733afd 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -27,6 +27,13 @@ void ath10k_wmi_flush_tx(struct ath10k *ar)
27{ 27{
28 int ret; 28 int ret;
29 29
30 lockdep_assert_held(&ar->conf_mutex);
31
32 if (ar->state == ATH10K_STATE_WEDGED) {
33 ath10k_warn("wmi flush skipped - device is wedged anyway\n");
34 return;
35 }
36
30 ret = wait_event_timeout(ar->wmi.wq, 37 ret = wait_event_timeout(ar->wmi.wq,
31 atomic_read(&ar->wmi.pending_tx_count) == 0, 38 atomic_read(&ar->wmi.pending_tx_count) == 0,
32 5*HZ); 39 5*HZ);