]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/rt2x00/rt2x00.h
rt2x00: Release rt2x00 2.1.4
[karo-tx-linux.git] / drivers / net / wireless / rt2x00 / rt2x00.h
index 76270e9c31ffaba73560a68e68b92edaf8a902f2..dfd0af0e0a165fa70ca9e8815a19ffcc128ac0ab 100644 (file)
@@ -44,7 +44,7 @@
 /*
  * Module information.
  */
-#define DRV_VERSION    "2.0.14"
+#define DRV_VERSION    "2.1.4"
 #define DRV_PROJECT    "http://rt2x00.serialmonkey.com"
 
 /*
@@ -384,7 +384,7 @@ struct rt2x00_intf {
         */
        unsigned int delayed_flags;
 #define DELAYED_UPDATE_BEACON          0x00000001
-#define DELAYED_CONFIG_PREAMBLE                0x00000002
+#define DELAYED_CONFIG_ERP             0x00000002
 };
 
 static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif)
@@ -392,30 +392,38 @@ static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif)
        return (struct rt2x00_intf *)vif->drv_priv;
 }
 
-/*
+/**
+ * struct hw_mode_spec: Hardware specifications structure
+ *
  * Details about the supported modes, rates and channels
  * of a particular chipset. This is used by rt2x00lib
  * to build the ieee80211_hw_mode array for mac80211.
+ *
+ * @supported_bands: Bitmask contained the supported bands (2.4GHz, 5.2GHz).
+ * @supported_rates: Rate types which are supported (CCK, OFDM).
+ * @num_channels: Number of supported channels. This is used as array size
+ *     for @tx_power_a, @tx_power_bg and @channels.
+ * channels: Device/chipset specific channel values (See &struct rf_channel).
+ * @tx_power_a: TX power values for all 5.2GHz channels (may be NULL).
+ * @tx_power_bg: TX power values for all 2.4GHz channels (may be NULL).
+ * @tx_power_default: Default TX power value to use when either
+ *     @tx_power_a or @tx_power_bg is missing.
  */
 struct hw_mode_spec {
-       /*
-        * Number of modes, rates and channels.
-        */
-       int num_modes;
-       int num_rates;
-       int num_channels;
+       unsigned int supported_bands;
+#define SUPPORT_BAND_2GHZ      0x00000001
+#define SUPPORT_BAND_5GHZ      0x00000002
+
+       unsigned int supported_rates;
+#define SUPPORT_RATE_CCK       0x00000001
+#define SUPPORT_RATE_OFDM      0x00000002
+
+       unsigned int num_channels;
+       const struct rf_channel *channels;
 
-       /*
-        * txpower values.
-        */
        const u8 *tx_power_a;
        const u8 *tx_power_bg;
        u8 tx_power_default;
-
-       /*
-        * Device/chipset specific value.
-        */
-       const struct rf_channel *channels;
 };
 
 /*
@@ -433,8 +441,8 @@ struct rt2x00lib_conf {
 
        enum ieee80211_band band;
 
-       int basic_rates;
-       int slot_time;
+       u32 basic_rates;
+       u32 slot_time;
 
        short sifs;
        short pifs;
@@ -442,6 +450,16 @@ struct rt2x00lib_conf {
        short eifs;
 };
 
+/*
+ * Configuration structure for erp settings.
+ */
+struct rt2x00lib_erp {
+       int short_preamble;
+
+       int ack_timeout;
+       int ack_consume_time;
+};
+
 /*
  * Configuration structure wrapper around the
  * rt2x00 interface configuration handler.
@@ -487,6 +505,7 @@ struct rt2x00lib_ops {
         */
        int (*probe_hw) (struct rt2x00_dev *rt2x00dev);
        char *(*get_firmware_name) (struct rt2x00_dev *rt2x00dev);
+       u16 (*get_firmware_crc) (void *data, const size_t len);
        int (*load_firmware) (struct rt2x00_dev *rt2x00dev, void *data,
                              const size_t len);
 
@@ -549,10 +568,8 @@ struct rt2x00lib_ops {
 #define CONFIG_UPDATE_MAC              ( 1 << 2 )
 #define CONFIG_UPDATE_BSSID            ( 1 << 3 )
 
-       int (*config_preamble) (struct rt2x00_dev *rt2x00dev,
-                               const int short_preamble,
-                               const int ack_timeout,
-                               const int ack_consume_time);
+       int (*config_erp) (struct rt2x00_dev *rt2x00dev,
+                          struct rt2x00lib_erp *erp);
        void (*config) (struct rt2x00_dev *rt2x00dev,
                        struct rt2x00lib_conf *libconf,
                        const unsigned int flags);
@@ -605,8 +622,6 @@ enum rt2x00_flags {
         */
        DRIVER_SUPPORT_MIXED_INTERFACES,
        DRIVER_REQUIRE_FIRMWARE,
-       DRIVER_REQUIRE_FIRMWARE_CRC_ITU_T,
-       DRIVER_REQUIRE_FIRMWARE_CCITT,
        DRIVER_REQUIRE_BEACON_GUARD,
        DRIVER_REQUIRE_ATIM_QUEUE,
 
@@ -707,11 +722,13 @@ struct rt2x00_dev {
 
        /*
         * Register pointers
-        * csr_addr: Base register address. (PCI)
-        * csr_cache: CSR cache for usb_control_msg. (USB)
+        * csr.base: CSR base register address. (PCI)
+        * csr.cache: CSR cache for usb_control_msg. (USB)
         */
-       void __iomem *csr_addr;
-       void *csr_cache;
+       union csr {
+               void __iomem *base;
+               void *cache;
+       } csr;
 
        /*
         * Mutex to protect register accesses on USB devices.