]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ath9k: fix beacon restart on channel change
authorRajkumar Manoharan <rmanoharan@atheros.com>
Thu, 30 Dec 2010 13:37:44 +0000 (19:07 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 22:46:53 +0000 (14:46 -0800)
commit 1186488b4a4d4871e40cb1604ba3ede3d4b7cc90 upstream.

Restart the beacon timers only if the beacon
was already configured. Otherwise beacons timers
are restarted unnecessarily in unassociated state too.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath9k/main.c

index 38616df92ec7081895f4b3b3157c1b100d31867d..9790d3a865352e84e0f96d216bd9c49975fae524 100644 (file)
@@ -258,7 +258,8 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
        ath9k_hw_set_interrupts(ah, ah->imask);
 
        if (!(sc->sc_flags & (SC_OP_OFFCHANNEL))) {
-               ath_beacon_config(sc, NULL);
+               if (sc->sc_flags & SC_OP_BEACONS)
+                       ath_beacon_config(sc, NULL);
                ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0);
                ath_start_ani(common);
        }