wl1251: Prepare for idle mode support
[pandora-wifi.git] / drivers / net / wireless / wl12xx / wl1251.h
index 1e02fce..bdf6a76 100644 (file)
@@ -49,6 +49,7 @@ enum {
        DEBUG_MAC80211  = BIT(11),
        DEBUG_CMD       = BIT(12),
        DEBUG_ACX       = BIT(13),
+       DEBUG_FILTERS   = BIT(14),
        DEBUG_ALL       = ~0,
 };
 
@@ -131,6 +132,11 @@ enum wl1251_partition_type {
        PART_TABLE_LEN
 };
 
+enum wl1251_station_mode {
+       STATION_ACTIVE_MODE,
+       STATION_POWER_SAVE_MODE,
+};
+
 struct wl1251_partition {
        u32 size;
        u32 start;
@@ -310,7 +316,6 @@ struct wl1251 {
        bool tx_queue_stopped;
 
        struct work_struct tx_work;
-       struct work_struct filter_work;
 
        /* Pending TX frames */
        struct sk_buff *tx_frames[16];
@@ -351,6 +356,7 @@ struct wl1251 {
        unsigned int tx_mgmt_frm_rate;
        unsigned int tx_mgmt_frm_mod;
 
+       unsigned int mac80211_filters;
        unsigned int rx_config;
        unsigned int rx_filter;
 
@@ -358,9 +364,9 @@ struct wl1251 {
        bool elp;
 
        struct delayed_work elp_work;
+       struct completion *elp_compl;
 
-       /* we can be in psm, but not in elp, we have to differentiate */
-       bool psm;
+       enum wl1251_station_mode station_mode;
 
        /* PSM mode requested */
        bool psm_requested;
@@ -393,6 +399,7 @@ int wl1251_free_hw(struct wl1251 *wl);
 int wl1251_init_ieee80211(struct wl1251 *wl);
 void wl1251_enable_interrupts(struct wl1251 *wl);
 void wl1251_disable_interrupts(struct wl1251 *wl);
+void wl1251_irq(struct wl1251 *wl);
 
 #define DEFAULT_HW_GEN_MODULATION_TYPE    CCK_LONG /* Long Preamble */
 #define DEFAULT_HW_GEN_TX_RATE          RATE_2MBPS
@@ -408,6 +415,8 @@ void wl1251_disable_interrupts(struct wl1251 *wl);
 
 #define WL1251_DEFAULT_CHANNEL 0
 
+#define WL1251_DEFAULT_BET_CONSECUTIVE 10
+
 #define CHIP_ID_1251_PG10                 (0x7010101)
 #define CHIP_ID_1251_PG11                 (0x7020101)
 #define CHIP_ID_1251_PG12                 (0x7030101)