wl1251: Fix memory leak in data path command handling
[pandora-wifi.git] / drivers / net / wireless / wl12xx / wl1251.h
index d8087ac..85e4640 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,
 };
 
@@ -274,6 +275,8 @@ struct wl1251 {
        int irq;
        bool use_eeprom;
 
+       spinlock_t wl_lock;
+
        enum wl1251_state state;
        struct mutex mutex;
 
@@ -308,7 +311,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];
@@ -349,6 +351,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;
 
@@ -356,6 +359,7 @@ 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;
@@ -381,8 +385,6 @@ struct wl1251 {
 
        u32 chip_id;
        char fw_ver[21];
-
-       bool associated;
 };
 
 int wl1251_plt_start(struct wl1251 *wl);
@@ -393,6 +395,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
@@ -400,13 +403,16 @@ void wl1251_disable_interrupts(struct wl1251 *wl);
 
 #define WL1251_DEFAULT_POWER_LEVEL 20
 
-#define WL1251_TX_QUEUE_MAX_LENGTH 20
+#define WL1251_TX_QUEUE_LOW_WATERMARK  10
+#define WL1251_TX_QUEUE_HIGH_WATERMARK 25
 
 #define WL1251_DEFAULT_BEACON_INT 100
 #define WL1251_DEFAULT_DTIM_PERIOD 1
 
 #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)
@@ -416,7 +422,7 @@ void wl1251_disable_interrupts(struct wl1251 *wl);
 #define WL1251_FW_NAME "wl1251-fw.bin"
 #define WL1251_NVS_NAME "wl1251-nvs.bin"
 
-#define WL1251_POWER_ON_SLEEP 10 /* in miliseconds */
+#define WL1251_POWER_ON_SLEEP 10 /* in milliseconds */
 
 #define WL1251_PART_DOWN_MEM_START     0x0
 #define WL1251_PART_DOWN_MEM_SIZE      0x16800