]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wireless/rt2x00/rt2x00.h
Add another Prism2 card to hostap
[linux-2.6-omap-h63xx.git] / drivers / net / wireless / rt2x00 / rt2x00.h
index ba874cff8648178a1058da05975842eea5655bc9..05927b908f80d12ee54b035200509bc687238e9b 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/workqueue.h>
 #include <linux/firmware.h>
 #include <linux/mutex.h>
+#include <linux/etherdevice.h>
 
 #include <net/mac80211.h>
 
@@ -42,7 +43,7 @@
 /*
  * Module information.
  */
-#define DRV_VERSION    "2.0.12"
+#define DRV_VERSION    "2.0.14"
 #define DRV_PROJECT    "http://rt2x00.serialmonkey.com"
 
 /*
@@ -149,6 +150,12 @@ static inline int is_probe_resp(u16 fc)
                ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP));
 }
 
+static inline int is_beacon(u16 fc)
+{
+       return (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
+               ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_BEACON));
+}
+
 /*
  * Chipset identification
  * The chipset on the device is composed of a RT and RF chip.
@@ -365,14 +372,12 @@ struct interface {
         * to us by the 80211 stack, and is used to request
         * new beacons.
         */
-       int id;
+       struct ieee80211_vif *id;
 
        /*
         * Current working type (IEEE80211_IF_TYPE_*).
-        * When set to INVALID_INTERFACE, no interface is configured.
         */
        int type;
-#define INVALID_INTERFACE      IEEE80211_IF_TYPE_INVALID
 
        /*
         * MAC of the device.
@@ -383,11 +388,6 @@ struct interface {
         * BBSID of the AP to associate with.
         */
        u8 bssid[ETH_ALEN];
-
-       /*
-        * Store the packet filter mode for the current interface.
-        */
-       unsigned int filter;
 };
 
 static inline int is_interface_present(struct interface *intf)
@@ -473,6 +473,14 @@ struct rt2x00lib_ops {
        int (*initialize) (struct rt2x00_dev *rt2x00dev);
        void (*uninitialize) (struct rt2x00_dev *rt2x00dev);
 
+       /*
+        * Ring initialization handlers
+        */
+       void (*init_rxentry) (struct rt2x00_dev *rt2x00dev,
+                             struct data_entry *entry);
+       void (*init_txentry) (struct rt2x00_dev *rt2x00dev,
+                             struct data_entry *entry);
+
        /*
         * Radio control handlers.
         */
@@ -488,10 +496,8 @@ struct rt2x00lib_ops {
         * TX control handlers
         */
        void (*write_tx_desc) (struct rt2x00_dev *rt2x00dev,
-                              __le32 *txd,
+                              struct sk_buff *skb,
                               struct txdata_entry_desc *desc,
-                              struct ieee80211_hdr *ieee80211hdr,
-                              unsigned int length,
                               struct ieee80211_tx_control *control);
        int (*write_tx_data) (struct rt2x00_dev *rt2x00dev,
                              struct data_ring *ring, struct sk_buff *skb,
@@ -670,6 +676,13 @@ struct rt2x00_dev {
         */
        struct mutex usb_cache_mutex;
 
+       /*
+        * Current packet filter configuration for the device.
+        * This contains all currently active FIF_* flags send
+        * to us by mac80211 during configure_filter().
+        */
+       unsigned int packet_filter;
+
        /*
         * Interface configuration.
         */
@@ -790,12 +803,6 @@ struct rt2x00_dev {
 #define txringall_for_each(__dev, __entry) \
        ring_loop(__entry, (__dev)->tx, ring_end(__dev))
 
-/*
- * Compute an array index from a pointer to an element and the base pointer.
- */
-#define ARRAY_INDEX(__elem, __base) \
-       ( ((char *)(__elem) - (char *)(__base)) / sizeof(*(__elem)) )
-
 /*
  * Generic RF access.
  * The RF is being accessed by word index.
@@ -922,14 +929,17 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
 void rt2x00mac_remove_interface(struct ieee80211_hw *hw,
                                struct ieee80211_if_init_conf *conf);
 int rt2x00mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf);
-int rt2x00mac_config_interface(struct ieee80211_hw *hw, int if_id,
+int rt2x00mac_config_interface(struct ieee80211_hw *hw,
+                              struct ieee80211_vif *vif,
                               struct ieee80211_if_conf *conf);
 int rt2x00mac_get_stats(struct ieee80211_hw *hw,
                        struct ieee80211_low_level_stats *stats);
 int rt2x00mac_get_tx_stats(struct ieee80211_hw *hw,
                           struct ieee80211_tx_queue_stats *stats);
-void rt2x00mac_erp_ie_changed(struct ieee80211_hw *hw, u8 changes,
-                             int cts_protection, int preamble);
+void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
+                               struct ieee80211_vif *vif,
+                               struct ieee80211_bss_conf *bss_conf,
+                               u32 changes);
 int rt2x00mac_conf_tx(struct ieee80211_hw *hw, int queue,
                      const struct ieee80211_tx_queue_params *params);