aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2013-09-16 01:07:00 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-09-26 15:13:49 -0400
commitc6cc47b101c547c328cae06c2d8813a8e69549bf (patch)
treeb377b713ef97cdc9f8ecc1d19080253b95fc7b09
parent8a5b7ab36b46615874da3764b99c9d26c1e6750d (diff)
ath9k: Handle FATAL interrupts correctly
When a FATAL interrupt is received, a full chip reset is required, which is done in the main tasklet. But since the reset routine is scheduled as a work item, make sure that interrupts are not enabled in the tasklet before the reset is done. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index e4f65900132d..cdb3b1e10b95 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -362,6 +362,13 @@ void ath9k_tasklet(unsigned long data)
362 type = RESET_TYPE_BB_WATCHDOG; 362 type = RESET_TYPE_BB_WATCHDOG;
363 363
364 ath9k_queue_reset(sc, type); 364 ath9k_queue_reset(sc, type);
365
366 /*
367 * Increment the ref. counter here so that
368 * interrupts are enabled in the reset routine.
369 */
370 atomic_inc(&ah->intr_ref_cnt);
371 ath_dbg(common, ANY, "FATAL: Skipping interrupts\n");
365 goto out; 372 goto out;
366 } 373 }
367 374
@@ -400,10 +407,9 @@ void ath9k_tasklet(unsigned long data)
400 407
401 ath9k_btcoex_handle_interrupt(sc, status); 408 ath9k_btcoex_handle_interrupt(sc, status);
402 409
403out:
404 /* re-enable hardware interrupt */ 410 /* re-enable hardware interrupt */
405 ath9k_hw_enable_interrupts(ah); 411 ath9k_hw_enable_interrupts(ah);
406 412out:
407 spin_unlock(&sc->sc_pcu_lock); 413 spin_unlock(&sc->sc_pcu_lock);
408 ath9k_ps_restore(sc); 414 ath9k_ps_restore(sc);
409} 415}