ath9k: Scrub beacon.c
[pandora-kernel.git] / drivers / net / wireless / ath9k / ath9k.h
index 6481ea4..f74ed7a 100644 (file)
@@ -453,7 +453,7 @@ struct ath_beacon {
        struct list_head bbuf;
 };
 
-void ath9k_beacon_tasklet(unsigned long data);
+void ath_beacon_tasklet(unsigned long data);
 void ath_beacon_config(struct ath_softc *sc, int if_id);
 int ath_beaconq_setup(struct ath_hw *ah);
 int ath_beacon_alloc(struct ath_softc *sc, int if_id);
@@ -559,6 +559,7 @@ struct ath_rfkill {
 #define SC_OP_RFKILL_HW_BLOCKED        BIT(13)
 #define SC_OP_WAIT_FOR_BEACON  BIT(14)
 #define SC_OP_LED_ON           BIT(15)
+#define SC_OP_SCANNING         BIT(16)
 
 struct ath_bus_ops {
        void            (*read_cachesize)(struct ath_softc *sc, int *csz);
@@ -677,8 +678,10 @@ static inline void ath9k_ps_wakeup(struct ath_softc *sc)
 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)
+               if ((sc->hw->conf.flags & IEEE80211_CONF_PS) &&
+                   !(sc->sc_flags & SC_OP_WAIT_FOR_BEACON))
                        ath9k_hw_setpower(sc->sc_ah,
                                          sc->sc_ah->restore_mode);
 }
+
 #endif /* ATH9K_H */