diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 5de648c243bf..c8d123957188 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -118,15 +118,13 @@ void ath9k_ps_restore(struct ath_softc *sc) | |||
118 | if (--sc->ps_usecount != 0) | 118 | if (--sc->ps_usecount != 0) |
119 | goto unlock; | 119 | goto unlock; |
120 | 120 | ||
121 | if (sc->ps_flags & PS_WAIT_FOR_TX_ACK) | 121 | if (sc->ps_idle && (sc->ps_flags & PS_WAIT_FOR_TX_ACK)) |
122 | goto unlock; | ||
123 | |||
124 | if (sc->ps_idle) | ||
125 | mode = ATH9K_PM_FULL_SLEEP; | 122 | mode = ATH9K_PM_FULL_SLEEP; |
126 | else if (sc->ps_enabled && | 123 | else if (sc->ps_enabled && |
127 | !(sc->ps_flags & (PS_WAIT_FOR_BEACON | | 124 | !(sc->ps_flags & (PS_WAIT_FOR_BEACON | |
128 | PS_WAIT_FOR_CAB | | 125 | PS_WAIT_FOR_CAB | |
129 | PS_WAIT_FOR_PSPOLL_DATA))) | 126 | PS_WAIT_FOR_PSPOLL_DATA | |
127 | PS_WAIT_FOR_TX_ACK))) | ||
130 | mode = ATH9K_PM_NETWORK_SLEEP; | 128 | mode = ATH9K_PM_NETWORK_SLEEP; |
131 | else | 129 | else |
132 | goto unlock; | 130 | goto unlock; |
@@ -642,7 +640,7 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta, | |||
642 | an->sta = sta; | 640 | an->sta = sta; |
643 | an->vif = vif; | 641 | an->vif = vif; |
644 | 642 | ||
645 | if (sta->ht_cap.ht_supported) { | 643 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) { |
646 | ath_tx_node_init(sc, an); | 644 | ath_tx_node_init(sc, an); |
647 | an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + | 645 | an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + |
648 | sta->ht_cap.ampdu_factor); | 646 | sta->ht_cap.ampdu_factor); |
@@ -661,7 +659,7 @@ static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta) | |||
661 | an->sta = NULL; | 659 | an->sta = NULL; |
662 | #endif | 660 | #endif |
663 | 661 | ||
664 | if (sta->ht_cap.ht_supported) | 662 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) |
665 | ath_tx_node_cleanup(sc, an); | 663 | ath_tx_node_cleanup(sc, an); |
666 | } | 664 | } |
667 | 665 | ||