2 Copyright (C) 2010 Willow Garage <http://www.willowgarage.com>
3 Copyright (C) 2009 - 2010 Ivo van Doorn <IvDoorn@gmail.com>
4 Copyright (C) 2009 Mattias Nissler <mattias.nissler@gmx.de>
5 Copyright (C) 2009 Felix Fietkau <nbd@openwrt.org>
6 Copyright (C) 2009 Xose Vazquez Perez <xose.vazquez@gmail.com>
7 Copyright (C) 2009 Axel Kollhofer <rain_maker@root-forum.org>
8 <http://rt2x00.serialmonkey.com>
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, see <http://www.gnu.org/licenses/>.
26 Abstract: rt2800usb device specific routines.
27 Supported chipsets: RT2800U.
30 #include <linux/delay.h>
31 #include <linux/etherdevice.h>
32 #include <linux/kernel.h>
33 #include <linux/module.h>
34 #include <linux/usb.h>
37 #include "rt2x00usb.h"
38 #include "rt2800lib.h"
40 #include "rt2800usb.h"
43 * Allow hardware encryption to be disabled.
45 static bool modparam_nohwcrypt
;
46 module_param_named(nohwcrypt
, modparam_nohwcrypt
, bool, 0444);
47 MODULE_PARM_DESC(nohwcrypt
, "Disable hardware encryption.");
49 static bool rt2800usb_hwcrypt_disabled(struct rt2x00_dev
*rt2x00dev
)
51 return modparam_nohwcrypt
;
57 static void rt2800usb_start_queue(struct data_queue
*queue
)
59 struct rt2x00_dev
*rt2x00dev
= queue
->rt2x00dev
;
64 reg
= rt2x00usb_register_read(rt2x00dev
, MAC_SYS_CTRL
);
65 rt2x00_set_field32(®
, MAC_SYS_CTRL_ENABLE_RX
, 1);
66 rt2x00usb_register_write(rt2x00dev
, MAC_SYS_CTRL
, reg
);
69 reg
= rt2x00usb_register_read(rt2x00dev
, BCN_TIME_CFG
);
70 rt2x00_set_field32(®
, BCN_TIME_CFG_TSF_TICKING
, 1);
71 rt2x00_set_field32(®
, BCN_TIME_CFG_TBTT_ENABLE
, 1);
72 rt2x00_set_field32(®
, BCN_TIME_CFG_BEACON_GEN
, 1);
73 rt2x00usb_register_write(rt2x00dev
, BCN_TIME_CFG
, reg
);
80 static void rt2800usb_stop_queue(struct data_queue
*queue
)
82 struct rt2x00_dev
*rt2x00dev
= queue
->rt2x00dev
;
87 reg
= rt2x00usb_register_read(rt2x00dev
, MAC_SYS_CTRL
);
88 rt2x00_set_field32(®
, MAC_SYS_CTRL_ENABLE_RX
, 0);
89 rt2x00usb_register_write(rt2x00dev
, MAC_SYS_CTRL
, reg
);
92 reg
= rt2x00usb_register_read(rt2x00dev
, BCN_TIME_CFG
);
93 rt2x00_set_field32(®
, BCN_TIME_CFG_TSF_TICKING
, 0);
94 rt2x00_set_field32(®
, BCN_TIME_CFG_TBTT_ENABLE
, 0);
95 rt2x00_set_field32(®
, BCN_TIME_CFG_BEACON_GEN
, 0);
96 rt2x00usb_register_write(rt2x00dev
, BCN_TIME_CFG
, reg
);
103 #define TXSTATUS_READ_INTERVAL 1000000
105 static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev
*rt2x00dev
,
106 int urb_status
, u32 tx_status
)
111 rt2x00_warn(rt2x00dev
, "TX status read failed %d\n",
117 valid
= rt2x00_get_field32(tx_status
, TX_STA_FIFO_VALID
);
119 if (!kfifo_put(&rt2x00dev
->txstatus_fifo
, tx_status
))
120 rt2x00_warn(rt2x00dev
, "TX status FIFO overrun\n");
122 queue_work(rt2x00dev
->workqueue
, &rt2x00dev
->txdone_work
);
124 /* Reschedule urb to read TX status again instantly */
128 /* Check if there is any entry that timedout waiting on TX status */
129 if (rt2800_txstatus_timeout(rt2x00dev
))
130 queue_work(rt2x00dev
->workqueue
, &rt2x00dev
->txdone_work
);
132 if (rt2800_txstatus_pending(rt2x00dev
)) {
133 /* Read register after 1 ms */
134 hrtimer_start(&rt2x00dev
->txstatus_timer
,
135 TXSTATUS_READ_INTERVAL
,
141 clear_bit(TX_STATUS_READING
, &rt2x00dev
->flags
);
143 * There is small race window above, between txstatus pending check and
144 * clear_bit someone could do rt2x00usb_interrupt_txdone, so recheck
145 * here again if status reading is needed.
147 if (rt2800_txstatus_pending(rt2x00dev
) &&
148 !test_and_set_bit(TX_STATUS_READING
, &rt2x00dev
->flags
))
154 static void rt2800usb_async_read_tx_status(struct rt2x00_dev
*rt2x00dev
)
157 if (test_and_set_bit(TX_STATUS_READING
, &rt2x00dev
->flags
))
160 /* Read TX_STA_FIFO register after 2 ms */
161 hrtimer_start(&rt2x00dev
->txstatus_timer
,
162 2 * TXSTATUS_READ_INTERVAL
,
166 static void rt2800usb_tx_dma_done(struct queue_entry
*entry
)
168 struct rt2x00_dev
*rt2x00dev
= entry
->queue
->rt2x00dev
;
170 rt2800usb_async_read_tx_status(rt2x00dev
);
173 static enum hrtimer_restart
rt2800usb_tx_sta_fifo_timeout(struct hrtimer
*timer
)
175 struct rt2x00_dev
*rt2x00dev
=
176 container_of(timer
, struct rt2x00_dev
, txstatus_timer
);
178 rt2x00usb_register_read_async(rt2x00dev
, TX_STA_FIFO
,
179 rt2800usb_tx_sta_fifo_read_completed
);
181 return HRTIMER_NORESTART
;
187 static int rt2800usb_autorun_detect(struct rt2x00_dev
*rt2x00dev
)
193 reg
= kmalloc(sizeof(*reg
), GFP_KERNEL
);
196 /* cannot use rt2x00usb_register_read here as it uses different
197 * mode (MULTI_READ vs. DEVICE_MODE) and does not pass the
198 * magic value USB_MODE_AUTORUN (0x11) to the device, thus the
199 * returned value would be invalid.
201 ret
= rt2x00usb_vendor_request(rt2x00dev
, USB_DEVICE_MODE
,
202 USB_VENDOR_REQUEST_IN
, 0,
203 USB_MODE_AUTORUN
, reg
, sizeof(*reg
),
204 REGISTER_TIMEOUT_FIRMWARE
);
205 fw_mode
= le32_to_cpu(*reg
);
210 if ((fw_mode
& 0x00000003) == 2)
216 static char *rt2800usb_get_firmware_name(struct rt2x00_dev
*rt2x00dev
)
218 return FIRMWARE_RT2870
;
221 static int rt2800usb_write_firmware(struct rt2x00_dev
*rt2x00dev
,
222 const u8
*data
, const size_t len
)
230 * Check which section of the firmware we need.
232 if (rt2x00_rt(rt2x00dev
, RT2860
) ||
233 rt2x00_rt(rt2x00dev
, RT2872
) ||
234 rt2x00_rt(rt2x00dev
, RT3070
)) {
243 * Write firmware to device.
245 retval
= rt2800usb_autorun_detect(rt2x00dev
);
249 rt2x00_info(rt2x00dev
,
250 "Firmware loading not required - NIC in AutoRun mode\n");
251 __clear_bit(REQUIRE_FIRMWARE
, &rt2x00dev
->cap_flags
);
253 rt2x00usb_register_multiwrite(rt2x00dev
, FIRMWARE_IMAGE_BASE
,
254 data
+ offset
, length
);
257 rt2x00usb_register_write(rt2x00dev
, H2M_MAILBOX_CID
, ~0);
258 rt2x00usb_register_write(rt2x00dev
, H2M_MAILBOX_STATUS
, ~0);
261 * Send firmware request to device to load firmware,
262 * we need to specify a long timeout time.
264 status
= rt2x00usb_vendor_request_sw(rt2x00dev
, USB_DEVICE_MODE
,
265 0, USB_MODE_FIRMWARE
,
266 REGISTER_TIMEOUT_FIRMWARE
);
268 rt2x00_err(rt2x00dev
, "Failed to write Firmware to device\n");
273 rt2x00usb_register_write(rt2x00dev
, H2M_MAILBOX_CSR
, 0);
279 * Device state switch handlers.
281 static int rt2800usb_init_registers(struct rt2x00_dev
*rt2x00dev
)
286 * Wait until BBP and RF are ready.
288 if (rt2800_wait_csr_ready(rt2x00dev
))
291 reg
= rt2x00usb_register_read(rt2x00dev
, PBF_SYS_CTRL
);
292 rt2x00usb_register_write(rt2x00dev
, PBF_SYS_CTRL
, reg
& ~0x00002000);
295 rt2x00_set_field32(®
, MAC_SYS_CTRL_RESET_CSR
, 1);
296 rt2x00_set_field32(®
, MAC_SYS_CTRL_RESET_BBP
, 1);
297 rt2x00usb_register_write(rt2x00dev
, MAC_SYS_CTRL
, reg
);
299 rt2x00usb_vendor_request_sw(rt2x00dev
, USB_DEVICE_MODE
, 0,
300 USB_MODE_RESET
, REGISTER_TIMEOUT
);
302 rt2x00usb_register_write(rt2x00dev
, MAC_SYS_CTRL
, 0x00000000);
307 static int rt2800usb_enable_radio(struct rt2x00_dev
*rt2x00dev
)
311 if (unlikely(rt2800_wait_wpdma_ready(rt2x00dev
)))
314 rt2x00_set_field32(®
, USB_DMA_CFG_PHY_CLEAR
, 0);
315 rt2x00_set_field32(®
, USB_DMA_CFG_RX_BULK_AGG_EN
, 0);
316 rt2x00_set_field32(®
, USB_DMA_CFG_RX_BULK_AGG_TIMEOUT
, 128);
318 * Total room for RX frames in kilobytes, PBF might still exceed
319 * this limit so reduce the number to prevent errors.
321 rt2x00_set_field32(®
, USB_DMA_CFG_RX_BULK_AGG_LIMIT
,
322 ((rt2x00dev
->rx
->limit
* DATA_FRAME_SIZE
)
324 rt2x00_set_field32(®
, USB_DMA_CFG_RX_BULK_EN
, 1);
325 rt2x00_set_field32(®
, USB_DMA_CFG_TX_BULK_EN
, 1);
326 rt2x00usb_register_write(rt2x00dev
, USB_DMA_CFG
, reg
);
328 return rt2800_enable_radio(rt2x00dev
);
331 static void rt2800usb_disable_radio(struct rt2x00_dev
*rt2x00dev
)
333 rt2800_disable_radio(rt2x00dev
);
336 static int rt2800usb_set_state(struct rt2x00_dev
*rt2x00dev
,
337 enum dev_state state
)
339 if (state
== STATE_AWAKE
)
340 rt2800_mcu_request(rt2x00dev
, MCU_WAKEUP
, 0xff, 0, 2);
342 rt2800_mcu_request(rt2x00dev
, MCU_SLEEP
, 0xff, 0xff, 2);
347 static int rt2800usb_set_device_state(struct rt2x00_dev
*rt2x00dev
,
348 enum dev_state state
)
355 * Before the radio can be enabled, the device first has
356 * to be woken up. After that it needs a bit of time
357 * to be fully awake and then the radio can be enabled.
359 rt2800usb_set_state(rt2x00dev
, STATE_AWAKE
);
361 retval
= rt2800usb_enable_radio(rt2x00dev
);
363 case STATE_RADIO_OFF
:
365 * After the radio has been disabled, the device should
366 * be put to sleep for powersaving.
368 rt2800usb_disable_radio(rt2x00dev
);
369 rt2800usb_set_state(rt2x00dev
, STATE_SLEEP
);
371 case STATE_RADIO_IRQ_ON
:
372 case STATE_RADIO_IRQ_OFF
:
373 /* No support, but no error either */
375 case STATE_DEEP_SLEEP
:
379 retval
= rt2800usb_set_state(rt2x00dev
, state
);
386 if (unlikely(retval
))
387 rt2x00_err(rt2x00dev
, "Device failed to enter state %d (%d)\n",
394 * TX descriptor initialization
396 static __le32
*rt2800usb_get_txwi(struct queue_entry
*entry
)
398 if (entry
->queue
->qid
== QID_BEACON
)
399 return (__le32
*) (entry
->skb
->data
);
401 return (__le32
*) (entry
->skb
->data
+ TXINFO_DESC_SIZE
);
404 static void rt2800usb_write_tx_desc(struct queue_entry
*entry
,
405 struct txentry_desc
*txdesc
)
407 struct skb_frame_desc
*skbdesc
= get_skb_frame_desc(entry
->skb
);
408 __le32
*txi
= (__le32
*) entry
->skb
->data
;
412 * Initialize TXINFO descriptor
414 word
= rt2x00_desc_read(txi
, 0);
417 * The size of TXINFO_W0_USB_DMA_TX_PKT_LEN is
418 * TXWI + 802.11 header + L2 pad + payload + pad,
419 * so need to decrease size of TXINFO.
421 rt2x00_set_field32(&word
, TXINFO_W0_USB_DMA_TX_PKT_LEN
,
422 roundup(entry
->skb
->len
, 4) - TXINFO_DESC_SIZE
);
423 rt2x00_set_field32(&word
, TXINFO_W0_WIV
,
424 !test_bit(ENTRY_TXD_ENCRYPT_IV
, &txdesc
->flags
));
425 rt2x00_set_field32(&word
, TXINFO_W0_QSEL
, 2);
426 rt2x00_set_field32(&word
, TXINFO_W0_SW_USE_LAST_ROUND
, 0);
427 rt2x00_set_field32(&word
, TXINFO_W0_USB_DMA_NEXT_VALID
, 0);
428 rt2x00_set_field32(&word
, TXINFO_W0_USB_DMA_TX_BURST
,
429 test_bit(ENTRY_TXD_BURST
, &txdesc
->flags
));
430 rt2x00_desc_write(txi
, 0, word
);
433 * Register descriptor details in skb frame descriptor.
435 skbdesc
->flags
|= SKBDESC_DESC_IN_SKB
;
437 skbdesc
->desc_len
= TXINFO_DESC_SIZE
+ entry
->queue
->winfo_size
;
441 * TX data initialization
443 static int rt2800usb_get_tx_data_len(struct queue_entry
*entry
)
446 * pad(1~3 bytes) is needed after each 802.11 payload.
447 * USB end pad(4 bytes) is needed at each USB bulk out packet end.
448 * TX frame format is :
449 * | TXINFO | TXWI | 802.11 header | L2 pad | payload | pad | USB end pad |
450 * |<------------- tx_pkt_len ------------->|
453 return roundup(entry
->skb
->len
, 4) + 4;
457 * TX control handlers
459 static void rt2800usb_work_txdone(struct work_struct
*work
)
461 struct rt2x00_dev
*rt2x00dev
=
462 container_of(work
, struct rt2x00_dev
, txdone_work
);
464 while (!kfifo_is_empty(&rt2x00dev
->txstatus_fifo
) ||
465 rt2800_txstatus_timeout(rt2x00dev
)) {
467 rt2800_txdone(rt2x00dev
, UINT_MAX
);
469 rt2800_txdone_nostatus(rt2x00dev
);
472 * The hw may delay sending the packet after DMA complete
473 * if the medium is busy, thus the TX_STA_FIFO entry is
474 * also delayed -> use a timer to retrieve it.
476 if (rt2800_txstatus_pending(rt2x00dev
))
477 rt2800usb_async_read_tx_status(rt2x00dev
);
482 * RX control handlers
484 static void rt2800usb_fill_rxdone(struct queue_entry
*entry
,
485 struct rxdone_entry_desc
*rxdesc
)
487 struct skb_frame_desc
*skbdesc
= get_skb_frame_desc(entry
->skb
);
488 __le32
*rxi
= (__le32
*)entry
->skb
->data
;
494 * Copy descriptor to the skbdesc->desc buffer, making it safe from
495 * moving of frame data in rt2x00usb.
497 memcpy(skbdesc
->desc
, rxi
, skbdesc
->desc_len
);
500 * RX frame format is :
501 * | RXINFO | RXWI | header | L2 pad | payload | pad | RXD | USB pad |
502 * |<------------ rx_pkt_len -------------->|
504 word
= rt2x00_desc_read(rxi
, 0);
505 rx_pkt_len
= rt2x00_get_field32(word
, RXINFO_W0_USB_DMA_RX_PKT_LEN
);
508 * Remove the RXINFO structure from the sbk.
510 skb_pull(entry
->skb
, RXINFO_DESC_SIZE
);
513 * Check for rx_pkt_len validity. Return if invalid, leaving
514 * rxdesc->size zeroed out by the upper level.
516 if (unlikely(rx_pkt_len
== 0 ||
517 rx_pkt_len
> entry
->queue
->data_size
)) {
518 rt2x00_err(entry
->queue
->rt2x00dev
,
519 "Bad frame size %d, forcing to 0\n", rx_pkt_len
);
523 rxd
= (__le32
*)(entry
->skb
->data
+ rx_pkt_len
);
526 * It is now safe to read the descriptor on all architectures.
528 word
= rt2x00_desc_read(rxd
, 0);
530 if (rt2x00_get_field32(word
, RXD_W0_CRC_ERROR
))
531 rxdesc
->flags
|= RX_FLAG_FAILED_FCS_CRC
;
533 rxdesc
->cipher_status
= rt2x00_get_field32(word
, RXD_W0_CIPHER_ERROR
);
535 if (rt2x00_get_field32(word
, RXD_W0_DECRYPTED
)) {
537 * Hardware has stripped IV/EIV data from 802.11 frame during
538 * decryption. Unfortunately the descriptor doesn't contain
539 * any fields with the EIV/IV data either, so they can't
540 * be restored by rt2x00lib.
542 rxdesc
->flags
|= RX_FLAG_IV_STRIPPED
;
545 * The hardware has already checked the Michael Mic and has
546 * stripped it from the frame. Signal this to mac80211.
548 rxdesc
->flags
|= RX_FLAG_MMIC_STRIPPED
;
550 if (rxdesc
->cipher_status
== RX_CRYPTO_SUCCESS
) {
551 rxdesc
->flags
|= RX_FLAG_DECRYPTED
;
552 } else if (rxdesc
->cipher_status
== RX_CRYPTO_FAIL_MIC
) {
554 * In order to check the Michael Mic, the packet must have
555 * been decrypted. Mac80211 doesnt check the MMIC failure
556 * flag to initiate MMIC countermeasures if the decoded flag
559 rxdesc
->flags
|= RX_FLAG_DECRYPTED
;
561 rxdesc
->flags
|= RX_FLAG_MMIC_ERROR
;
565 if (rt2x00_get_field32(word
, RXD_W0_MY_BSS
))
566 rxdesc
->dev_flags
|= RXDONE_MY_BSS
;
568 if (rt2x00_get_field32(word
, RXD_W0_L2PAD
))
569 rxdesc
->dev_flags
|= RXDONE_L2PAD
;
572 * Remove RXD descriptor from end of buffer.
574 skb_trim(entry
->skb
, rx_pkt_len
);
577 * Process the RXWI structure.
579 rt2800_process_rxwi(entry
, rxdesc
);
583 * Device probe functions.
585 static int rt2800usb_efuse_detect(struct rt2x00_dev
*rt2x00dev
)
589 retval
= rt2800usb_autorun_detect(rt2x00dev
);
594 return rt2800_efuse_detect(rt2x00dev
);
597 static int rt2800usb_read_eeprom(struct rt2x00_dev
*rt2x00dev
)
601 retval
= rt2800usb_efuse_detect(rt2x00dev
);
605 retval
= rt2800_read_eeprom_efuse(rt2x00dev
);
607 retval
= rt2x00usb_eeprom_read(rt2x00dev
, rt2x00dev
->eeprom
,
613 static int rt2800usb_probe_hw(struct rt2x00_dev
*rt2x00dev
)
617 retval
= rt2800_probe_hw(rt2x00dev
);
622 * Set txstatus timer function.
624 rt2x00dev
->txstatus_timer
.function
= rt2800usb_tx_sta_fifo_timeout
;
627 * Overwrite TX done handler
629 INIT_WORK(&rt2x00dev
->txdone_work
, rt2800usb_work_txdone
);
634 static const struct ieee80211_ops rt2800usb_mac80211_ops
= {
636 .start
= rt2x00mac_start
,
637 .stop
= rt2x00mac_stop
,
638 .add_interface
= rt2x00mac_add_interface
,
639 .remove_interface
= rt2x00mac_remove_interface
,
640 .config
= rt2x00mac_config
,
641 .configure_filter
= rt2x00mac_configure_filter
,
642 .set_tim
= rt2x00mac_set_tim
,
643 .set_key
= rt2x00mac_set_key
,
644 .sw_scan_start
= rt2x00mac_sw_scan_start
,
645 .sw_scan_complete
= rt2x00mac_sw_scan_complete
,
646 .get_stats
= rt2x00mac_get_stats
,
647 .get_key_seq
= rt2800_get_key_seq
,
648 .set_rts_threshold
= rt2800_set_rts_threshold
,
649 .sta_add
= rt2800_sta_add
,
650 .sta_remove
= rt2800_sta_remove
,
651 .bss_info_changed
= rt2x00mac_bss_info_changed
,
652 .conf_tx
= rt2800_conf_tx
,
653 .get_tsf
= rt2800_get_tsf
,
654 .rfkill_poll
= rt2x00mac_rfkill_poll
,
655 .ampdu_action
= rt2800_ampdu_action
,
656 .flush
= rt2x00mac_flush
,
657 .get_survey
= rt2800_get_survey
,
658 .get_ringparam
= rt2x00mac_get_ringparam
,
659 .tx_frames_pending
= rt2x00mac_tx_frames_pending
,
662 static const struct rt2800_ops rt2800usb_rt2800_ops
= {
663 .register_read
= rt2x00usb_register_read
,
664 .register_read_lock
= rt2x00usb_register_read_lock
,
665 .register_write
= rt2x00usb_register_write
,
666 .register_write_lock
= rt2x00usb_register_write_lock
,
667 .register_multiread
= rt2x00usb_register_multiread
,
668 .register_multiwrite
= rt2x00usb_register_multiwrite
,
669 .regbusy_read
= rt2x00usb_regbusy_read
,
670 .read_eeprom
= rt2800usb_read_eeprom
,
671 .hwcrypt_disabled
= rt2800usb_hwcrypt_disabled
,
672 .drv_write_firmware
= rt2800usb_write_firmware
,
673 .drv_init_registers
= rt2800usb_init_registers
,
674 .drv_get_txwi
= rt2800usb_get_txwi
,
677 static const struct rt2x00lib_ops rt2800usb_rt2x00_ops
= {
678 .probe_hw
= rt2800usb_probe_hw
,
679 .get_firmware_name
= rt2800usb_get_firmware_name
,
680 .check_firmware
= rt2800_check_firmware
,
681 .load_firmware
= rt2800_load_firmware
,
682 .initialize
= rt2x00usb_initialize
,
683 .uninitialize
= rt2x00usb_uninitialize
,
684 .clear_entry
= rt2x00usb_clear_entry
,
685 .set_device_state
= rt2800usb_set_device_state
,
686 .rfkill_poll
= rt2800_rfkill_poll
,
687 .link_stats
= rt2800_link_stats
,
688 .reset_tuner
= rt2800_reset_tuner
,
689 .link_tuner
= rt2800_link_tuner
,
690 .gain_calibration
= rt2800_gain_calibration
,
691 .vco_calibration
= rt2800_vco_calibration
,
692 .start_queue
= rt2800usb_start_queue
,
693 .kick_queue
= rt2x00usb_kick_queue
,
694 .stop_queue
= rt2800usb_stop_queue
,
695 .flush_queue
= rt2x00usb_flush_queue
,
696 .tx_dma_done
= rt2800usb_tx_dma_done
,
697 .write_tx_desc
= rt2800usb_write_tx_desc
,
698 .write_tx_data
= rt2800_write_tx_data
,
699 .write_beacon
= rt2800_write_beacon
,
700 .clear_beacon
= rt2800_clear_beacon
,
701 .get_tx_data_len
= rt2800usb_get_tx_data_len
,
702 .fill_rxdone
= rt2800usb_fill_rxdone
,
703 .config_shared_key
= rt2800_config_shared_key
,
704 .config_pairwise_key
= rt2800_config_pairwise_key
,
705 .config_filter
= rt2800_config_filter
,
706 .config_intf
= rt2800_config_intf
,
707 .config_erp
= rt2800_config_erp
,
708 .config_ant
= rt2800_config_ant
,
709 .config
= rt2800_config
,
712 static void rt2800usb_queue_init(struct data_queue
*queue
)
714 struct rt2x00_dev
*rt2x00dev
= queue
->rt2x00dev
;
715 unsigned short txwi_size
, rxwi_size
;
717 rt2800_get_txwi_rxwi_size(rt2x00dev
, &txwi_size
, &rxwi_size
);
719 switch (queue
->qid
) {
722 queue
->data_size
= AGGREGATION_SIZE
;
723 queue
->desc_size
= RXINFO_DESC_SIZE
;
724 queue
->winfo_size
= rxwi_size
;
725 queue
->priv_size
= sizeof(struct queue_entry_priv_usb
);
733 queue
->data_size
= AGGREGATION_SIZE
;
734 queue
->desc_size
= TXINFO_DESC_SIZE
;
735 queue
->winfo_size
= txwi_size
;
736 queue
->priv_size
= sizeof(struct queue_entry_priv_usb
);
741 queue
->data_size
= MGMT_FRAME_SIZE
;
742 queue
->desc_size
= TXINFO_DESC_SIZE
;
743 queue
->winfo_size
= txwi_size
;
744 queue
->priv_size
= sizeof(struct queue_entry_priv_usb
);
755 static const struct rt2x00_ops rt2800usb_ops
= {
756 .name
= KBUILD_MODNAME
,
757 .drv_data_size
= sizeof(struct rt2800_drv_data
),
759 .eeprom_size
= EEPROM_SIZE
,
761 .tx_queues
= NUM_TX_QUEUES
,
762 .queue_init
= rt2800usb_queue_init
,
763 .lib
= &rt2800usb_rt2x00_ops
,
764 .drv
= &rt2800usb_rt2800_ops
,
765 .hw
= &rt2800usb_mac80211_ops
,
766 #ifdef CONFIG_RT2X00_LIB_DEBUGFS
767 .debugfs
= &rt2800_rt2x00debug
,
768 #endif /* CONFIG_RT2X00_LIB_DEBUGFS */
772 * rt2800usb module information.
774 static const struct usb_device_id rt2800usb_device_table
[] = {
776 { USB_DEVICE(0x07b8, 0x2870) },
777 { USB_DEVICE(0x07b8, 0x2770) },
778 { USB_DEVICE(0x07b8, 0x3070) },
779 { USB_DEVICE(0x07b8, 0x3071) },
780 { USB_DEVICE(0x07b8, 0x3072) },
781 { USB_DEVICE(0x1482, 0x3c09) },
783 { USB_DEVICE(0x1eda, 0x2012) },
784 { USB_DEVICE(0x1eda, 0x2210) },
785 { USB_DEVICE(0x1eda, 0x2310) },
787 { USB_DEVICE(0x8516, 0x2070) },
788 { USB_DEVICE(0x8516, 0x2770) },
789 { USB_DEVICE(0x8516, 0x2870) },
790 { USB_DEVICE(0x8516, 0x3070) },
791 { USB_DEVICE(0x8516, 0x3071) },
792 { USB_DEVICE(0x8516, 0x3072) },
794 { USB_DEVICE(0x14b2, 0x3c06) },
795 { USB_DEVICE(0x14b2, 0x3c07) },
796 { USB_DEVICE(0x14b2, 0x3c09) },
797 { USB_DEVICE(0x14b2, 0x3c12) },
798 { USB_DEVICE(0x14b2, 0x3c23) },
799 { USB_DEVICE(0x14b2, 0x3c25) },
800 { USB_DEVICE(0x14b2, 0x3c27) },
801 { USB_DEVICE(0x14b2, 0x3c28) },
802 { USB_DEVICE(0x14b2, 0x3c2c) },
804 { USB_DEVICE(0x15c5, 0x0008) },
806 { USB_DEVICE(0x1690, 0x0740) },
808 { USB_DEVICE(0x0b05, 0x1731) },
809 { USB_DEVICE(0x0b05, 0x1732) },
810 { USB_DEVICE(0x0b05, 0x1742) },
811 { USB_DEVICE(0x0b05, 0x1784) },
812 { USB_DEVICE(0x1761, 0x0b05) },
814 { USB_DEVICE(0x13d3, 0x3247) },
815 { USB_DEVICE(0x13d3, 0x3273) },
816 { USB_DEVICE(0x13d3, 0x3305) },
817 { USB_DEVICE(0x13d3, 0x3307) },
818 { USB_DEVICE(0x13d3, 0x3321) },
820 { USB_DEVICE(0x050d, 0x8053) },
821 { USB_DEVICE(0x050d, 0x805c) },
822 { USB_DEVICE(0x050d, 0x815c) },
823 { USB_DEVICE(0x050d, 0x825a) },
824 { USB_DEVICE(0x050d, 0x825b) },
825 { USB_DEVICE(0x050d, 0x935a) },
826 { USB_DEVICE(0x050d, 0x935b) },
828 { USB_DEVICE(0x0411, 0x00e8) },
829 { USB_DEVICE(0x0411, 0x0158) },
830 { USB_DEVICE(0x0411, 0x015d) },
831 { USB_DEVICE(0x0411, 0x016f) },
832 { USB_DEVICE(0x0411, 0x01a2) },
833 { USB_DEVICE(0x0411, 0x01ee) },
834 { USB_DEVICE(0x0411, 0x01a8) },
835 { USB_DEVICE(0x0411, 0x01fd) },
837 { USB_DEVICE(0x07aa, 0x002f) },
838 { USB_DEVICE(0x07aa, 0x003c) },
839 { USB_DEVICE(0x07aa, 0x003f) },
840 { USB_DEVICE(0x18c5, 0x0012) },
842 { USB_DEVICE(0x07d1, 0x3c09) },
843 { USB_DEVICE(0x07d1, 0x3c0a) },
844 { USB_DEVICE(0x07d1, 0x3c0d) },
845 { USB_DEVICE(0x07d1, 0x3c0e) },
846 { USB_DEVICE(0x07d1, 0x3c0f) },
847 { USB_DEVICE(0x07d1, 0x3c11) },
848 { USB_DEVICE(0x07d1, 0x3c13) },
849 { USB_DEVICE(0x07d1, 0x3c15) },
850 { USB_DEVICE(0x07d1, 0x3c16) },
851 { USB_DEVICE(0x07d1, 0x3c17) },
852 { USB_DEVICE(0x2001, 0x3317) },
853 { USB_DEVICE(0x2001, 0x3c1b) },
854 { USB_DEVICE(0x2001, 0x3c25) },
856 { USB_DEVICE(0x07fa, 0x7712) },
858 { USB_DEVICE(0x0fe9, 0xb307) },
860 { USB_DEVICE(0x7392, 0x4085) },
861 { USB_DEVICE(0x7392, 0x7711) },
862 { USB_DEVICE(0x7392, 0x7717) },
863 { USB_DEVICE(0x7392, 0x7718) },
864 { USB_DEVICE(0x7392, 0x7722) },
866 { USB_DEVICE(0x203d, 0x1480) },
867 { USB_DEVICE(0x203d, 0x14a9) },
869 { USB_DEVICE(0x1740, 0x9701) },
870 { USB_DEVICE(0x1740, 0x9702) },
871 { USB_DEVICE(0x1740, 0x9703) },
872 { USB_DEVICE(0x1740, 0x9705) },
873 { USB_DEVICE(0x1740, 0x9706) },
874 { USB_DEVICE(0x1740, 0x9707) },
875 { USB_DEVICE(0x1740, 0x9708) },
876 { USB_DEVICE(0x1740, 0x9709) },
878 { USB_DEVICE(0x15a9, 0x0012) },
880 { USB_DEVICE(0x1044, 0x800b) },
881 { USB_DEVICE(0x1044, 0x800d) },
883 { USB_DEVICE(0x0e66, 0x0001) },
884 { USB_DEVICE(0x0e66, 0x0003) },
885 { USB_DEVICE(0x0e66, 0x0009) },
886 { USB_DEVICE(0x0e66, 0x000b) },
887 { USB_DEVICE(0x0e66, 0x0013) },
888 { USB_DEVICE(0x0e66, 0x0017) },
889 { USB_DEVICE(0x0e66, 0x0018) },
891 { USB_DEVICE(0x04bb, 0x0945) },
892 { USB_DEVICE(0x04bb, 0x0947) },
893 { USB_DEVICE(0x04bb, 0x0948) },
895 { USB_DEVICE(0x13b1, 0x0031) },
896 { USB_DEVICE(0x1737, 0x0070) },
897 { USB_DEVICE(0x1737, 0x0071) },
898 { USB_DEVICE(0x1737, 0x0077) },
899 { USB_DEVICE(0x1737, 0x0078) },
901 { USB_DEVICE(0x0789, 0x0162) },
902 { USB_DEVICE(0x0789, 0x0163) },
903 { USB_DEVICE(0x0789, 0x0164) },
904 { USB_DEVICE(0x0789, 0x0166) },
906 { USB_DEVICE(0x100d, 0x9031) },
908 { USB_DEVICE(0x0db0, 0x3820) },
909 { USB_DEVICE(0x0db0, 0x3821) },
910 { USB_DEVICE(0x0db0, 0x3822) },
911 { USB_DEVICE(0x0db0, 0x3870) },
912 { USB_DEVICE(0x0db0, 0x3871) },
913 { USB_DEVICE(0x0db0, 0x6899) },
914 { USB_DEVICE(0x0db0, 0x821a) },
915 { USB_DEVICE(0x0db0, 0x822a) },
916 { USB_DEVICE(0x0db0, 0x822b) },
917 { USB_DEVICE(0x0db0, 0x822c) },
918 { USB_DEVICE(0x0db0, 0x870a) },
919 { USB_DEVICE(0x0db0, 0x871a) },
920 { USB_DEVICE(0x0db0, 0x871b) },
921 { USB_DEVICE(0x0db0, 0x871c) },
922 { USB_DEVICE(0x0db0, 0x899a) },
924 { USB_DEVICE(0x1b75, 0x3070) },
925 { USB_DEVICE(0x1b75, 0x3071) },
926 { USB_DEVICE(0x1b75, 0x3072) },
927 { USB_DEVICE(0x1b75, 0xa200) },
929 { USB_DEVICE(0x20b8, 0x8888) },
931 { USB_DEVICE(0x1d4d, 0x0002) },
932 { USB_DEVICE(0x1d4d, 0x000c) },
933 { USB_DEVICE(0x1d4d, 0x000e) },
934 { USB_DEVICE(0x1d4d, 0x0011) },
936 { USB_DEVICE(0x0471, 0x200f) },
938 { USB_DEVICE(0x2019, 0x5201) },
939 { USB_DEVICE(0x2019, 0xab25) },
940 { USB_DEVICE(0x2019, 0xed06) },
942 { USB_DEVICE(0x1a32, 0x0304) },
944 { USB_DEVICE(0x148f, 0x2070) },
945 { USB_DEVICE(0x148f, 0x2770) },
946 { USB_DEVICE(0x148f, 0x2870) },
947 { USB_DEVICE(0x148f, 0x3070) },
948 { USB_DEVICE(0x148f, 0x3071) },
949 { USB_DEVICE(0x148f, 0x3072) },
951 { USB_DEVICE(0x04e8, 0x2018) },
953 { USB_DEVICE(0x129b, 0x1828) },
955 { USB_DEVICE(0x0df6, 0x0017) },
956 { USB_DEVICE(0x0df6, 0x002b) },
957 { USB_DEVICE(0x0df6, 0x002c) },
958 { USB_DEVICE(0x0df6, 0x002d) },
959 { USB_DEVICE(0x0df6, 0x0039) },
960 { USB_DEVICE(0x0df6, 0x003b) },
961 { USB_DEVICE(0x0df6, 0x003d) },
962 { USB_DEVICE(0x0df6, 0x003e) },
963 { USB_DEVICE(0x0df6, 0x003f) },
964 { USB_DEVICE(0x0df6, 0x0040) },
965 { USB_DEVICE(0x0df6, 0x0042) },
966 { USB_DEVICE(0x0df6, 0x0047) },
967 { USB_DEVICE(0x0df6, 0x0048) },
968 { USB_DEVICE(0x0df6, 0x0051) },
969 { USB_DEVICE(0x0df6, 0x005f) },
970 { USB_DEVICE(0x0df6, 0x0060) },
972 { USB_DEVICE(0x083a, 0x6618) },
973 { USB_DEVICE(0x083a, 0x7511) },
974 { USB_DEVICE(0x083a, 0x7512) },
975 { USB_DEVICE(0x083a, 0x7522) },
976 { USB_DEVICE(0x083a, 0x8522) },
977 { USB_DEVICE(0x083a, 0xa618) },
978 { USB_DEVICE(0x083a, 0xa701) },
979 { USB_DEVICE(0x083a, 0xa702) },
980 { USB_DEVICE(0x083a, 0xa703) },
981 { USB_DEVICE(0x083a, 0xb522) },
983 { USB_DEVICE(0x15a9, 0x0006) },
985 { USB_DEVICE(0x177f, 0x0153) },
986 { USB_DEVICE(0x177f, 0x0164) },
987 { USB_DEVICE(0x177f, 0x0302) },
988 { USB_DEVICE(0x177f, 0x0313) },
989 { USB_DEVICE(0x177f, 0x0323) },
990 { USB_DEVICE(0x177f, 0x0324) },
992 { USB_DEVICE(0x157e, 0x300e) },
993 { USB_DEVICE(0x157e, 0x3013) },
995 { USB_DEVICE(0x0cde, 0x0022) },
996 { USB_DEVICE(0x0cde, 0x0025) },
998 { USB_DEVICE(0x5a57, 0x0280) },
999 { USB_DEVICE(0x5a57, 0x0282) },
1000 { USB_DEVICE(0x5a57, 0x0283) },
1001 { USB_DEVICE(0x5a57, 0x5257) },
1003 { USB_DEVICE(0x0586, 0x3416) },
1004 { USB_DEVICE(0x0586, 0x3418) },
1005 { USB_DEVICE(0x0586, 0x341a) },
1006 { USB_DEVICE(0x0586, 0x341e) },
1007 { USB_DEVICE(0x0586, 0x343e) },
1008 #ifdef CONFIG_RT2800USB_RT33XX
1010 { USB_DEVICE(0x050d, 0x945b) },
1012 { USB_DEVICE(0x2001, 0x3c17) },
1014 { USB_DEVICE(0x083a, 0xb511) },
1015 /* Accton/Arcadyan/Epson */
1016 { USB_DEVICE(0x083a, 0xb512) },
1018 { USB_DEVICE(0x0471, 0x20dd) },
1020 { USB_DEVICE(0x148f, 0x3370) },
1021 { USB_DEVICE(0x148f, 0x8070) },
1023 { USB_DEVICE(0x0df6, 0x0050) },
1025 { USB_DEVICE(0x177f, 0x0163) },
1026 { USB_DEVICE(0x177f, 0x0165) },
1028 #ifdef CONFIG_RT2800USB_RT35XX
1030 { USB_DEVICE(0x8516, 0x3572) },
1032 { USB_DEVICE(0x1690, 0x0744) },
1033 { USB_DEVICE(0x1690, 0x0761) },
1034 { USB_DEVICE(0x1690, 0x0764) },
1036 { USB_DEVICE(0x0b05, 0x179d) },
1038 { USB_DEVICE(0x167b, 0x4001) },
1040 { USB_DEVICE(0x1740, 0x9801) },
1042 { USB_DEVICE(0x04bb, 0x0944) },
1044 { USB_DEVICE(0x13b1, 0x002f) },
1045 { USB_DEVICE(0x1737, 0x0079) },
1047 { USB_DEVICE(0x0789, 0x0170) },
1049 { USB_DEVICE(0x148f, 0x3572) },
1051 { USB_DEVICE(0x0df6, 0x0041) },
1052 { USB_DEVICE(0x0df6, 0x0062) },
1053 { USB_DEVICE(0x0df6, 0x0065) },
1054 { USB_DEVICE(0x0df6, 0x0066) },
1055 { USB_DEVICE(0x0df6, 0x0068) },
1057 { USB_DEVICE(0x0930, 0x0a07) },
1059 { USB_DEVICE(0x5a57, 0x0284) },
1061 #ifdef CONFIG_RT2800USB_RT3573
1063 { USB_DEVICE(0x1b75, 0x7733) },
1065 { USB_DEVICE(0x0b05, 0x17bc) },
1066 { USB_DEVICE(0x0b05, 0x17ad) },
1068 { USB_DEVICE(0x050d, 0x1103) },
1070 { USB_DEVICE(0x148f, 0xf301) },
1072 { USB_DEVICE(0x2001, 0x3c1f) },
1074 { USB_DEVICE(0x7392, 0x7733) },
1076 { USB_DEVICE(0x0e66, 0x0020) },
1077 { USB_DEVICE(0x0e66, 0x0021) },
1079 { USB_DEVICE(0x04bb, 0x094e) },
1081 { USB_DEVICE(0x13b1, 0x003b) },
1083 { USB_DEVICE(0x0789, 0x016b) },
1085 { USB_DEVICE(0x0846, 0x9012) },
1086 { USB_DEVICE(0x0846, 0x9013) },
1087 { USB_DEVICE(0x0846, 0x9019) },
1089 { USB_DEVICE(0x2019, 0xed19) },
1091 { USB_DEVICE(0x148f, 0x3573) },
1093 { USB_DEVICE(0x0df6, 0x0067) },
1094 { USB_DEVICE(0x0df6, 0x006a) },
1095 { USB_DEVICE(0x0df6, 0x006e) },
1097 { USB_DEVICE(0x0586, 0x3421) },
1099 #ifdef CONFIG_RT2800USB_RT53XX
1101 { USB_DEVICE(0x043e, 0x7a12) },
1102 { USB_DEVICE(0x043e, 0x7a32) },
1104 { USB_DEVICE(0x0b05, 0x17e8) },
1106 { USB_DEVICE(0x13d3, 0x3329) },
1107 { USB_DEVICE(0x13d3, 0x3365) },
1109 { USB_DEVICE(0x2001, 0x3c15) },
1110 { USB_DEVICE(0x2001, 0x3c19) },
1111 { USB_DEVICE(0x2001, 0x3c1c) },
1112 { USB_DEVICE(0x2001, 0x3c1d) },
1113 { USB_DEVICE(0x2001, 0x3c1e) },
1114 { USB_DEVICE(0x2001, 0x3c20) },
1115 { USB_DEVICE(0x2001, 0x3c22) },
1116 { USB_DEVICE(0x2001, 0x3c23) },
1118 { USB_DEVICE(0x043e, 0x7a22) },
1119 { USB_DEVICE(0x043e, 0x7a42) },
1121 { USB_DEVICE(0x04da, 0x1801) },
1122 { USB_DEVICE(0x04da, 0x1800) },
1123 { USB_DEVICE(0x04da, 0x23f6) },
1125 { USB_DEVICE(0x0471, 0x2104) },
1126 { USB_DEVICE(0x0471, 0x2126) },
1127 { USB_DEVICE(0x0471, 0x2180) },
1128 { USB_DEVICE(0x0471, 0x2181) },
1129 { USB_DEVICE(0x0471, 0x2182) },
1131 { USB_DEVICE(0x148f, 0x5370) },
1132 { USB_DEVICE(0x148f, 0x5372) },
1134 #ifdef CONFIG_RT2800USB_RT55XX
1136 { USB_DEVICE(0x043e, 0x7a32) },
1138 { USB_DEVICE(0x057c, 0x8501) },
1140 { USB_DEVICE(0x0411, 0x0241) },
1141 { USB_DEVICE(0x0411, 0x0253) },
1143 { USB_DEVICE(0x2001, 0x3c1a) },
1144 { USB_DEVICE(0x2001, 0x3c21) },
1146 { USB_DEVICE(0x043e, 0x7a13) },
1148 { USB_DEVICE(0x148f, 0x5572) },
1150 { USB_DEVICE(0x20f4, 0x724a) },
1152 #ifdef CONFIG_RT2800USB_UNKNOWN
1154 * Unclear what kind of devices these are (they aren't supported by the
1155 * vendor linux driver).
1158 { USB_DEVICE(0x07b8, 0x3073) },
1159 { USB_DEVICE(0x07b8, 0x3074) },
1160 /* Alpha Networks */
1161 { USB_DEVICE(0x14b2, 0x3c08) },
1162 { USB_DEVICE(0x14b2, 0x3c11) },
1164 { USB_DEVICE(0x0e0b, 0x9031) },
1165 { USB_DEVICE(0x0e0b, 0x9041) },
1167 { USB_DEVICE(0x0b05, 0x166a) },
1168 { USB_DEVICE(0x0b05, 0x1760) },
1169 { USB_DEVICE(0x0b05, 0x1761) },
1170 { USB_DEVICE(0x0b05, 0x1790) },
1171 { USB_DEVICE(0x0b05, 0x17a7) },
1173 { USB_DEVICE(0x13d3, 0x3262) },
1174 { USB_DEVICE(0x13d3, 0x3284) },
1175 { USB_DEVICE(0x13d3, 0x3322) },
1176 { USB_DEVICE(0x13d3, 0x3340) },
1177 { USB_DEVICE(0x13d3, 0x3399) },
1178 { USB_DEVICE(0x13d3, 0x3400) },
1179 { USB_DEVICE(0x13d3, 0x3401) },
1181 { USB_DEVICE(0x050d, 0x1003) },
1183 { USB_DEVICE(0x0411, 0x012e) },
1184 { USB_DEVICE(0x0411, 0x0148) },
1185 { USB_DEVICE(0x0411, 0x0150) },
1187 { USB_DEVICE(0x07aa, 0x0041) },
1188 { USB_DEVICE(0x07aa, 0x0042) },
1189 { USB_DEVICE(0x18c5, 0x0008) },
1191 { USB_DEVICE(0x07d1, 0x3c0b) },
1193 { USB_DEVICE(0x203d, 0x14a1) },
1195 { USB_DEVICE(0x1740, 0x0600) },
1196 { USB_DEVICE(0x1740, 0x0602) },
1198 { USB_DEVICE(0x15a9, 0x0010) },
1200 { USB_DEVICE(0x1044, 0x800c) },
1202 { USB_DEVICE(0x06f8, 0xe036) },
1204 { USB_DEVICE(0x148f, 0xf101) },
1206 { USB_DEVICE(0x04bb, 0x094b) },
1208 { USB_DEVICE(0x1740, 0x0605) },
1209 { USB_DEVICE(0x1740, 0x0615) },
1211 { USB_DEVICE(0x0789, 0x0168) },
1212 { USB_DEVICE(0x0789, 0x0169) },
1214 { USB_DEVICE(0x100d, 0x9032) },
1216 { USB_DEVICE(0x05a6, 0x0101) },
1217 { USB_DEVICE(0x1d4d, 0x0010) },
1219 { USB_DEVICE(0x2019, 0xab24) },
1220 { USB_DEVICE(0x2019, 0xab29) },
1222 { USB_DEVICE(0x18e8, 0x6259) },
1224 { USB_DEVICE(0x08b9, 0x1197) },
1226 { USB_DEVICE(0x0df6, 0x003c) },
1227 { USB_DEVICE(0x0df6, 0x004a) },
1228 { USB_DEVICE(0x0df6, 0x004d) },
1229 { USB_DEVICE(0x0df6, 0x0053) },
1230 { USB_DEVICE(0x0df6, 0x0069) },
1231 { USB_DEVICE(0x0df6, 0x006f) },
1232 { USB_DEVICE(0x0df6, 0x0078) },
1234 { USB_DEVICE(0x083a, 0xa512) },
1235 { USB_DEVICE(0x083a, 0xc522) },
1236 { USB_DEVICE(0x083a, 0xd522) },
1237 { USB_DEVICE(0x083a, 0xf511) },
1239 { USB_DEVICE(0x177f, 0x0254) },
1241 { USB_DEVICE(0xf201, 0x5370) },
1246 MODULE_AUTHOR(DRV_PROJECT
);
1247 MODULE_VERSION(DRV_VERSION
);
1248 MODULE_DESCRIPTION("Ralink RT2800 USB Wireless LAN driver.");
1249 MODULE_SUPPORTED_DEVICE("Ralink RT2870 USB chipset based cards");
1250 MODULE_DEVICE_TABLE(usb
, rt2800usb_device_table
);
1251 MODULE_FIRMWARE(FIRMWARE_RT2870
);
1252 MODULE_LICENSE("GPL");
1254 static int rt2800usb_probe(struct usb_interface
*usb_intf
,
1255 const struct usb_device_id
*id
)
1257 return rt2x00usb_probe(usb_intf
, &rt2800usb_ops
);
1260 static struct usb_driver rt2800usb_driver
= {
1261 .name
= KBUILD_MODNAME
,
1262 .id_table
= rt2800usb_device_table
,
1263 .probe
= rt2800usb_probe
,
1264 .disconnect
= rt2x00usb_disconnect
,
1265 .suspend
= rt2x00usb_suspend
,
1266 .resume
= rt2x00usb_resume
,
1267 .reset_resume
= rt2x00usb_resume
,
1268 .disable_hub_initiated_lpm
= 1,
1271 module_usb_driver(rt2800usb_driver
);