]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/ath/ath9k/main.c
ath9k: Add support for Adaptive Power Management
[karo-tx-linux.git] / drivers / net / wireless / ath / ath9k / main.c
index 50bdb5db23b4e1292fe20d55072353105a72fcda..df1bfcfeb7343b327bbf4a543281ee745440972e 100644 (file)
@@ -554,9 +554,12 @@ void ath_update_chainmask(struct ath_softc *sc, int is_ht)
 static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta)
 {
        struct ath_node *an;
-
+       struct ath_hw *ah = sc->sc_ah;
        an = (struct ath_node *)sta->drv_priv;
 
+       if ((ah->caps.hw_caps) & ATH9K_HW_CAP_APM)
+               sc->sc_flags |= SC_OP_ENABLE_APM;
+
        if (sc->sc_flags & SC_OP_TXAGGR) {
                ath_tx_node_init(sc, an);
                an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +