summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h38
1 files changed, 28 insertions, 10 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index b03b22c47b1..471f87cab4a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -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,
};
/*
@@ -742,6 +757,11 @@ struct rt2x00_dev {
const struct rt2x00_ops *ops;
/*
+ * Driver data.
+ */
+ void *drv_data;
+
+ /*
* IEEE80211 control structure.
*/
struct ieee80211_hw *hw;
@@ -886,18 +906,11 @@ 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.
*/
u16 aid;
@@ -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).
@@ -979,6 +992,11 @@ struct rt2x00_dev {
struct tasklet_struct autowake_tasklet;
/*
+ * Used for VCO periodic calibration.
+ */
+ int rf_channel;
+
+ /*
* Protect the interrupt mask register.
*/
spinlock_t irqmask_lock;