diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 1caaf922ba9c..6049d8b82855 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -363,6 +363,7 @@ void ath9k_tasklet(unsigned long data) | |||
363 | struct ath_softc *sc = (struct ath_softc *)data; | 363 | struct ath_softc *sc = (struct ath_softc *)data; |
364 | struct ath_hw *ah = sc->sc_ah; | 364 | struct ath_hw *ah = sc->sc_ah; |
365 | struct ath_common *common = ath9k_hw_common(ah); | 365 | struct ath_common *common = ath9k_hw_common(ah); |
366 | enum ath_reset_type type; | ||
366 | unsigned long flags; | 367 | unsigned long flags; |
367 | u32 status = sc->intrstatus; | 368 | u32 status = sc->intrstatus; |
368 | u32 rxmask; | 369 | u32 rxmask; |
@@ -372,18 +373,13 @@ void ath9k_tasklet(unsigned long data) | |||
372 | 373 | ||
373 | if ((status & ATH9K_INT_FATAL) || | 374 | if ((status & ATH9K_INT_FATAL) || |
374 | (status & ATH9K_INT_BB_WATCHDOG)) { | 375 | (status & ATH9K_INT_BB_WATCHDOG)) { |
375 | #ifdef CONFIG_ATH9K_DEBUGFS | ||
376 | enum ath_reset_type type; | ||
377 | 376 | ||
378 | if (status & ATH9K_INT_FATAL) | 377 | if (status & ATH9K_INT_FATAL) |
379 | type = RESET_TYPE_FATAL_INT; | 378 | type = RESET_TYPE_FATAL_INT; |
380 | else | 379 | else |
381 | type = RESET_TYPE_BB_WATCHDOG; | 380 | type = RESET_TYPE_BB_WATCHDOG; |
382 | 381 | ||
383 | RESET_STAT_INC(sc, type); | 382 | ath9k_queue_reset(sc, type); |
384 | #endif | ||
385 | set_bit(SC_OP_HW_RESET, &sc->sc_flags); | ||
386 | ieee80211_queue_work(sc->hw, &sc->hw_reset_work); | ||
387 | goto out; | 383 | goto out; |
388 | } | 384 | } |
389 | 385 | ||
@@ -584,6 +580,15 @@ static int ath_reset(struct ath_softc *sc, bool retry_tx) | |||
584 | return r; | 580 | return r; |
585 | } | 581 | } |
586 | 582 | ||
583 | void ath9k_queue_reset(struct ath_softc *sc, enum ath_reset_type type) | ||
584 | { | ||
585 | #ifdef CONFIG_ATH9K_DEBUGFS | ||
586 | RESET_STAT_INC(sc, type); | ||
587 | #endif | ||
588 | set_bit(SC_OP_HW_RESET, &sc->sc_flags); | ||
589 | ieee80211_queue_work(sc->hw, &sc->hw_reset_work); | ||
590 | } | ||
591 | |||
587 | void ath_reset_work(struct work_struct *work) | 592 | void ath_reset_work(struct work_struct *work) |
588 | { | 593 | { |
589 | struct ath_softc *sc = container_of(work, struct ath_softc, hw_reset_work); | 594 | struct ath_softc *sc = container_of(work, struct ath_softc, hw_reset_work); |