ath9k: Wake up for TX in mac80211 timeout=0 sleep mode
When using timeout=0 (PS-Poll) with mac80211, the driver will need to wake up for TX requests and remain awake until the TX has been completed (ACK received or timeout) or until the buffer frame(s) have been received (in case the TX is for a PS-Poll frame). Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
cce4c77b87
commit
9a23f9ca50
@@ -516,6 +516,8 @@ struct ath_rfkill {
|
||||
#define SC_OP_SCANNING BIT(14)
|
||||
#define SC_OP_TSF_RESET BIT(15)
|
||||
#define SC_OP_WAIT_FOR_CAB BIT(16)
|
||||
#define SC_OP_WAIT_FOR_PSPOLL_DATA BIT(17)
|
||||
#define SC_OP_WAIT_FOR_TX_ACK BIT(18)
|
||||
|
||||
struct ath_bus_ops {
|
||||
void (*read_cachesize)(struct ath_softc *sc, int *csz);
|
||||
@@ -678,7 +680,9 @@ static inline void ath9k_ps_restore(struct ath_softc *sc)
|
||||
{
|
||||
if (atomic_dec_and_test(&sc->ps_usecount))
|
||||
if ((sc->hw->conf.flags & IEEE80211_CONF_PS) &&
|
||||
!(sc->sc_flags & SC_OP_WAIT_FOR_BEACON))
|
||||
!(sc->sc_flags & (SC_OP_WAIT_FOR_BEACON |
|
||||
SC_OP_WAIT_FOR_PSPOLL_DATA |
|
||||
SC_OP_WAIT_FOR_TX_ACK)))
|
||||
ath9k_hw_setpower(sc->sc_ah,
|
||||
sc->sc_ah->restore_mode);
|
||||
}
|
||||
|
Reference in New Issue
Block a user