diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 943 |
1 files changed, 567 insertions, 376 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 5a2dfe87c6b6..ba82c972703a 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -1,5 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | Copyright (C) 2009 Ivo van Doorn <IvDoorn@gmail.com> | 2 | Copyright (C) 2010 Willow Garage <http://www.willowgarage.com> |
3 | Copyright (C) 2009 - 2010 Ivo van Doorn <IvDoorn@gmail.com> | ||
3 | Copyright (C) 2009 Mattias Nissler <mattias.nissler@gmx.de> | 4 | Copyright (C) 2009 Mattias Nissler <mattias.nissler@gmx.de> |
4 | Copyright (C) 2009 Felix Fietkau <nbd@openwrt.org> | 5 | Copyright (C) 2009 Felix Fietkau <nbd@openwrt.org> |
5 | Copyright (C) 2009 Xose Vazquez Perez <xose.vazquez@gmail.com> | 6 | Copyright (C) 2009 Xose Vazquez Perez <xose.vazquez@gmail.com> |
@@ -44,11 +45,117 @@ | |||
44 | /* | 45 | /* |
45 | * Allow hardware encryption to be disabled. | 46 | * Allow hardware encryption to be disabled. |
46 | */ | 47 | */ |
47 | static int modparam_nohwcrypt = 0; | 48 | static int modparam_nohwcrypt; |
48 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); | 49 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); |
49 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); | 50 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); |
50 | 51 | ||
51 | /* | 52 | /* |
53 | * Queue handlers. | ||
54 | */ | ||
55 | static void rt2800usb_start_queue(struct data_queue *queue) | ||
56 | { | ||
57 | struct rt2x00_dev *rt2x00dev = queue->rt2x00dev; | ||
58 | u32 reg; | ||
59 | |||
60 | switch (queue->qid) { | ||
61 | case QID_RX: | ||
62 | rt2x00usb_register_read(rt2x00dev, MAC_SYS_CTRL, ®); | ||
63 | rt2x00_set_field32(®, MAC_SYS_CTRL_ENABLE_RX, 1); | ||
64 | rt2x00usb_register_write(rt2x00dev, MAC_SYS_CTRL, reg); | ||
65 | break; | ||
66 | case QID_BEACON: | ||
67 | rt2x00usb_register_read(rt2x00dev, BCN_TIME_CFG, ®); | ||
68 | rt2x00_set_field32(®, BCN_TIME_CFG_TSF_TICKING, 1); | ||
69 | rt2x00_set_field32(®, BCN_TIME_CFG_TBTT_ENABLE, 1); | ||
70 | rt2x00_set_field32(®, BCN_TIME_CFG_BEACON_GEN, 1); | ||
71 | rt2x00usb_register_write(rt2x00dev, BCN_TIME_CFG, reg); | ||
72 | break; | ||
73 | default: | ||
74 | break; | ||
75 | } | ||
76 | } | ||
77 | |||
78 | static void rt2800usb_stop_queue(struct data_queue *queue) | ||
79 | { | ||
80 | struct rt2x00_dev *rt2x00dev = queue->rt2x00dev; | ||
81 | u32 reg; | ||
82 | |||
83 | switch (queue->qid) { | ||
84 | case QID_RX: | ||
85 | rt2x00usb_register_read(rt2x00dev, MAC_SYS_CTRL, ®); | ||
86 | rt2x00_set_field32(®, MAC_SYS_CTRL_ENABLE_RX, 0); | ||
87 | rt2x00usb_register_write(rt2x00dev, MAC_SYS_CTRL, reg); | ||
88 | break; | ||
89 | case QID_BEACON: | ||
90 | rt2x00usb_register_read(rt2x00dev, BCN_TIME_CFG, ®); | ||
91 | rt2x00_set_field32(®, BCN_TIME_CFG_TSF_TICKING, 0); | ||
92 | rt2x00_set_field32(®, BCN_TIME_CFG_TBTT_ENABLE, 0); | ||
93 | rt2x00_set_field32(®, BCN_TIME_CFG_BEACON_GEN, 0); | ||
94 | rt2x00usb_register_write(rt2x00dev, BCN_TIME_CFG, reg); | ||
95 | break; | ||
96 | default: | ||
97 | break; | ||
98 | } | ||
99 | } | ||
100 | |||
101 | /* | ||
102 | * test if there is an entry in any TX queue for which DMA is done | ||
103 | * but the TX status has not been returned yet | ||
104 | */ | ||
105 | static bool rt2800usb_txstatus_pending(struct rt2x00_dev *rt2x00dev) | ||
106 | { | ||
107 | struct data_queue *queue; | ||
108 | |||
109 | tx_queue_for_each(rt2x00dev, queue) { | ||
110 | if (rt2x00queue_get_entry(queue, Q_INDEX_DMA_DONE) != | ||
111 | rt2x00queue_get_entry(queue, Q_INDEX_DONE)) | ||
112 | return true; | ||
113 | } | ||
114 | return false; | ||
115 | } | ||
116 | |||
117 | static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev, | ||
118 | int urb_status, u32 tx_status) | ||
119 | { | ||
120 | if (urb_status) { | ||
121 | WARNING(rt2x00dev, "rt2x00usb_register_read_async failed: %d\n", urb_status); | ||
122 | return false; | ||
123 | } | ||
124 | |||
125 | /* try to read all TX_STA_FIFO entries before scheduling txdone_work */ | ||
126 | if (rt2x00_get_field32(tx_status, TX_STA_FIFO_VALID)) { | ||
127 | if (!kfifo_put(&rt2x00dev->txstatus_fifo, &tx_status)) { | ||
128 | WARNING(rt2x00dev, "TX status FIFO overrun, " | ||
129 | "drop tx status report.\n"); | ||
130 | queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work); | ||
131 | } else | ||
132 | return true; | ||
133 | } else if (!kfifo_is_empty(&rt2x00dev->txstatus_fifo)) { | ||
134 | queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work); | ||
135 | } else if (rt2800usb_txstatus_pending(rt2x00dev)) { | ||
136 | mod_timer(&rt2x00dev->txstatus_timer, jiffies + msecs_to_jiffies(2)); | ||
137 | } | ||
138 | |||
139 | return false; | ||
140 | } | ||
141 | |||
142 | static void rt2800usb_tx_dma_done(struct queue_entry *entry) | ||
143 | { | ||
144 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | ||
145 | |||
146 | rt2x00usb_register_read_async(rt2x00dev, TX_STA_FIFO, | ||
147 | rt2800usb_tx_sta_fifo_read_completed); | ||
148 | } | ||
149 | |||
150 | static void rt2800usb_tx_sta_fifo_timeout(unsigned long data) | ||
151 | { | ||
152 | struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; | ||
153 | |||
154 | rt2x00usb_register_read_async(rt2x00dev, TX_STA_FIFO, | ||
155 | rt2800usb_tx_sta_fifo_read_completed); | ||
156 | } | ||
157 | |||
158 | /* | ||
52 | * Firmware functions | 159 | * Firmware functions |
53 | */ | 160 | */ |
54 | static char *rt2800usb_get_firmware_name(struct rt2x00_dev *rt2x00dev) | 161 | static char *rt2800usb_get_firmware_name(struct rt2x00_dev *rt2x00dev) |
@@ -79,11 +186,11 @@ static int rt2800usb_write_firmware(struct rt2x00_dev *rt2x00dev, | |||
79 | /* | 186 | /* |
80 | * Write firmware to device. | 187 | * Write firmware to device. |
81 | */ | 188 | */ |
82 | rt2800_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE, | 189 | rt2x00usb_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE, |
83 | data + offset, length); | 190 | data + offset, length); |
84 | 191 | ||
85 | rt2800_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0); | 192 | rt2x00usb_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0); |
86 | rt2800_register_write(rt2x00dev, H2M_MAILBOX_STATUS, ~0); | 193 | rt2x00usb_register_write(rt2x00dev, H2M_MAILBOX_STATUS, ~0); |
87 | 194 | ||
88 | /* | 195 | /* |
89 | * Send firmware request to device to load firmware, | 196 | * Send firmware request to device to load firmware, |
@@ -98,20 +205,7 @@ static int rt2800usb_write_firmware(struct rt2x00_dev *rt2x00dev, | |||
98 | } | 205 | } |
99 | 206 | ||
100 | msleep(10); | 207 | msleep(10); |
101 | rt2800_register_write(rt2x00dev, H2M_MAILBOX_CSR, 0); | 208 | rt2x00usb_register_write(rt2x00dev, H2M_MAILBOX_CSR, 0); |
102 | |||
103 | /* | ||
104 | * Send signal to firmware during boot time. | ||
105 | */ | ||
106 | rt2800_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0, 0, 0); | ||
107 | |||
108 | if (rt2x00_rt(rt2x00dev, RT3070) || | ||
109 | rt2x00_rt(rt2x00dev, RT3071) || | ||
110 | rt2x00_rt(rt2x00dev, RT3572)) { | ||
111 | udelay(200); | ||
112 | rt2800_mcu_request(rt2x00dev, MCU_CURRENT, 0, 0, 0); | ||
113 | udelay(10); | ||
114 | } | ||
115 | 209 | ||
116 | return 0; | 210 | return 0; |
117 | } | 211 | } |
@@ -119,52 +213,32 @@ static int rt2800usb_write_firmware(struct rt2x00_dev *rt2x00dev, | |||
119 | /* | 213 | /* |
120 | * Device state switch handlers. | 214 | * Device state switch handlers. |
121 | */ | 215 | */ |
122 | static void rt2800usb_toggle_rx(struct rt2x00_dev *rt2x00dev, | ||
123 | enum dev_state state) | ||
124 | { | ||
125 | u32 reg; | ||
126 | |||
127 | rt2800_register_read(rt2x00dev, MAC_SYS_CTRL, ®); | ||
128 | rt2x00_set_field32(®, MAC_SYS_CTRL_ENABLE_RX, | ||
129 | (state == STATE_RADIO_RX_ON) || | ||
130 | (state == STATE_RADIO_RX_ON_LINK)); | ||
131 | rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, reg); | ||
132 | } | ||
133 | |||
134 | static int rt2800usb_init_registers(struct rt2x00_dev *rt2x00dev) | 216 | static int rt2800usb_init_registers(struct rt2x00_dev *rt2x00dev) |
135 | { | 217 | { |
136 | u32 reg; | 218 | u32 reg; |
137 | int i; | ||
138 | 219 | ||
139 | /* | 220 | /* |
140 | * Wait until BBP and RF are ready. | 221 | * Wait until BBP and RF are ready. |
141 | */ | 222 | */ |
142 | for (i = 0; i < REGISTER_BUSY_COUNT; i++) { | 223 | if (rt2800_wait_csr_ready(rt2x00dev)) |
143 | rt2800_register_read(rt2x00dev, MAC_CSR0, ®); | ||
144 | if (reg && reg != ~0) | ||
145 | break; | ||
146 | msleep(1); | ||
147 | } | ||
148 | |||
149 | if (i == REGISTER_BUSY_COUNT) { | ||
150 | ERROR(rt2x00dev, "Unstable hardware.\n"); | ||
151 | return -EBUSY; | 224 | return -EBUSY; |
152 | } | ||
153 | 225 | ||
154 | rt2800_register_read(rt2x00dev, PBF_SYS_CTRL, ®); | 226 | rt2x00usb_register_read(rt2x00dev, PBF_SYS_CTRL, ®); |
155 | rt2800_register_write(rt2x00dev, PBF_SYS_CTRL, reg & ~0x00002000); | 227 | rt2x00usb_register_write(rt2x00dev, PBF_SYS_CTRL, reg & ~0x00002000); |
228 | |||
229 | rt2x00usb_register_write(rt2x00dev, PWR_PIN_CFG, 0x00000003); | ||
156 | 230 | ||
157 | rt2800_register_read(rt2x00dev, MAC_SYS_CTRL, ®); | 231 | rt2x00usb_register_read(rt2x00dev, MAC_SYS_CTRL, ®); |
158 | rt2x00_set_field32(®, MAC_SYS_CTRL_RESET_CSR, 1); | 232 | rt2x00_set_field32(®, MAC_SYS_CTRL_RESET_CSR, 1); |
159 | rt2x00_set_field32(®, MAC_SYS_CTRL_RESET_BBP, 1); | 233 | rt2x00_set_field32(®, MAC_SYS_CTRL_RESET_BBP, 1); |
160 | rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, reg); | 234 | rt2x00usb_register_write(rt2x00dev, MAC_SYS_CTRL, reg); |
161 | 235 | ||
162 | rt2800_register_write(rt2x00dev, USB_DMA_CFG, 0x00000000); | 236 | rt2x00usb_register_write(rt2x00dev, USB_DMA_CFG, 0x00000000); |
163 | 237 | ||
164 | rt2x00usb_vendor_request_sw(rt2x00dev, USB_DEVICE_MODE, 0, | 238 | rt2x00usb_vendor_request_sw(rt2x00dev, USB_DEVICE_MODE, 0, |
165 | USB_MODE_RESET, REGISTER_TIMEOUT); | 239 | USB_MODE_RESET, REGISTER_TIMEOUT); |
166 | 240 | ||
167 | rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, 0x00000000); | 241 | rt2x00usb_register_write(rt2x00dev, MAC_SYS_CTRL, 0x00000000); |
168 | 242 | ||
169 | return 0; | 243 | return 0; |
170 | } | 244 | } |
@@ -172,31 +246,11 @@ static int rt2800usb_init_registers(struct rt2x00_dev *rt2x00dev) | |||
172 | static int rt2800usb_enable_radio(struct rt2x00_dev *rt2x00dev) | 246 | static int rt2800usb_enable_radio(struct rt2x00_dev *rt2x00dev) |
173 | { | 247 | { |
174 | u32 reg; | 248 | u32 reg; |
175 | u16 word; | ||
176 | 249 | ||
177 | /* | 250 | if (unlikely(rt2800_wait_wpdma_ready(rt2x00dev))) |
178 | * Initialize all registers. | ||
179 | */ | ||
180 | if (unlikely(rt2800_wait_wpdma_ready(rt2x00dev) || | ||
181 | rt2800_init_registers(rt2x00dev) || | ||
182 | rt2800_init_bbp(rt2x00dev) || | ||
183 | rt2800_init_rfcsr(rt2x00dev))) | ||
184 | return -EIO; | 251 | return -EIO; |
185 | 252 | ||
186 | rt2800_register_read(rt2x00dev, MAC_SYS_CTRL, ®); | 253 | rt2x00usb_register_read(rt2x00dev, USB_DMA_CFG, ®); |
187 | rt2x00_set_field32(®, MAC_SYS_CTRL_ENABLE_TX, 1); | ||
188 | rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, reg); | ||
189 | |||
190 | udelay(50); | ||
191 | |||
192 | rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, ®); | ||
193 | rt2x00_set_field32(®, WPDMA_GLO_CFG_TX_WRITEBACK_DONE, 1); | ||
194 | rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_RX_DMA, 1); | ||
195 | rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_TX_DMA, 1); | ||
196 | rt2800_register_write(rt2x00dev, WPDMA_GLO_CFG, reg); | ||
197 | |||
198 | |||
199 | rt2800_register_read(rt2x00dev, USB_DMA_CFG, ®); | ||
200 | rt2x00_set_field32(®, USB_DMA_CFG_PHY_CLEAR, 0); | 254 | rt2x00_set_field32(®, USB_DMA_CFG_PHY_CLEAR, 0); |
201 | rt2x00_set_field32(®, USB_DMA_CFG_RX_BULK_AGG_EN, 0); | 255 | rt2x00_set_field32(®, USB_DMA_CFG_RX_BULK_AGG_EN, 0); |
202 | rt2x00_set_field32(®, USB_DMA_CFG_RX_BULK_AGG_TIMEOUT, 128); | 256 | rt2x00_set_field32(®, USB_DMA_CFG_RX_BULK_AGG_TIMEOUT, 128); |
@@ -205,50 +259,18 @@ static int rt2800usb_enable_radio(struct rt2x00_dev *rt2x00dev) | |||
205 | * this limit so reduce the number to prevent errors. | 259 | * this limit so reduce the number to prevent errors. |
206 | */ | 260 | */ |
207 | rt2x00_set_field32(®, USB_DMA_CFG_RX_BULK_AGG_LIMIT, | 261 | rt2x00_set_field32(®, USB_DMA_CFG_RX_BULK_AGG_LIMIT, |
208 | ((RX_ENTRIES * DATA_FRAME_SIZE) / 1024) - 3); | 262 | ((rt2x00dev->ops->rx->entry_num * DATA_FRAME_SIZE) |
263 | / 1024) - 3); | ||
209 | rt2x00_set_field32(®, USB_DMA_CFG_RX_BULK_EN, 1); | 264 | rt2x00_set_field32(®, USB_DMA_CFG_RX_BULK_EN, 1); |
210 | rt2x00_set_field32(®, USB_DMA_CFG_TX_BULK_EN, 1); | 265 | rt2x00_set_field32(®, USB_DMA_CFG_TX_BULK_EN, 1); |
211 | rt2800_register_write(rt2x00dev, USB_DMA_CFG, reg); | 266 | rt2x00usb_register_write(rt2x00dev, USB_DMA_CFG, reg); |
212 | |||
213 | rt2800_register_read(rt2x00dev, MAC_SYS_CTRL, ®); | ||
214 | rt2x00_set_field32(®, MAC_SYS_CTRL_ENABLE_TX, 1); | ||
215 | rt2x00_set_field32(®, MAC_SYS_CTRL_ENABLE_RX, 1); | ||
216 | rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, reg); | ||
217 | |||
218 | /* | ||
219 | * Initialize LED control | ||
220 | */ | ||
221 | rt2x00_eeprom_read(rt2x00dev, EEPROM_LED1, &word); | ||
222 | rt2800_mcu_request(rt2x00dev, MCU_LED_1, 0xff, | ||
223 | word & 0xff, (word >> 8) & 0xff); | ||
224 | 267 | ||
225 | rt2x00_eeprom_read(rt2x00dev, EEPROM_LED2, &word); | 268 | return rt2800_enable_radio(rt2x00dev); |
226 | rt2800_mcu_request(rt2x00dev, MCU_LED_2, 0xff, | ||
227 | word & 0xff, (word >> 8) & 0xff); | ||
228 | |||
229 | rt2x00_eeprom_read(rt2x00dev, EEPROM_LED3, &word); | ||
230 | rt2800_mcu_request(rt2x00dev, MCU_LED_3, 0xff, | ||
231 | word & 0xff, (word >> 8) & 0xff); | ||
232 | |||
233 | return 0; | ||
234 | } | 269 | } |
235 | 270 | ||
236 | static void rt2800usb_disable_radio(struct rt2x00_dev *rt2x00dev) | 271 | static void rt2800usb_disable_radio(struct rt2x00_dev *rt2x00dev) |
237 | { | 272 | { |
238 | u32 reg; | 273 | rt2800_disable_radio(rt2x00dev); |
239 | |||
240 | rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, ®); | ||
241 | rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_TX_DMA, 0); | ||
242 | rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_RX_DMA, 0); | ||
243 | rt2800_register_write(rt2x00dev, WPDMA_GLO_CFG, reg); | ||
244 | |||
245 | rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, 0); | ||
246 | rt2800_register_write(rt2x00dev, PWR_PIN_CFG, 0); | ||
247 | rt2800_register_write(rt2x00dev, TX_PIN_CFG, 0); | ||
248 | |||
249 | /* Wait for DMA, ignore error */ | ||
250 | rt2800_wait_wpdma_ready(rt2x00dev); | ||
251 | |||
252 | rt2x00usb_disable_radio(rt2x00dev); | 274 | rt2x00usb_disable_radio(rt2x00dev); |
253 | } | 275 | } |
254 | 276 | ||
@@ -256,9 +278,9 @@ static int rt2800usb_set_state(struct rt2x00_dev *rt2x00dev, | |||
256 | enum dev_state state) | 278 | enum dev_state state) |
257 | { | 279 | { |
258 | if (state == STATE_AWAKE) | 280 | if (state == STATE_AWAKE) |
259 | rt2800_mcu_request(rt2x00dev, MCU_WAKEUP, 0xff, 0, 0); | 281 | rt2800_mcu_request(rt2x00dev, MCU_WAKEUP, 0xff, 0, 2); |
260 | else | 282 | else |
261 | rt2800_mcu_request(rt2x00dev, MCU_SLEEP, 0xff, 0, 2); | 283 | rt2800_mcu_request(rt2x00dev, MCU_SLEEP, 0xff, 0xff, 2); |
262 | 284 | ||
263 | return 0; | 285 | return 0; |
264 | } | 286 | } |
@@ -287,16 +309,8 @@ static int rt2800usb_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
287 | rt2800usb_disable_radio(rt2x00dev); | 309 | rt2800usb_disable_radio(rt2x00dev); |
288 | rt2800usb_set_state(rt2x00dev, STATE_SLEEP); | 310 | rt2800usb_set_state(rt2x00dev, STATE_SLEEP); |
289 | break; | 311 | break; |
290 | case STATE_RADIO_RX_ON: | ||
291 | case STATE_RADIO_RX_ON_LINK: | ||
292 | case STATE_RADIO_RX_OFF: | ||
293 | case STATE_RADIO_RX_OFF_LINK: | ||
294 | rt2800usb_toggle_rx(rt2x00dev, state); | ||
295 | break; | ||
296 | case STATE_RADIO_IRQ_ON: | 312 | case STATE_RADIO_IRQ_ON: |
297 | case STATE_RADIO_IRQ_ON_ISR: | ||
298 | case STATE_RADIO_IRQ_OFF: | 313 | case STATE_RADIO_IRQ_OFF: |
299 | case STATE_RADIO_IRQ_OFF_ISR: | ||
300 | /* No support, but no error either */ | 314 | /* No support, but no error either */ |
301 | break; | 315 | break; |
302 | case STATE_DEEP_SLEEP: | 316 | case STATE_DEEP_SLEEP: |
@@ -318,31 +332,78 @@ static int rt2800usb_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
318 | } | 332 | } |
319 | 333 | ||
320 | /* | 334 | /* |
321 | * TX descriptor initialization | 335 | * Watchdog handlers |
322 | */ | 336 | */ |
323 | static void rt2800usb_write_tx_data(struct queue_entry* entry, | 337 | static void rt2800usb_watchdog(struct rt2x00_dev *rt2x00dev) |
324 | struct txentry_desc *txdesc) | ||
325 | { | 338 | { |
326 | __le32 *txwi = (__le32 *) (entry->skb->data + TXINFO_DESC_SIZE); | 339 | unsigned int i; |
340 | u32 reg; | ||
341 | |||
342 | rt2x00usb_register_read(rt2x00dev, TXRXQ_PCNT, ®); | ||
343 | if (rt2x00_get_field32(reg, TXRXQ_PCNT_TX0Q)) { | ||
344 | WARNING(rt2x00dev, "TX HW queue 0 timed out," | ||
345 | " invoke forced kick\n"); | ||
346 | |||
347 | rt2x00usb_register_write(rt2x00dev, PBF_CFG, 0xf40012); | ||
348 | |||
349 | for (i = 0; i < 10; i++) { | ||
350 | udelay(10); | ||
351 | if (!rt2x00_get_field32(reg, TXRXQ_PCNT_TX0Q)) | ||
352 | break; | ||
353 | } | ||
327 | 354 | ||
328 | rt2800_write_txwi(txwi, txdesc); | 355 | rt2x00usb_register_write(rt2x00dev, PBF_CFG, 0xf40006); |
356 | } | ||
357 | |||
358 | rt2x00usb_register_read(rt2x00dev, TXRXQ_PCNT, ®); | ||
359 | if (rt2x00_get_field32(reg, TXRXQ_PCNT_TX1Q)) { | ||
360 | WARNING(rt2x00dev, "TX HW queue 1 timed out," | ||
361 | " invoke forced kick\n"); | ||
362 | |||
363 | rt2x00usb_register_write(rt2x00dev, PBF_CFG, 0xf4000a); | ||
364 | |||
365 | for (i = 0; i < 10; i++) { | ||
366 | udelay(10); | ||
367 | if (!rt2x00_get_field32(reg, TXRXQ_PCNT_TX1Q)) | ||
368 | break; | ||
369 | } | ||
370 | |||
371 | rt2x00usb_register_write(rt2x00dev, PBF_CFG, 0xf40006); | ||
372 | } | ||
373 | |||
374 | rt2x00usb_watchdog(rt2x00dev); | ||
329 | } | 375 | } |
330 | 376 | ||
377 | /* | ||
378 | * TX descriptor initialization | ||
379 | */ | ||
380 | static __le32 *rt2800usb_get_txwi(struct queue_entry *entry) | ||
381 | { | ||
382 | if (entry->queue->qid == QID_BEACON) | ||
383 | return (__le32 *) (entry->skb->data); | ||
384 | else | ||
385 | return (__le32 *) (entry->skb->data + TXINFO_DESC_SIZE); | ||
386 | } | ||
331 | 387 | ||
332 | static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | 388 | static void rt2800usb_write_tx_desc(struct queue_entry *entry, |
333 | struct sk_buff *skb, | ||
334 | struct txentry_desc *txdesc) | 389 | struct txentry_desc *txdesc) |
335 | { | 390 | { |
336 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); | 391 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); |
337 | __le32 *txi = (__le32 *) skb->data; | 392 | __le32 *txi = (__le32 *) entry->skb->data; |
338 | u32 word; | 393 | u32 word; |
339 | 394 | ||
340 | /* | 395 | /* |
341 | * Initialize TXINFO descriptor | 396 | * Initialize TXINFO descriptor |
342 | */ | 397 | */ |
343 | rt2x00_desc_read(txi, 0, &word); | 398 | rt2x00_desc_read(txi, 0, &word); |
399 | |||
400 | /* | ||
401 | * The size of TXINFO_W0_USB_DMA_TX_PKT_LEN is | ||
402 | * TXWI + 802.11 header + L2 pad + payload + pad, | ||
403 | * so need to decrease size of TXINFO and USB end pad. | ||
404 | */ | ||
344 | rt2x00_set_field32(&word, TXINFO_W0_USB_DMA_TX_PKT_LEN, | 405 | rt2x00_set_field32(&word, TXINFO_W0_USB_DMA_TX_PKT_LEN, |
345 | skb->len - TXINFO_DESC_SIZE); | 406 | entry->skb->len - TXINFO_DESC_SIZE - 4); |
346 | rt2x00_set_field32(&word, TXINFO_W0_WIV, | 407 | rt2x00_set_field32(&word, TXINFO_W0_WIV, |
347 | !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc->flags)); | 408 | !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc->flags)); |
348 | rt2x00_set_field32(&word, TXINFO_W0_QSEL, 2); | 409 | rt2x00_set_field32(&word, TXINFO_W0_QSEL, 2); |
@@ -360,22 +421,80 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
360 | skbdesc->desc_len = TXINFO_DESC_SIZE + TXWI_DESC_SIZE; | 421 | skbdesc->desc_len = TXINFO_DESC_SIZE + TXWI_DESC_SIZE; |
361 | } | 422 | } |
362 | 423 | ||
424 | static void rt2800usb_write_tx_data(struct queue_entry *entry, | ||
425 | struct txentry_desc *txdesc) | ||
426 | { | ||
427 | unsigned int len; | ||
428 | int err; | ||
429 | |||
430 | rt2800_write_tx_data(entry, txdesc); | ||
431 | |||
432 | /* | ||
433 | * pad(1~3 bytes) is added after each 802.11 payload. | ||
434 | * USB end pad(4 bytes) is added at each USB bulk out packet end. | ||
435 | * TX frame format is : | ||
436 | * | TXINFO | TXWI | 802.11 header | L2 pad | payload | pad | USB end pad | | ||
437 | * |<------------- tx_pkt_len ------------->| | ||
438 | */ | ||
439 | len = roundup(entry->skb->len, 4) + 4; | ||
440 | err = skb_padto(entry->skb, len); | ||
441 | if (unlikely(err)) { | ||
442 | WARNING(entry->queue->rt2x00dev, "TX SKB padding error, out of memory\n"); | ||
443 | return; | ||
444 | } | ||
445 | |||
446 | entry->skb->len = len; | ||
447 | } | ||
448 | |||
363 | /* | 449 | /* |
364 | * TX data initialization | 450 | * TX data initialization |
365 | */ | 451 | */ |
366 | static int rt2800usb_get_tx_data_len(struct queue_entry *entry) | 452 | static int rt2800usb_get_tx_data_len(struct queue_entry *entry) |
367 | { | 453 | { |
368 | int length; | 454 | return entry->skb->len; |
455 | } | ||
456 | |||
457 | /* | ||
458 | * TX control handlers | ||
459 | */ | ||
460 | static void rt2800usb_work_txdone(struct work_struct *work) | ||
461 | { | ||
462 | struct rt2x00_dev *rt2x00dev = | ||
463 | container_of(work, struct rt2x00_dev, txdone_work); | ||
464 | struct data_queue *queue; | ||
465 | struct queue_entry *entry; | ||
466 | |||
467 | rt2800_txdone(rt2x00dev); | ||
369 | 468 | ||
370 | /* | 469 | /* |
371 | * The length _must_ include 4 bytes padding, | 470 | * Process any trailing TX status reports for IO failures, |
372 | * it should always be multiple of 4, | 471 | * we loop until we find the first non-IO error entry. This |
373 | * but it must _not_ be a multiple of the USB packet size. | 472 | * can either be a frame which is free, is being uploaded, |
473 | * or has completed the upload but didn't have an entry | ||
474 | * in the TX_STAT_FIFO register yet. | ||
374 | */ | 475 | */ |
375 | length = roundup(entry->skb->len + 4, 4); | 476 | tx_queue_for_each(rt2x00dev, queue) { |
376 | length += (4 * !(length % entry->queue->usb_maxpacket)); | 477 | while (!rt2x00queue_empty(queue)) { |
478 | entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); | ||
479 | |||
480 | if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) | ||
481 | break; | ||
482 | if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags)) | ||
483 | rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE); | ||
484 | else if (rt2x00queue_status_timeout(entry)) | ||
485 | rt2x00lib_txdone_noinfo(entry, TXDONE_UNKNOWN); | ||
486 | else | ||
487 | break; | ||
488 | } | ||
489 | } | ||
377 | 490 | ||
378 | return length; | 491 | /* |
492 | * The hw may delay sending the packet after DMA complete | ||
493 | * if the medium is busy, thus the TX_STA_FIFO entry is | ||
494 | * also delayed -> use a timer to retrieve it. | ||
495 | */ | ||
496 | if (rt2800usb_txstatus_pending(rt2x00dev)) | ||
497 | mod_timer(&rt2x00dev->txstatus_timer, jiffies + msecs_to_jiffies(2)); | ||
379 | } | 498 | } |
380 | 499 | ||
381 | /* | 500 | /* |
@@ -433,6 +552,12 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry, | |||
433 | */ | 552 | */ |
434 | rxdesc->flags |= RX_FLAG_IV_STRIPPED; | 553 | rxdesc->flags |= RX_FLAG_IV_STRIPPED; |
435 | 554 | ||
555 | /* | ||
556 | * The hardware has already checked the Michael Mic and has | ||
557 | * stripped it from the frame. Signal this to mac80211. | ||
558 | */ | ||
559 | rxdesc->flags |= RX_FLAG_MMIC_STRIPPED; | ||
560 | |||
436 | if (rxdesc->cipher_status == RX_CRYPTO_SUCCESS) | 561 | if (rxdesc->cipher_status == RX_CRYPTO_SUCCESS) |
437 | rxdesc->flags |= RX_FLAG_DECRYPTED; | 562 | rxdesc->flags |= RX_FLAG_DECRYPTED; |
438 | else if (rxdesc->cipher_status == RX_CRYPTO_FAIL_MIC) | 563 | else if (rxdesc->cipher_status == RX_CRYPTO_FAIL_MIC) |
@@ -496,24 +621,35 @@ static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
496 | * This device has multiple filters for control frames | 621 | * This device has multiple filters for control frames |
497 | * and has a separate filter for PS Poll frames. | 622 | * and has a separate filter for PS Poll frames. |
498 | */ | 623 | */ |
499 | __set_bit(DRIVER_SUPPORT_CONTROL_FILTERS, &rt2x00dev->flags); | 624 | __set_bit(CAPABILITY_CONTROL_FILTERS, &rt2x00dev->cap_flags); |
500 | __set_bit(DRIVER_SUPPORT_CONTROL_FILTER_PSPOLL, &rt2x00dev->flags); | 625 | __set_bit(CAPABILITY_CONTROL_FILTER_PSPOLL, &rt2x00dev->cap_flags); |
501 | 626 | ||
502 | /* | 627 | /* |
503 | * This device requires firmware. | 628 | * This device requires firmware. |
504 | */ | 629 | */ |
505 | __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags); | 630 | __set_bit(REQUIRE_FIRMWARE, &rt2x00dev->cap_flags); |
506 | __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); | 631 | __set_bit(REQUIRE_L2PAD, &rt2x00dev->cap_flags); |
507 | if (!modparam_nohwcrypt) | 632 | if (!modparam_nohwcrypt) |
508 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); | 633 | __set_bit(CAPABILITY_HW_CRYPTO, &rt2x00dev->cap_flags); |
509 | __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags); | 634 | __set_bit(CAPABILITY_LINK_TUNING, &rt2x00dev->cap_flags); |
510 | __set_bit(DRIVER_SUPPORT_WATCHDOG, &rt2x00dev->flags); | 635 | __set_bit(REQUIRE_HT_TX_DESC, &rt2x00dev->cap_flags); |
636 | __set_bit(REQUIRE_TXSTATUS_FIFO, &rt2x00dev->cap_flags); | ||
637 | __set_bit(REQUIRE_PS_AUTOWAKE, &rt2x00dev->cap_flags); | ||
638 | |||
639 | setup_timer(&rt2x00dev->txstatus_timer, | ||
640 | rt2800usb_tx_sta_fifo_timeout, | ||
641 | (unsigned long) rt2x00dev); | ||
511 | 642 | ||
512 | /* | 643 | /* |
513 | * Set the rssi offset. | 644 | * Set the rssi offset. |
514 | */ | 645 | */ |
515 | rt2x00dev->rssi_offset = DEFAULT_RSSI_OFFSET; | 646 | rt2x00dev->rssi_offset = DEFAULT_RSSI_OFFSET; |
516 | 647 | ||
648 | /* | ||
649 | * Overwrite TX done handler | ||
650 | */ | ||
651 | PREPARE_WORK(&rt2x00dev->txdone_work, rt2800usb_work_txdone); | ||
652 | |||
517 | return 0; | 653 | return 0; |
518 | } | 654 | } |
519 | 655 | ||
@@ -537,6 +673,9 @@ static const struct ieee80211_ops rt2800usb_mac80211_ops = { | |||
537 | .get_tsf = rt2800_get_tsf, | 673 | .get_tsf = rt2800_get_tsf, |
538 | .rfkill_poll = rt2x00mac_rfkill_poll, | 674 | .rfkill_poll = rt2x00mac_rfkill_poll, |
539 | .ampdu_action = rt2800_ampdu_action, | 675 | .ampdu_action = rt2800_ampdu_action, |
676 | .flush = rt2x00mac_flush, | ||
677 | .get_survey = rt2800_get_survey, | ||
678 | .get_ringparam = rt2x00mac_get_ringparam, | ||
540 | }; | 679 | }; |
541 | 680 | ||
542 | static const struct rt2800_ops rt2800usb_rt2800_ops = { | 681 | static const struct rt2800_ops rt2800usb_rt2800_ops = { |
@@ -549,6 +688,7 @@ static const struct rt2800_ops rt2800usb_rt2800_ops = { | |||
549 | .regbusy_read = rt2x00usb_regbusy_read, | 688 | .regbusy_read = rt2x00usb_regbusy_read, |
550 | .drv_write_firmware = rt2800usb_write_firmware, | 689 | .drv_write_firmware = rt2800usb_write_firmware, |
551 | .drv_init_registers = rt2800usb_init_registers, | 690 | .drv_init_registers = rt2800usb_init_registers, |
691 | .drv_get_txwi = rt2800usb_get_txwi, | ||
552 | }; | 692 | }; |
553 | 693 | ||
554 | static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = { | 694 | static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = { |
@@ -564,13 +704,18 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = { | |||
564 | .link_stats = rt2800_link_stats, | 704 | .link_stats = rt2800_link_stats, |
565 | .reset_tuner = rt2800_reset_tuner, | 705 | .reset_tuner = rt2800_reset_tuner, |
566 | .link_tuner = rt2800_link_tuner, | 706 | .link_tuner = rt2800_link_tuner, |
567 | .watchdog = rt2x00usb_watchdog, | 707 | .gain_calibration = rt2800_gain_calibration, |
708 | .watchdog = rt2800usb_watchdog, | ||
709 | .start_queue = rt2800usb_start_queue, | ||
710 | .kick_queue = rt2x00usb_kick_queue, | ||
711 | .stop_queue = rt2800usb_stop_queue, | ||
712 | .flush_queue = rt2x00usb_flush_queue, | ||
713 | .tx_dma_done = rt2800usb_tx_dma_done, | ||
568 | .write_tx_desc = rt2800usb_write_tx_desc, | 714 | .write_tx_desc = rt2800usb_write_tx_desc, |
569 | .write_tx_data = rt2800usb_write_tx_data, | 715 | .write_tx_data = rt2800usb_write_tx_data, |
570 | .write_beacon = rt2800_write_beacon, | 716 | .write_beacon = rt2800_write_beacon, |
717 | .clear_beacon = rt2800_clear_beacon, | ||
571 | .get_tx_data_len = rt2800usb_get_tx_data_len, | 718 | .get_tx_data_len = rt2800usb_get_tx_data_len, |
572 | .kick_tx_queue = rt2x00usb_kick_tx_queue, | ||
573 | .kill_tx_queue = rt2x00usb_kill_tx_queue, | ||
574 | .fill_rxdone = rt2800usb_fill_rxdone, | 719 | .fill_rxdone = rt2800usb_fill_rxdone, |
575 | .config_shared_key = rt2800_config_shared_key, | 720 | .config_shared_key = rt2800_config_shared_key, |
576 | .config_pairwise_key = rt2800_config_pairwise_key, | 721 | .config_pairwise_key = rt2800_config_pairwise_key, |
@@ -582,21 +727,21 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = { | |||
582 | }; | 727 | }; |
583 | 728 | ||
584 | static const struct data_queue_desc rt2800usb_queue_rx = { | 729 | static const struct data_queue_desc rt2800usb_queue_rx = { |
585 | .entry_num = RX_ENTRIES, | 730 | .entry_num = 128, |
586 | .data_size = AGGREGATION_SIZE, | 731 | .data_size = AGGREGATION_SIZE, |
587 | .desc_size = RXINFO_DESC_SIZE + RXWI_DESC_SIZE, | 732 | .desc_size = RXINFO_DESC_SIZE + RXWI_DESC_SIZE, |
588 | .priv_size = sizeof(struct queue_entry_priv_usb), | 733 | .priv_size = sizeof(struct queue_entry_priv_usb), |
589 | }; | 734 | }; |
590 | 735 | ||
591 | static const struct data_queue_desc rt2800usb_queue_tx = { | 736 | static const struct data_queue_desc rt2800usb_queue_tx = { |
592 | .entry_num = TX_ENTRIES, | 737 | .entry_num = 64, |
593 | .data_size = AGGREGATION_SIZE, | 738 | .data_size = AGGREGATION_SIZE, |
594 | .desc_size = TXINFO_DESC_SIZE + TXWI_DESC_SIZE, | 739 | .desc_size = TXINFO_DESC_SIZE + TXWI_DESC_SIZE, |
595 | .priv_size = sizeof(struct queue_entry_priv_usb), | 740 | .priv_size = sizeof(struct queue_entry_priv_usb), |
596 | }; | 741 | }; |
597 | 742 | ||
598 | static const struct data_queue_desc rt2800usb_queue_bcn = { | 743 | static const struct data_queue_desc rt2800usb_queue_bcn = { |
599 | .entry_num = 8 * BEACON_ENTRIES, | 744 | .entry_num = 8, |
600 | .data_size = MGMT_FRAME_SIZE, | 745 | .data_size = MGMT_FRAME_SIZE, |
601 | .desc_size = TXINFO_DESC_SIZE + TXWI_DESC_SIZE, | 746 | .desc_size = TXINFO_DESC_SIZE + TXWI_DESC_SIZE, |
602 | .priv_size = sizeof(struct queue_entry_priv_usb), | 747 | .priv_size = sizeof(struct queue_entry_priv_usb), |
@@ -626,300 +771,340 @@ static const struct rt2x00_ops rt2800usb_ops = { | |||
626 | */ | 771 | */ |
627 | static struct usb_device_id rt2800usb_device_table[] = { | 772 | static struct usb_device_id rt2800usb_device_table[] = { |
628 | /* Abocom */ | 773 | /* Abocom */ |
629 | { USB_DEVICE(0x07b8, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) }, | 774 | { USB_DEVICE(0x07b8, 0x2870) }, |
630 | { USB_DEVICE(0x07b8, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) }, | 775 | { USB_DEVICE(0x07b8, 0x2770) }, |
631 | { USB_DEVICE(0x1482, 0x3c09), USB_DEVICE_DATA(&rt2800usb_ops) }, | 776 | { USB_DEVICE(0x07b8, 0x3070) }, |
777 | { USB_DEVICE(0x07b8, 0x3071) }, | ||
778 | { USB_DEVICE(0x07b8, 0x3072) }, | ||
779 | { USB_DEVICE(0x1482, 0x3c09) }, | ||
780 | /* AirTies */ | ||
781 | { USB_DEVICE(0x1eda, 0x2012) }, | ||
782 | { USB_DEVICE(0x1eda, 0x2310) }, | ||
632 | /* Allwin */ | 783 | /* Allwin */ |
633 | { USB_DEVICE(0x8516, 0x2070), USB_DEVICE_DATA(&rt2800usb_ops) }, | 784 | { USB_DEVICE(0x8516, 0x2070) }, |
634 | { USB_DEVICE(0x8516, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) }, | 785 | { USB_DEVICE(0x8516, 0x2770) }, |
635 | { USB_DEVICE(0x8516, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) }, | 786 | { USB_DEVICE(0x8516, 0x2870) }, |
787 | { USB_DEVICE(0x8516, 0x3070) }, | ||
788 | { USB_DEVICE(0x8516, 0x3071) }, | ||
789 | { USB_DEVICE(0x8516, 0x3072) }, | ||
790 | /* Alpha Networks */ | ||
791 | { USB_DEVICE(0x14b2, 0x3c06) }, | ||
792 | { USB_DEVICE(0x14b2, 0x3c07) }, | ||
793 | { USB_DEVICE(0x14b2, 0x3c09) }, | ||
794 | { USB_DEVICE(0x14b2, 0x3c12) }, | ||
795 | { USB_DEVICE(0x14b2, 0x3c23) }, | ||
796 | { USB_DEVICE(0x14b2, 0x3c25) }, | ||
797 | { USB_DEVICE(0x14b2, 0x3c27) }, | ||
798 | { USB_DEVICE(0x14b2, 0x3c28) }, | ||
799 | { USB_DEVICE(0x14b2, 0x3c2c) }, | ||
636 | /* Amit */ | 800 | /* Amit */ |
637 | { USB_DEVICE(0x15c5, 0x0008), USB_DEVICE_DATA(&rt2800usb_ops) }, | 801 | { USB_DEVICE(0x15c5, 0x0008) }, |
638 | /* Askey */ | 802 | /* Askey */ |
639 | { USB_DEVICE(0x1690, 0x0740), USB_DEVICE_DATA(&rt2800usb_ops) }, | 803 | { USB_DEVICE(0x1690, 0x0740) }, |
640 | /* ASUS */ | 804 | /* ASUS */ |
641 | { USB_DEVICE(0x0b05, 0x1731), USB_DEVICE_DATA(&rt2800usb_ops) }, | 805 | { USB_DEVICE(0x0b05, 0x1731) }, |
642 | { USB_DEVICE(0x0b05, 0x1732), USB_DEVICE_DATA(&rt2800usb_ops) }, | 806 | { USB_DEVICE(0x0b05, 0x1732) }, |
643 | { USB_DEVICE(0x0b05, 0x1742), USB_DEVICE_DATA(&rt2800usb_ops) }, | 807 | { USB_DEVICE(0x0b05, 0x1742) }, |
808 | { USB_DEVICE(0x0b05, 0x1784) }, | ||
809 | { USB_DEVICE(0x1761, 0x0b05) }, | ||
644 | /* AzureWave */ | 810 | /* AzureWave */ |
645 | { USB_DEVICE(0x13d3, 0x3247), USB_DEVICE_DATA(&rt2800usb_ops) }, | 811 | { USB_DEVICE(0x13d3, 0x3247) }, |
812 | { USB_DEVICE(0x13d3, 0x3273) }, | ||
813 | { USB_DEVICE(0x13d3, 0x3305) }, | ||
814 | { USB_DEVICE(0x13d3, 0x3307) }, | ||
815 | { USB_DEVICE(0x13d3, 0x3321) }, | ||
646 | /* Belkin */ | 816 | /* Belkin */ |
647 | { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) }, | 817 | { USB_DEVICE(0x050d, 0x8053) }, |
648 | { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 818 | { USB_DEVICE(0x050d, 0x805c) }, |
649 | { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 819 | { USB_DEVICE(0x050d, 0x815c) }, |
820 | { USB_DEVICE(0x050d, 0x825b) }, | ||
821 | { USB_DEVICE(0x050d, 0x935a) }, | ||
822 | { USB_DEVICE(0x050d, 0x935b) }, | ||
650 | /* Buffalo */ | 823 | /* Buffalo */ |
651 | { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) }, | 824 | { USB_DEVICE(0x0411, 0x00e8) }, |
652 | /* Conceptronic */ | 825 | { USB_DEVICE(0x0411, 0x016f) }, |
653 | { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) }, | 826 | { USB_DEVICE(0x0411, 0x01a2) }, |
654 | { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
655 | { USB_DEVICE(0x14b2, 0x3c09), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
656 | { USB_DEVICE(0x14b2, 0x3c23), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
657 | { USB_DEVICE(0x14b2, 0x3c25), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
658 | { USB_DEVICE(0x14b2, 0x3c27), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
659 | { USB_DEVICE(0x14b2, 0x3c28), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
660 | /* Corega */ | 827 | /* Corega */ |
661 | { USB_DEVICE(0x07aa, 0x002f), USB_DEVICE_DATA(&rt2800usb_ops) }, | 828 | { USB_DEVICE(0x07aa, 0x002f) }, |
662 | { USB_DEVICE(0x07aa, 0x003c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 829 | { USB_DEVICE(0x07aa, 0x003c) }, |
663 | { USB_DEVICE(0x07aa, 0x003f), USB_DEVICE_DATA(&rt2800usb_ops) }, | 830 | { USB_DEVICE(0x07aa, 0x003f) }, |
831 | { USB_DEVICE(0x18c5, 0x0012) }, | ||
664 | /* D-Link */ | 832 | /* D-Link */ |
665 | { USB_DEVICE(0x07d1, 0x3c09), USB_DEVICE_DATA(&rt2800usb_ops) }, | 833 | { USB_DEVICE(0x07d1, 0x3c09) }, |
666 | { USB_DEVICE(0x07d1, 0x3c11), USB_DEVICE_DATA(&rt2800usb_ops) }, | 834 | { USB_DEVICE(0x07d1, 0x3c0a) }, |
835 | { USB_DEVICE(0x07d1, 0x3c0d) }, | ||
836 | { USB_DEVICE(0x07d1, 0x3c0e) }, | ||
837 | { USB_DEVICE(0x07d1, 0x3c0f) }, | ||
838 | { USB_DEVICE(0x07d1, 0x3c11) }, | ||
839 | { USB_DEVICE(0x07d1, 0x3c16) }, | ||
840 | /* Draytek */ | ||
841 | { USB_DEVICE(0x07fa, 0x7712) }, | ||
667 | /* Edimax */ | 842 | /* Edimax */ |
668 | { USB_DEVICE(0x7392, 0x7717), USB_DEVICE_DATA(&rt2800usb_ops) }, | 843 | { USB_DEVICE(0x7392, 0x7711) }, |
669 | { USB_DEVICE(0x7392, 0x7718), USB_DEVICE_DATA(&rt2800usb_ops) }, | 844 | { USB_DEVICE(0x7392, 0x7717) }, |
845 | { USB_DEVICE(0x7392, 0x7718) }, | ||
846 | /* Encore */ | ||
847 | { USB_DEVICE(0x203d, 0x1480) }, | ||
848 | { USB_DEVICE(0x203d, 0x14a9) }, | ||
670 | /* EnGenius */ | 849 | /* EnGenius */ |
671 | { USB_DEVICE(0x1740, 0x9701), USB_DEVICE_DATA(&rt2800usb_ops) }, | 850 | { USB_DEVICE(0x1740, 0x9701) }, |
672 | { USB_DEVICE(0x1740, 0x9702), USB_DEVICE_DATA(&rt2800usb_ops) }, | 851 | { USB_DEVICE(0x1740, 0x9702) }, |
852 | { USB_DEVICE(0x1740, 0x9703) }, | ||
853 | { USB_DEVICE(0x1740, 0x9705) }, | ||
854 | { USB_DEVICE(0x1740, 0x9706) }, | ||
855 | { USB_DEVICE(0x1740, 0x9707) }, | ||
856 | { USB_DEVICE(0x1740, 0x9708) }, | ||
857 | { USB_DEVICE(0x1740, 0x9709) }, | ||
858 | /* Gemtek */ | ||
859 | { USB_DEVICE(0x15a9, 0x0012) }, | ||
673 | /* Gigabyte */ | 860 | /* Gigabyte */ |
674 | { USB_DEVICE(0x1044, 0x800b), USB_DEVICE_DATA(&rt2800usb_ops) }, | 861 | { USB_DEVICE(0x1044, 0x800b) }, |
862 | { USB_DEVICE(0x1044, 0x800d) }, | ||
675 | /* Hawking */ | 863 | /* Hawking */ |
676 | { USB_DEVICE(0x0e66, 0x0001), USB_DEVICE_DATA(&rt2800usb_ops) }, | 864 | { USB_DEVICE(0x0e66, 0x0001) }, |
677 | { USB_DEVICE(0x0e66, 0x0003), USB_DEVICE_DATA(&rt2800usb_ops) }, | 865 | { USB_DEVICE(0x0e66, 0x0003) }, |
678 | { USB_DEVICE(0x0e66, 0x0009), USB_DEVICE_DATA(&rt2800usb_ops) }, | 866 | { USB_DEVICE(0x0e66, 0x0009) }, |
679 | { USB_DEVICE(0x0e66, 0x000b), USB_DEVICE_DATA(&rt2800usb_ops) }, | 867 | { USB_DEVICE(0x0e66, 0x000b) }, |
680 | { USB_DEVICE(0x0e66, 0x0013), USB_DEVICE_DATA(&rt2800usb_ops) }, | 868 | { USB_DEVICE(0x0e66, 0x0013) }, |
681 | { USB_DEVICE(0x0e66, 0x0017), USB_DEVICE_DATA(&rt2800usb_ops) }, | 869 | { USB_DEVICE(0x0e66, 0x0017) }, |
682 | { USB_DEVICE(0x0e66, 0x0018), USB_DEVICE_DATA(&rt2800usb_ops) }, | 870 | { USB_DEVICE(0x0e66, 0x0018) }, |
871 | /* I-O DATA */ | ||
872 | { USB_DEVICE(0x04bb, 0x0945) }, | ||
873 | { USB_DEVICE(0x04bb, 0x0947) }, | ||
874 | { USB_DEVICE(0x04bb, 0x0948) }, | ||
683 | /* Linksys */ | 875 | /* Linksys */ |
684 | { USB_DEVICE(0x1737, 0x0070), USB_DEVICE_DATA(&rt2800usb_ops) }, | 876 | { USB_DEVICE(0x13b1, 0x0031) }, |
685 | { USB_DEVICE(0x1737, 0x0071), USB_DEVICE_DATA(&rt2800usb_ops) }, | 877 | { USB_DEVICE(0x1737, 0x0070) }, |
878 | { USB_DEVICE(0x1737, 0x0071) }, | ||
686 | /* Logitec */ | 879 | /* Logitec */ |
687 | { USB_DEVICE(0x0789, 0x0162), USB_DEVICE_DATA(&rt2800usb_ops) }, | 880 | { USB_DEVICE(0x0789, 0x0162) }, |
688 | { USB_DEVICE(0x0789, 0x0163), USB_DEVICE_DATA(&rt2800usb_ops) }, | 881 | { USB_DEVICE(0x0789, 0x0163) }, |
689 | { USB_DEVICE(0x0789, 0x0164), USB_DEVICE_DATA(&rt2800usb_ops) }, | 882 | { USB_DEVICE(0x0789, 0x0164) }, |
883 | { USB_DEVICE(0x0789, 0x0166) }, | ||
690 | /* Motorola */ | 884 | /* Motorola */ |
691 | { USB_DEVICE(0x100d, 0x9031), USB_DEVICE_DATA(&rt2800usb_ops) }, | 885 | { USB_DEVICE(0x100d, 0x9031) }, |
692 | /* MSI */ | 886 | /* MSI */ |
693 | { USB_DEVICE(0x0db0, 0x6899), USB_DEVICE_DATA(&rt2800usb_ops) }, | 887 | { USB_DEVICE(0x0db0, 0x3820) }, |
888 | { USB_DEVICE(0x0db0, 0x3821) }, | ||
889 | { USB_DEVICE(0x0db0, 0x3822) }, | ||
890 | { USB_DEVICE(0x0db0, 0x3870) }, | ||
891 | { USB_DEVICE(0x0db0, 0x3871) }, | ||
892 | { USB_DEVICE(0x0db0, 0x6899) }, | ||
893 | { USB_DEVICE(0x0db0, 0x821a) }, | ||
894 | { USB_DEVICE(0x0db0, 0x822a) }, | ||
895 | { USB_DEVICE(0x0db0, 0x822b) }, | ||
896 | { USB_DEVICE(0x0db0, 0x822c) }, | ||
897 | { USB_DEVICE(0x0db0, 0x870a) }, | ||
898 | { USB_DEVICE(0x0db0, 0x871a) }, | ||
899 | { USB_DEVICE(0x0db0, 0x871b) }, | ||
900 | { USB_DEVICE(0x0db0, 0x871c) }, | ||
901 | { USB_DEVICE(0x0db0, 0x899a) }, | ||
902 | /* Para */ | ||
903 | { USB_DEVICE(0x20b8, 0x8888) }, | ||
904 | /* Pegatron */ | ||
905 | { USB_DEVICE(0x1d4d, 0x000c) }, | ||
906 | { USB_DEVICE(0x1d4d, 0x000e) }, | ||
907 | { USB_DEVICE(0x1d4d, 0x0011) }, | ||
694 | /* Philips */ | 908 | /* Philips */ |
695 | { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) }, | 909 | { USB_DEVICE(0x0471, 0x200f) }, |
696 | /* Planex */ | 910 | /* Planex */ |
697 | { USB_DEVICE(0x2019, 0xed06), USB_DEVICE_DATA(&rt2800usb_ops) }, | 911 | { USB_DEVICE(0x2019, 0xab25) }, |
912 | { USB_DEVICE(0x2019, 0xed06) }, | ||
913 | /* Quanta */ | ||
914 | { USB_DEVICE(0x1a32, 0x0304) }, | ||
698 | /* Ralink */ | 915 | /* Ralink */ |
699 | { USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) }, | 916 | { USB_DEVICE(0x148f, 0x2070) }, |
700 | { USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) }, | 917 | { USB_DEVICE(0x148f, 0x2770) }, |
918 | { USB_DEVICE(0x148f, 0x2870) }, | ||
919 | { USB_DEVICE(0x148f, 0x3070) }, | ||
920 | { USB_DEVICE(0x148f, 0x3071) }, | ||
921 | { USB_DEVICE(0x148f, 0x3072) }, | ||
701 | /* Samsung */ | 922 | /* Samsung */ |
702 | { USB_DEVICE(0x04e8, 0x2018), USB_DEVICE_DATA(&rt2800usb_ops) }, | 923 | { USB_DEVICE(0x04e8, 0x2018) }, |
703 | /* Siemens */ | 924 | /* Siemens */ |
704 | { USB_DEVICE(0x129b, 0x1828), USB_DEVICE_DATA(&rt2800usb_ops) }, | 925 | { USB_DEVICE(0x129b, 0x1828) }, |
705 | /* Sitecom */ | 926 | /* Sitecom */ |
706 | { USB_DEVICE(0x0df6, 0x0017), USB_DEVICE_DATA(&rt2800usb_ops) }, | 927 | { USB_DEVICE(0x0df6, 0x0017) }, |
707 | { USB_DEVICE(0x0df6, 0x002b), USB_DEVICE_DATA(&rt2800usb_ops) }, | 928 | { USB_DEVICE(0x0df6, 0x002b) }, |
708 | { USB_DEVICE(0x0df6, 0x002c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 929 | { USB_DEVICE(0x0df6, 0x002c) }, |
709 | { USB_DEVICE(0x0df6, 0x002d), USB_DEVICE_DATA(&rt2800usb_ops) }, | 930 | { USB_DEVICE(0x0df6, 0x002d) }, |
710 | { USB_DEVICE(0x0df6, 0x0039), USB_DEVICE_DATA(&rt2800usb_ops) }, | 931 | { USB_DEVICE(0x0df6, 0x0039) }, |
711 | { USB_DEVICE(0x0df6, 0x003b), USB_DEVICE_DATA(&rt2800usb_ops) }, | 932 | { USB_DEVICE(0x0df6, 0x003b) }, |
712 | { USB_DEVICE(0x0df6, 0x003d), USB_DEVICE_DATA(&rt2800usb_ops) }, | 933 | { USB_DEVICE(0x0df6, 0x003d) }, |
713 | { USB_DEVICE(0x0df6, 0x003f), USB_DEVICE_DATA(&rt2800usb_ops) }, | 934 | { USB_DEVICE(0x0df6, 0x003e) }, |
935 | { USB_DEVICE(0x0df6, 0x003f) }, | ||
936 | { USB_DEVICE(0x0df6, 0x0040) }, | ||
937 | { USB_DEVICE(0x0df6, 0x0042) }, | ||
938 | { USB_DEVICE(0x0df6, 0x0047) }, | ||
939 | { USB_DEVICE(0x0df6, 0x0048) }, | ||
940 | { USB_DEVICE(0x0df6, 0x0051) }, | ||
941 | { USB_DEVICE(0x0df6, 0x005f) }, | ||
714 | /* SMC */ | 942 | /* SMC */ |
715 | { USB_DEVICE(0x083a, 0x6618), USB_DEVICE_DATA(&rt2800usb_ops) }, | 943 | { USB_DEVICE(0x083a, 0x6618) }, |
716 | { USB_DEVICE(0x083a, 0x7512), USB_DEVICE_DATA(&rt2800usb_ops) }, | 944 | { USB_DEVICE(0x083a, 0x7511) }, |
717 | { USB_DEVICE(0x083a, 0x7522), USB_DEVICE_DATA(&rt2800usb_ops) }, | 945 | { USB_DEVICE(0x083a, 0x7512) }, |
718 | { USB_DEVICE(0x083a, 0x8522), USB_DEVICE_DATA(&rt2800usb_ops) }, | 946 | { USB_DEVICE(0x083a, 0x7522) }, |
719 | { USB_DEVICE(0x083a, 0xa618), USB_DEVICE_DATA(&rt2800usb_ops) }, | 947 | { USB_DEVICE(0x083a, 0x8522) }, |
720 | { USB_DEVICE(0x083a, 0xb522), USB_DEVICE_DATA(&rt2800usb_ops) }, | 948 | { USB_DEVICE(0x083a, 0xa618) }, |
949 | { USB_DEVICE(0x083a, 0xa701) }, | ||
950 | { USB_DEVICE(0x083a, 0xa702) }, | ||
951 | { USB_DEVICE(0x083a, 0xa703) }, | ||
952 | { USB_DEVICE(0x083a, 0xb522) }, | ||
721 | /* Sparklan */ | 953 | /* Sparklan */ |
722 | { USB_DEVICE(0x15a9, 0x0006), USB_DEVICE_DATA(&rt2800usb_ops) }, | 954 | { USB_DEVICE(0x15a9, 0x0006) }, |
723 | /* Sweex */ | 955 | /* Sweex */ |
724 | { USB_DEVICE(0x177f, 0x0302), USB_DEVICE_DATA(&rt2800usb_ops) }, | 956 | { USB_DEVICE(0x177f, 0x0302) }, |
725 | /* U-Media*/ | 957 | /* U-Media */ |
726 | { USB_DEVICE(0x157e, 0x300e), USB_DEVICE_DATA(&rt2800usb_ops) }, | 958 | { USB_DEVICE(0x157e, 0x300e) }, |
959 | { USB_DEVICE(0x157e, 0x3013) }, | ||
727 | /* ZCOM */ | 960 | /* ZCOM */ |
728 | { USB_DEVICE(0x0cde, 0x0022), USB_DEVICE_DATA(&rt2800usb_ops) }, | 961 | { USB_DEVICE(0x0cde, 0x0022) }, |
729 | { USB_DEVICE(0x0cde, 0x0025), USB_DEVICE_DATA(&rt2800usb_ops) }, | 962 | { USB_DEVICE(0x0cde, 0x0025) }, |
730 | /* Zinwell */ | 963 | /* Zinwell */ |
731 | { USB_DEVICE(0x5a57, 0x0280), USB_DEVICE_DATA(&rt2800usb_ops) }, | 964 | { USB_DEVICE(0x5a57, 0x0280) }, |
732 | { USB_DEVICE(0x5a57, 0x0282), USB_DEVICE_DATA(&rt2800usb_ops) }, | 965 | { USB_DEVICE(0x5a57, 0x0282) }, |
966 | { USB_DEVICE(0x5a57, 0x0283) }, | ||
967 | { USB_DEVICE(0x5a57, 0x5257) }, | ||
733 | /* Zyxel */ | 968 | /* Zyxel */ |
734 | { USB_DEVICE(0x0586, 0x3416), USB_DEVICE_DATA(&rt2800usb_ops) }, | 969 | { USB_DEVICE(0x0586, 0x3416) }, |
735 | #ifdef CONFIG_RT2800USB_RT30XX | 970 | { USB_DEVICE(0x0586, 0x3418) }, |
736 | /* Abocom */ | 971 | { USB_DEVICE(0x0586, 0x341e) }, |
737 | { USB_DEVICE(0x07b8, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) }, | 972 | { USB_DEVICE(0x0586, 0x343e) }, |
738 | { USB_DEVICE(0x07b8, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) }, | 973 | #ifdef CONFIG_RT2800USB_RT33XX |
739 | { USB_DEVICE(0x07b8, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
740 | /* AirTies */ | ||
741 | { USB_DEVICE(0x1eda, 0x2310), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
742 | /* Allwin */ | ||
743 | { USB_DEVICE(0x8516, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
744 | { USB_DEVICE(0x8516, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
745 | { USB_DEVICE(0x8516, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
746 | /* ASUS */ | ||
747 | { USB_DEVICE(0x0b05, 0x1784), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
748 | /* AzureWave */ | ||
749 | { USB_DEVICE(0x13d3, 0x3273), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
750 | { USB_DEVICE(0x13d3, 0x3305), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
751 | { USB_DEVICE(0x13d3, 0x3307), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
752 | { USB_DEVICE(0x13d3, 0x3321), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
753 | /* Conceptronic */ | ||
754 | { USB_DEVICE(0x14b2, 0x3c12), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
755 | /* Corega */ | ||
756 | { USB_DEVICE(0x18c5, 0x0012), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
757 | /* D-Link */ | ||
758 | { USB_DEVICE(0x07d1, 0x3c0a), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
759 | { USB_DEVICE(0x07d1, 0x3c0d), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
760 | { USB_DEVICE(0x07d1, 0x3c0e), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
761 | { USB_DEVICE(0x07d1, 0x3c0f), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
762 | { USB_DEVICE(0x07d1, 0x3c16), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
763 | /* Draytek */ | ||
764 | { USB_DEVICE(0x07fa, 0x7712), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
765 | /* Edimax */ | ||
766 | { USB_DEVICE(0x7392, 0x7711), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
767 | /* Encore */ | ||
768 | { USB_DEVICE(0x203d, 0x1480), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
769 | { USB_DEVICE(0x203d, 0x14a9), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
770 | /* EnGenius */ | ||
771 | { USB_DEVICE(0x1740, 0x9703), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
772 | { USB_DEVICE(0x1740, 0x9705), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
773 | { USB_DEVICE(0x1740, 0x9706), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
774 | { USB_DEVICE(0x1740, 0x9707), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
775 | { USB_DEVICE(0x1740, 0x9708), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
776 | { USB_DEVICE(0x1740, 0x9709), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
777 | /* Gigabyte */ | ||
778 | { USB_DEVICE(0x1044, 0x800d), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
779 | /* I-O DATA */ | ||
780 | { USB_DEVICE(0x04bb, 0x0945), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
781 | { USB_DEVICE(0x04bb, 0x0947), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
782 | { USB_DEVICE(0x04bb, 0x0948), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
783 | /* Logitec */ | ||
784 | { USB_DEVICE(0x0789, 0x0166), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
785 | /* MSI */ | ||
786 | { USB_DEVICE(0x0db0, 0x3820), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
787 | { USB_DEVICE(0x0db0, 0x3821), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
788 | { USB_DEVICE(0x0db0, 0x3822), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
789 | { USB_DEVICE(0x0db0, 0x3870), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
790 | { USB_DEVICE(0x0db0, 0x3871), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
791 | { USB_DEVICE(0x0db0, 0x821a), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
792 | { USB_DEVICE(0x0db0, 0x822a), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
793 | { USB_DEVICE(0x0db0, 0x822b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
794 | { USB_DEVICE(0x0db0, 0x822c), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
795 | { USB_DEVICE(0x0db0, 0x870a), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
796 | { USB_DEVICE(0x0db0, 0x871a), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
797 | { USB_DEVICE(0x0db0, 0x871b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
798 | { USB_DEVICE(0x0db0, 0x871c), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
799 | { USB_DEVICE(0x0db0, 0x899a), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
800 | /* Para */ | ||
801 | { USB_DEVICE(0x20b8, 0x8888), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
802 | /* Pegatron */ | ||
803 | { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
804 | { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
805 | /* Planex */ | ||
806 | { USB_DEVICE(0x2019, 0xab25), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
807 | /* Quanta */ | ||
808 | { USB_DEVICE(0x1a32, 0x0304), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
809 | /* Ralink */ | 974 | /* Ralink */ |
810 | { USB_DEVICE(0x148f, 0x2070), USB_DEVICE_DATA(&rt2800usb_ops) }, | 975 | { USB_DEVICE(0x148f, 0x3370) }, |
811 | { USB_DEVICE(0x148f, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) }, | 976 | { USB_DEVICE(0x148f, 0x8070) }, |
812 | { USB_DEVICE(0x148f, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
813 | { USB_DEVICE(0x148f, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
814 | /* Sitecom */ | 977 | /* Sitecom */ |
815 | { USB_DEVICE(0x0df6, 0x003e), USB_DEVICE_DATA(&rt2800usb_ops) }, | 978 | { USB_DEVICE(0x0df6, 0x0050) }, |
816 | { USB_DEVICE(0x0df6, 0x0040), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
817 | { USB_DEVICE(0x0df6, 0x0042), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
818 | { USB_DEVICE(0x0df6, 0x0047), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
819 | { USB_DEVICE(0x0df6, 0x0048), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
820 | /* SMC */ | ||
821 | { USB_DEVICE(0x083a, 0x7511), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
822 | { USB_DEVICE(0x083a, 0xa701), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
823 | { USB_DEVICE(0x083a, 0xa702), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
824 | { USB_DEVICE(0x083a, 0xa703), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
825 | /* Zinwell */ | ||
826 | { USB_DEVICE(0x5a57, 0x0283), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
827 | { USB_DEVICE(0x5a57, 0x5257), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
828 | #endif | 979 | #endif |
829 | #ifdef CONFIG_RT2800USB_RT35XX | 980 | #ifdef CONFIG_RT2800USB_RT35XX |
830 | /* Allwin */ | 981 | /* Allwin */ |
831 | { USB_DEVICE(0x8516, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, | 982 | { USB_DEVICE(0x8516, 0x3572) }, |
832 | /* Askey */ | 983 | /* Askey */ |
833 | { USB_DEVICE(0x1690, 0x0744), USB_DEVICE_DATA(&rt2800usb_ops) }, | 984 | { USB_DEVICE(0x1690, 0x0744) }, |
834 | /* Cisco */ | 985 | /* Cisco */ |
835 | { USB_DEVICE(0x167b, 0x4001), USB_DEVICE_DATA(&rt2800usb_ops) }, | 986 | { USB_DEVICE(0x167b, 0x4001) }, |
836 | /* EnGenius */ | 987 | /* EnGenius */ |
837 | { USB_DEVICE(0x1740, 0x9801), USB_DEVICE_DATA(&rt2800usb_ops) }, | 988 | { USB_DEVICE(0x1740, 0x9801) }, |
838 | /* I-O DATA */ | 989 | /* I-O DATA */ |
839 | { USB_DEVICE(0x04bb, 0x0944), USB_DEVICE_DATA(&rt2800usb_ops) }, | 990 | { USB_DEVICE(0x04bb, 0x0944) }, |
991 | /* Linksys */ | ||
992 | { USB_DEVICE(0x13b1, 0x002f) }, | ||
993 | { USB_DEVICE(0x1737, 0x0079) }, | ||
840 | /* Ralink */ | 994 | /* Ralink */ |
841 | { USB_DEVICE(0x148f, 0x3370), USB_DEVICE_DATA(&rt2800usb_ops) }, | 995 | { USB_DEVICE(0x148f, 0x3572) }, |
842 | { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
843 | { USB_DEVICE(0x148f, 0x8070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
844 | /* Sitecom */ | 996 | /* Sitecom */ |
845 | { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, | 997 | { USB_DEVICE(0x0df6, 0x0041) }, |
846 | { USB_DEVICE(0x0df6, 0x0050), USB_DEVICE_DATA(&rt2800usb_ops) }, | 998 | /* Toshiba */ |
999 | { USB_DEVICE(0x0930, 0x0a07) }, | ||
847 | /* Zinwell */ | 1000 | /* Zinwell */ |
848 | { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1001 | { USB_DEVICE(0x5a57, 0x0284) }, |
1002 | #endif | ||
1003 | #ifdef CONFIG_RT2800USB_RT53XX | ||
1004 | /* Azurewave */ | ||
1005 | { USB_DEVICE(0x13d3, 0x3329) }, | ||
1006 | { USB_DEVICE(0x13d3, 0x3365) }, | ||
1007 | /* Ralink */ | ||
1008 | { USB_DEVICE(0x148f, 0x5370) }, | ||
1009 | { USB_DEVICE(0x148f, 0x5372) }, | ||
849 | #endif | 1010 | #endif |
850 | #ifdef CONFIG_RT2800USB_UNKNOWN | 1011 | #ifdef CONFIG_RT2800USB_UNKNOWN |
851 | /* | 1012 | /* |
852 | * Unclear what kind of devices these are (they aren't supported by the | 1013 | * Unclear what kind of devices these are (they aren't supported by the |
853 | * vendor linux driver). | 1014 | * vendor linux driver). |
854 | */ | 1015 | */ |
1016 | /* Abocom */ | ||
1017 | { USB_DEVICE(0x07b8, 0x3073) }, | ||
1018 | { USB_DEVICE(0x07b8, 0x3074) }, | ||
1019 | /* Alpha Networks */ | ||
1020 | { USB_DEVICE(0x14b2, 0x3c08) }, | ||
1021 | { USB_DEVICE(0x14b2, 0x3c11) }, | ||
855 | /* Amigo */ | 1022 | /* Amigo */ |
856 | { USB_DEVICE(0x0e0b, 0x9031), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1023 | { USB_DEVICE(0x0e0b, 0x9031) }, |
857 | { USB_DEVICE(0x0e0b, 0x9041), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1024 | { USB_DEVICE(0x0e0b, 0x9041) }, |
858 | /* ASUS */ | 1025 | /* ASUS */ |
859 | { USB_DEVICE(0x0b05, 0x1760), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1026 | { USB_DEVICE(0x0b05, 0x166a) }, |
860 | { USB_DEVICE(0x0b05, 0x1761), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1027 | { USB_DEVICE(0x0b05, 0x1760) }, |
861 | { USB_DEVICE(0x0b05, 0x1790), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1028 | { USB_DEVICE(0x0b05, 0x1761) }, |
862 | { USB_DEVICE(0x1761, 0x0b05), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1029 | { USB_DEVICE(0x0b05, 0x1790) }, |
1030 | { USB_DEVICE(0x0b05, 0x179d) }, | ||
863 | /* AzureWave */ | 1031 | /* AzureWave */ |
864 | { USB_DEVICE(0x13d3, 0x3262), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1032 | { USB_DEVICE(0x13d3, 0x3262) }, |
865 | { USB_DEVICE(0x13d3, 0x3284), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1033 | { USB_DEVICE(0x13d3, 0x3284) }, |
866 | { USB_DEVICE(0x13d3, 0x3322), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1034 | { USB_DEVICE(0x13d3, 0x3322) }, |
867 | /* Belkin */ | 1035 | /* Belkin */ |
868 | { USB_DEVICE(0x050d, 0x825a), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1036 | { USB_DEVICE(0x050d, 0x1003) }, |
1037 | { USB_DEVICE(0x050d, 0x825a) }, | ||
869 | /* Buffalo */ | 1038 | /* Buffalo */ |
870 | { USB_DEVICE(0x0411, 0x012e), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1039 | { USB_DEVICE(0x0411, 0x012e) }, |
871 | { USB_DEVICE(0x0411, 0x0148), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1040 | { USB_DEVICE(0x0411, 0x0148) }, |
872 | { USB_DEVICE(0x0411, 0x0150), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1041 | { USB_DEVICE(0x0411, 0x0150) }, |
873 | { USB_DEVICE(0x0411, 0x015d), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1042 | { USB_DEVICE(0x0411, 0x015d) }, |
874 | /* Conceptronic */ | ||
875 | { USB_DEVICE(0x14b2, 0x3c08), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
876 | { USB_DEVICE(0x14b2, 0x3c11), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
877 | /* Corega */ | 1043 | /* Corega */ |
878 | { USB_DEVICE(0x07aa, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1044 | { USB_DEVICE(0x07aa, 0x0041) }, |
879 | { USB_DEVICE(0x07aa, 0x0042), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1045 | { USB_DEVICE(0x07aa, 0x0042) }, |
880 | { USB_DEVICE(0x18c5, 0x0008), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1046 | { USB_DEVICE(0x18c5, 0x0008) }, |
881 | /* D-Link */ | 1047 | /* D-Link */ |
882 | { USB_DEVICE(0x07d1, 0x3c0b), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1048 | { USB_DEVICE(0x07d1, 0x3c0b) }, |
883 | { USB_DEVICE(0x07d1, 0x3c13), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1049 | { USB_DEVICE(0x07d1, 0x3c13) }, |
884 | { USB_DEVICE(0x07d1, 0x3c15), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1050 | { USB_DEVICE(0x07d1, 0x3c15) }, |
885 | { USB_DEVICE(0x07d1, 0x3c17), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1051 | { USB_DEVICE(0x07d1, 0x3c17) }, |
1052 | { USB_DEVICE(0x2001, 0x3c17) }, | ||
1053 | /* Edimax */ | ||
1054 | { USB_DEVICE(0x7392, 0x4085) }, | ||
1055 | { USB_DEVICE(0x7392, 0x7722) }, | ||
886 | /* Encore */ | 1056 | /* Encore */ |
887 | { USB_DEVICE(0x203d, 0x14a1), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1057 | { USB_DEVICE(0x203d, 0x14a1) }, |
888 | /* Gemtek */ | 1058 | /* Gemtek */ |
889 | { USB_DEVICE(0x15a9, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1059 | { USB_DEVICE(0x15a9, 0x0010) }, |
890 | /* Gigabyte */ | 1060 | /* Gigabyte */ |
891 | { USB_DEVICE(0x1044, 0x800c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1061 | { USB_DEVICE(0x1044, 0x800c) }, |
1062 | /* Huawei */ | ||
1063 | { USB_DEVICE(0x148f, 0xf101) }, | ||
1064 | /* I-O DATA */ | ||
1065 | { USB_DEVICE(0x04bb, 0x094b) }, | ||
892 | /* LevelOne */ | 1066 | /* LevelOne */ |
893 | { USB_DEVICE(0x1740, 0x0605), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1067 | { USB_DEVICE(0x1740, 0x0605) }, |
894 | { USB_DEVICE(0x1740, 0x0615), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1068 | { USB_DEVICE(0x1740, 0x0615) }, |
895 | /* Linksys */ | 1069 | /* Linksys */ |
896 | { USB_DEVICE(0x1737, 0x0077), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1070 | { USB_DEVICE(0x1737, 0x0077) }, |
897 | { USB_DEVICE(0x1737, 0x0078), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1071 | { USB_DEVICE(0x1737, 0x0078) }, |
898 | { USB_DEVICE(0x1737, 0x0079), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1072 | /* Logitec */ |
1073 | { USB_DEVICE(0x0789, 0x0168) }, | ||
1074 | { USB_DEVICE(0x0789, 0x0169) }, | ||
899 | /* Motorola */ | 1075 | /* Motorola */ |
900 | { USB_DEVICE(0x100d, 0x9032), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1076 | { USB_DEVICE(0x100d, 0x9032) }, |
901 | /* Ovislink */ | 1077 | /* Ovislink */ |
902 | { USB_DEVICE(0x1b75, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1078 | { USB_DEVICE(0x1b75, 0x3071) }, |
903 | { USB_DEVICE(0x1b75, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1079 | { USB_DEVICE(0x1b75, 0x3072) }, |
904 | /* Pegatron */ | 1080 | /* Pegatron */ |
905 | { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1081 | { USB_DEVICE(0x05a6, 0x0101) }, |
906 | { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1082 | { USB_DEVICE(0x1d4d, 0x0002) }, |
907 | { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1083 | { USB_DEVICE(0x1d4d, 0x0010) }, |
908 | { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
909 | /* Planex */ | 1084 | /* Planex */ |
910 | { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1085 | { USB_DEVICE(0x2019, 0x5201) }, |
1086 | { USB_DEVICE(0x2019, 0xab24) }, | ||
911 | /* Qcom */ | 1087 | /* Qcom */ |
912 | { USB_DEVICE(0x18e8, 0x6259), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1088 | { USB_DEVICE(0x18e8, 0x6259) }, |
1089 | /* RadioShack */ | ||
1090 | { USB_DEVICE(0x08b9, 0x1197) }, | ||
1091 | /* Sitecom */ | ||
1092 | { USB_DEVICE(0x0df6, 0x003c) }, | ||
1093 | { USB_DEVICE(0x0df6, 0x004a) }, | ||
1094 | { USB_DEVICE(0x0df6, 0x004d) }, | ||
1095 | { USB_DEVICE(0x0df6, 0x0053) }, | ||
1096 | { USB_DEVICE(0x0df6, 0x0060) }, | ||
1097 | { USB_DEVICE(0x0df6, 0x0062) }, | ||
913 | /* SMC */ | 1098 | /* SMC */ |
914 | { USB_DEVICE(0x083a, 0xa512), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1099 | { USB_DEVICE(0x083a, 0xa512) }, |
915 | { USB_DEVICE(0x083a, 0xc522), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1100 | { USB_DEVICE(0x083a, 0xc522) }, |
916 | { USB_DEVICE(0x083a, 0xd522), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1101 | { USB_DEVICE(0x083a, 0xd522) }, |
917 | { USB_DEVICE(0x083a, 0xf511), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1102 | { USB_DEVICE(0x083a, 0xf511) }, |
918 | /* Sweex */ | 1103 | /* Sweex */ |
919 | { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1104 | { USB_DEVICE(0x177f, 0x0153) }, |
920 | { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1105 | { USB_DEVICE(0x177f, 0x0313) }, |
921 | /* Zyxel */ | 1106 | /* Zyxel */ |
922 | { USB_DEVICE(0x0586, 0x341a), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1107 | { USB_DEVICE(0x0586, 0x341a) }, |
923 | #endif | 1108 | #endif |
924 | { 0, } | 1109 | { 0, } |
925 | }; | 1110 | }; |
@@ -932,10 +1117,16 @@ MODULE_DEVICE_TABLE(usb, rt2800usb_device_table); | |||
932 | MODULE_FIRMWARE(FIRMWARE_RT2870); | 1117 | MODULE_FIRMWARE(FIRMWARE_RT2870); |
933 | MODULE_LICENSE("GPL"); | 1118 | MODULE_LICENSE("GPL"); |
934 | 1119 | ||
1120 | static int rt2800usb_probe(struct usb_interface *usb_intf, | ||
1121 | const struct usb_device_id *id) | ||
1122 | { | ||
1123 | return rt2x00usb_probe(usb_intf, &rt2800usb_ops); | ||
1124 | } | ||
1125 | |||
935 | static struct usb_driver rt2800usb_driver = { | 1126 | static struct usb_driver rt2800usb_driver = { |
936 | .name = KBUILD_MODNAME, | 1127 | .name = KBUILD_MODNAME, |
937 | .id_table = rt2800usb_device_table, | 1128 | .id_table = rt2800usb_device_table, |
938 | .probe = rt2x00usb_probe, | 1129 | .probe = rt2800usb_probe, |
939 | .disconnect = rt2x00usb_disconnect, | 1130 | .disconnect = rt2x00usb_disconnect, |
940 | .suspend = rt2x00usb_suspend, | 1131 | .suspend = rt2x00usb_suspend, |
941 | .resume = rt2x00usb_resume, | 1132 | .resume = rt2x00usb_resume, |