]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath9k: wake hardware for interface IBSS/AP/Mesh removal
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Thu, 24 Dec 2009 01:03:28 +0000 (20:03 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 28 Dec 2009 21:20:01 +0000 (16:20 -0500)
When we remove a IBSS/AP/Mesh interface we stop DMA
but to do this we should ensure hardware is on. Awaken
the device prior to these calls. This should ensure
DMA is stopped upon suspend and plain device removal.

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/main.c

index 2ec7451350f0c8b71d3bc1d1a91171bd066e64c4..623ade8960c54afe7615756b671f02f7482f5235 100644 (file)
@@ -2653,8 +2653,10 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
        if ((sc->sc_ah->opmode == NL80211_IFTYPE_AP) ||
            (sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC) ||
            (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) {
+               ath9k_ps_wakeup(sc);
                ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq);
                ath_beacon_return(sc, avp);
+               ath9k_ps_restore(sc);
        }
 
        sc->sc_flags &= ~SC_OP_BEACONS;