Commit 541d8dd5 authored by Vivek Natarajan's avatar Vivek Natarajan Committed by John W. Linville

ath9k: Handle power modes in isr for power save.

Restore network sleep mode in isr if power save is enabled.
Signed-off-by: default avatarVivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9331ec80
...@@ -677,7 +677,8 @@ static inline void ath9k_ps_wakeup(struct ath_softc *sc) ...@@ -677,7 +677,8 @@ static inline void ath9k_ps_wakeup(struct ath_softc *sc)
static inline void ath9k_ps_restore(struct ath_softc *sc) static inline void ath9k_ps_restore(struct ath_softc *sc)
{ {
if (atomic_dec_and_test(&sc->ps_usecount)) if (atomic_dec_and_test(&sc->ps_usecount))
if (sc->hw->conf.flags & IEEE80211_CONF_PS) if ((sc->hw->conf.flags & IEEE80211_CONF_PS) &&
!(sc->sc_flags & SC_OP_WAIT_FOR_BEACON))
ath9k_hw_setpower(sc->sc_ah, ath9k_hw_setpower(sc->sc_ah,
sc->sc_ah->restore_mode); sc->sc_ah->restore_mode);
} }
......
...@@ -516,6 +516,7 @@ irqreturn_t ath_isr(int irq, void *dev) ...@@ -516,6 +516,7 @@ irqreturn_t ath_isr(int irq, void *dev)
return IRQ_NONE; return IRQ_NONE;
sc->intrstatus = status; sc->intrstatus = status;
ath9k_ps_wakeup(sc);
if (status & ATH9K_INT_FATAL) { if (status & ATH9K_INT_FATAL) {
/* need a chip reset */ /* need a chip reset */
...@@ -581,6 +582,7 @@ irqreturn_t ath_isr(int irq, void *dev) ...@@ -581,6 +582,7 @@ irqreturn_t ath_isr(int irq, void *dev)
sched = true; sched = true;
} }
} }
ath9k_ps_restore(sc);
} while (0); } while (0);
ath_debug_stat_interrupt(sc, status); ath_debug_stat_interrupt(sc, status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment