diff options
author | Vivek Natarajan <vivek.natraj@gmail.com> | 2009-03-02 09:55:14 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-05 14:39:39 -0500 |
commit | 541d8dd5e848aa5f8223a9e8e13b369d64865f07 (patch) | |
tree | 4a1766e8ff056f60889935a98883468ad933a8af /drivers/net/wireless | |
parent | 9331ec8060da5783307a565792ded33bfb9e54fc (diff) |
ath9k: Handle power modes in isr for power save.
Restore network sleep mode in isr if power save is enabled.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath9k/ath9k.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath9k/ath9k.h b/drivers/net/wireless/ath9k/ath9k.h index 6481ea4bbc4e..69292f31d20b 100644 --- a/drivers/net/wireless/ath9k/ath9k.h +++ b/drivers/net/wireless/ath9k/ath9k.h | |||
@@ -677,7 +677,8 @@ static inline void ath9k_ps_wakeup(struct ath_softc *sc) | |||
677 | static inline void ath9k_ps_restore(struct ath_softc *sc) | 677 | static inline void ath9k_ps_restore(struct ath_softc *sc) |
678 | { | 678 | { |
679 | if (atomic_dec_and_test(&sc->ps_usecount)) | 679 | if (atomic_dec_and_test(&sc->ps_usecount)) |
680 | if (sc->hw->conf.flags & IEEE80211_CONF_PS) | 680 | if ((sc->hw->conf.flags & IEEE80211_CONF_PS) && |
681 | !(sc->sc_flags & SC_OP_WAIT_FOR_BEACON)) | ||
681 | ath9k_hw_setpower(sc->sc_ah, | 682 | ath9k_hw_setpower(sc->sc_ah, |
682 | sc->sc_ah->restore_mode); | 683 | sc->sc_ah->restore_mode); |
683 | } | 684 | } |
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 28200ce1d88e..7effa0c40b8a 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -516,6 +516,7 @@ irqreturn_t ath_isr(int irq, void *dev) | |||
516 | return IRQ_NONE; | 516 | return IRQ_NONE; |
517 | 517 | ||
518 | sc->intrstatus = status; | 518 | sc->intrstatus = status; |
519 | ath9k_ps_wakeup(sc); | ||
519 | 520 | ||
520 | if (status & ATH9K_INT_FATAL) { | 521 | if (status & ATH9K_INT_FATAL) { |
521 | /* need a chip reset */ | 522 | /* need a chip reset */ |
@@ -581,6 +582,7 @@ irqreturn_t ath_isr(int irq, void *dev) | |||
581 | sched = true; | 582 | sched = true; |
582 | } | 583 | } |
583 | } | 584 | } |
585 | ath9k_ps_restore(sc); | ||
584 | } while (0); | 586 | } while (0); |
585 | 587 | ||
586 | ath_debug_stat_interrupt(sc, status); | 588 | ath_debug_stat_interrupt(sc, status); |