rfkill: rewrite
[safe/jmp/linux-2.6] / drivers / net / wireless / ath / ath9k / ath9k.h
index 90b6314..515880a 100644 (file)
@@ -460,12 +460,9 @@ struct ath_led {
        bool registered;
 };
 
-/* Rfkill */
-#define ATH_RFKILL_POLL_INTERVAL       2000 /* msecs */
-
 struct ath_rfkill {
        struct rfkill *rfkill;
-       struct delayed_work rfkill_poll;
+       struct rfkill_ops ops;
        char rfkill_name[32];
 };
 
@@ -509,12 +506,14 @@ struct ath_rfkill {
 #define SC_OP_RXFLUSH           BIT(7)
 #define SC_OP_LED_ASSOCIATED    BIT(8)
 #define SC_OP_RFKILL_REGISTERED BIT(9)
-#define SC_OP_RFKILL_SW_BLOCKED BIT(10)
-#define SC_OP_RFKILL_HW_BLOCKED BIT(11)
 #define SC_OP_WAIT_FOR_BEACON   BIT(12)
 #define SC_OP_LED_ON            BIT(13)
 #define SC_OP_SCANNING          BIT(14)
 #define SC_OP_TSF_RESET         BIT(15)
+#define SC_OP_WAIT_FOR_CAB      BIT(16)
+#define SC_OP_WAIT_FOR_PSPOLL_DATA BIT(17)
+#define SC_OP_WAIT_FOR_TX_ACK   BIT(18)
+#define SC_OP_BEACON_SYNC       BIT(19)
 
 struct ath_bus_ops {
        void            (*read_cachesize)(struct ath_softc *sc, int *csz);
@@ -576,8 +575,8 @@ struct ath_softc {
        struct ath_tx tx;
        struct ath_beacon beacon;
        struct ieee80211_rate rates[IEEE80211_NUM_BANDS][ATH_RATE_MAX];
-       struct ath_rate_table *hw_rate_table[ATH9K_MODE_MAX];
-       struct ath_rate_table *cur_rate_table;
+       const struct ath_rate_table *hw_rate_table[ATH9K_MODE_MAX];
+       const struct ath_rate_table *cur_rate_table;
        struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
 
        struct ath_led radio_led;
@@ -599,6 +598,7 @@ struct ath_softc {
        struct ath9k_debug debug;
 #endif
        struct ath_bus_ops *bus_ops;
+       struct ath_beacon_config cur_beacon_conf;
 };
 
 struct ath_wiphy {
@@ -676,7 +676,9 @@ 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) &&
-                   !(sc->sc_flags & SC_OP_WAIT_FOR_BEACON))
+                   !(sc->sc_flags & (SC_OP_WAIT_FOR_BEACON |
+                                     SC_OP_WAIT_FOR_PSPOLL_DATA |
+                                     SC_OP_WAIT_FOR_TX_ACK)))
                        ath9k_hw_setpower(sc->sc_ah,
                                          sc->sc_ah->restore_mode);
 }