Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / drivers / net / wireless / rt2x00 / rt2x00.h
index 49c9e2c..99e8959 100644 (file)
                                  GET_DURATION(IEEE80211_HEADER + ACK_SIZE, 10) )
 
 /*
+ * Structure for average calculation
+ * The avg field contains the actual average value,
+ * but avg_weight is internally used during calculations
+ * to prevent rounding errors.
+ */
+struct avg_val {
+       int avg;
+       int avg_weight;
+};
+
+/*
  * Chipset identification
  * The chipset on the device is composed of a RT and RF chip.
  * The chipset combination is important for determining device capabilities.
@@ -245,21 +256,18 @@ struct link_ant {
        struct antenna_setup active;
 
        /*
-        * RSSI information for the different antenna's.
-        * These statistics are used to determine when
-        * to switch antenna when using software diversity.
-        *
-        *        rssi[0] -> Antenna A RSSI
-        *        rssi[1] -> Antenna B RSSI
+        * RSSI history information for the antenna.
+        * Used to determine when to switch antenna
+        * when using software diversity.
         */
-       int rssi_history[2];
+       int rssi_history;
 
        /*
         * Current RSSI average of the currently active antenna.
         * Similar to the avg_rssi in the link_qual structure
         * this value is updated by using the walking average.
         */
-       int rssi_ant;
+       struct avg_val rssi_ant;
 };
 
 /*
@@ -288,7 +296,7 @@ struct link {
        /*
         * Currently active average RSSI value
         */
-       int avg_rssi;
+       struct avg_val avg_rssi;
 
        /*
         * Currently precalculated percentages of successful
@@ -326,6 +334,11 @@ struct rt2x00_intf {
        u8 bssid[ETH_ALEN];
 
        /*
+        * beacon->skb must be protected with the mutex.
+        */
+       struct mutex beacon_skb_mutex;
+
+       /*
         * Entry in the beacon queue which belongs to
         * this interface. Each interface has its own
         * dedicated beacon entry.
@@ -594,7 +607,6 @@ enum rt2x00_flags {
        DEVICE_STATE_INITIALIZED,
        DEVICE_STATE_STARTED,
        DEVICE_STATE_ENABLED_RADIO,
-       DEVICE_STATE_DISABLED_RADIO_HW,
 
        /*
         * Driver requirements
@@ -612,6 +624,8 @@ enum rt2x00_flags {
         */
        CONFIG_SUPPORT_HW_BUTTON,
        CONFIG_SUPPORT_HW_CRYPTO,
+       DRIVER_SUPPORT_CONTROL_FILTERS,
+       DRIVER_SUPPORT_CONTROL_FILTER_PSPOLL,
 
        /*
         * Driver configuration
@@ -634,7 +648,7 @@ struct rt2x00_dev {
         * The structure stored in here depends on the
         * system bus (PCI or USB).
         * When accessing this variable, the rt2x00dev_{pci,usb}
-        * macro's should be used for correct typecasting.
+        * macros should be used for correct typecasting.
         */
        struct device *dev;
 
@@ -651,18 +665,6 @@ struct rt2x00_dev {
        enum ieee80211_band curr_band;
 
        /*
-        * rfkill structure for RF state switching support.
-        * This will only be compiled in when required.
-        */
-#ifdef CONFIG_RT2X00_LIB_RFKILL
-       unsigned long rfkill_state;
-#define RFKILL_STATE_ALLOCATED         1
-#define RFKILL_STATE_REGISTERED                2
-#define RFKILL_STATE_BLOCKED           3
-       struct input_polled_dev *rfkill_poll_dev;
-#endif /* CONFIG_RT2X00_LIB_RFKILL */
-
-       /*
         * If enabled, the debugfs interface structures
         * required for deregistration of debugfs.
         */
@@ -977,6 +979,8 @@ void rt2x00mac_configure_filter(struct ieee80211_hw *hw,
                                unsigned int changed_flags,
                                unsigned int *total_flags,
                                int mc_count, struct dev_addr_list *mc_list);
+int rt2x00mac_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
+                     bool set);
 #ifdef CONFIG_RT2X00_LIB_CRYPTO
 int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
                      struct ieee80211_vif *vif, struct ieee80211_sta *sta,
@@ -994,6 +998,7 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
                                u32 changes);
 int rt2x00mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
                      const struct ieee80211_tx_queue_params *params);
+void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw);
 
 /*
  * Driver allocation handlers.