]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/rt2x00/rt2x00.h
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[karo-tx-linux.git] / drivers / net / wireless / rt2x00 / rt2x00.h
index b03b22c47b187753269ed1a69cf1189af4e71dd6..471f87cab4abe53650de055058d3c9d61a2a2ecc 100644 (file)
@@ -38,7 +38,7 @@
 #include <linux/etherdevice.h>
 #include <linux/input-polldev.h>
 #include <linux/kfifo.h>
-#include <linux/timer.h>
+#include <linux/hrtimer.h>
 
 #include <net/mac80211.h>
 
@@ -192,6 +192,7 @@ struct rt2x00_chip {
 #define RT3593         0x3593
 #define RT3883         0x3883  /* WSOC */
 #define RT5390         0x5390  /* 2.4GHz */
+#define RT5392         0x5392  /* 2.4GHz */
 
        u16 rf;
        u16 rev;
@@ -355,6 +356,11 @@ struct link {
         * Work structure for scheduling periodic AGC adjustments.
         */
        struct delayed_work agc_work;
+
+       /*
+        * Work structure for scheduling periodic VCO calibration.
+        */
+       struct delayed_work vco_work;
 };
 
 enum rt2x00_delayed_flags {
@@ -579,6 +585,7 @@ struct rt2x00lib_ops {
        void (*link_tuner) (struct rt2x00_dev *rt2x00dev,
                            struct link_qual *qual, const u32 count);
        void (*gain_calibration) (struct rt2x00_dev *rt2x00dev);
+       void (*vco_calibration) (struct rt2x00_dev *rt2x00dev);
 
        /*
         * Data queue handlers.
@@ -647,6 +654,7 @@ struct rt2x00lib_ops {
  */
 struct rt2x00_ops {
        const char *name;
+       const unsigned int drv_data_size;
        const unsigned int max_sta_intf;
        const unsigned int max_ap_intf;
        const unsigned int eeprom_size;
@@ -684,6 +692,12 @@ enum rt2x00_state_flags {
         */
        CONFIG_CHANNEL_HT40,
        CONFIG_POWERSAVING,
+
+       /*
+        * Mark we currently are sequentially reading TX_STA_FIFO register
+        * FIXME: this is for only rt2800usb, should go to private data
+        */
+       TX_STATUS_READING,
 };
 
 /*
@@ -721,6 +735,7 @@ enum rt2x00_capability_flags {
        CAPABILITY_EXTERNAL_LNA_BG,
        CAPABILITY_DOUBLE_ANTENNA,
        CAPABILITY_BT_COEXIST,
+       CAPABILITY_VCO_RECALIBRATION,
 };
 
 /*
@@ -741,6 +756,11 @@ struct rt2x00_dev {
         */
        const struct rt2x00_ops *ops;
 
+       /*
+        * Driver data.
+        */
+       void *drv_data;
+
        /*
         * IEEE80211 control structure.
         */
@@ -886,17 +906,10 @@ struct rt2x00_dev {
        u8 rssi_offset;
 
        /*
-        * Frequency offset (for rt61pci & rt73usb).
+        * Frequency offset.
         */
        u8 freq_offset;
 
-       /*
-        * Calibration information (for rt2800usb & rt2800pci).
-        * [0] -> BW20
-        * [1] -> BW40
-        */
-       u8 calibration[2];
-
        /*
         * Association id.
         */
@@ -967,7 +980,7 @@ struct rt2x00_dev {
        /*
         * Timer to ensure tx status reports are read (rt2800usb).
         */
-       struct timer_list txstatus_timer;
+       struct hrtimer txstatus_timer;
 
        /*
         * Tasklet for processing tx status reports (rt2800pci).
@@ -978,6 +991,11 @@ struct rt2x00_dev {
        struct tasklet_struct rxdone_tasklet;
        struct tasklet_struct autowake_tasklet;
 
+       /*
+        * Used for VCO periodic calibration.
+        */
+       int rf_channel;
+
        /*
         * Protect the interrupt mask register.
         */