1 // SPDX-License-Identifier: GPL-2.0-or-later
3 Copyright (C) 2010 Willow Garage <http://www.willowgarage.com>
4 Copyright (C) 2009 - 2010 Ivo van Doorn <IvDoorn@gmail.com>
5 Copyright (C) 2009 Mattias Nissler <mattias.nissler@gmx.de>
6 Copyright (C) 2009 Felix Fietkau <nbd@openwrt.org>
7 Copyright (C) 2009 Xose Vazquez Perez <xose.vazquez@gmail.com>
8 Copyright (C) 2009 Axel Kollhofer <rain_maker@root-forum.org>
9 <http://rt2x00.serialmonkey.com>
15 Abstract: rt2800usb device specific routines.
16 Supported chipsets: RT2800U.
19 #include <linux/delay.h>
20 #include <linux/etherdevice.h>
21 #include <linux/kernel.h>
22 #include <linux/module.h>
23 #include <linux/usb.h>
26 #include "rt2x00usb.h"
27 #include "rt2800lib.h"
29 #include "rt2800usb.h"
32 * Allow hardware encryption to be disabled.
34 static bool modparam_nohwcrypt
;
35 module_param_named(nohwcrypt
, modparam_nohwcrypt
, bool, 0444);
36 MODULE_PARM_DESC(nohwcrypt
, "Disable hardware encryption.");
38 static bool rt2800usb_hwcrypt_disabled(struct rt2x00_dev
*rt2x00dev
)
40 return modparam_nohwcrypt
;
46 static void rt2800usb_start_queue(struct data_queue
*queue
)
48 struct rt2x00_dev
*rt2x00dev
= queue
->rt2x00dev
;
53 reg
= rt2x00usb_register_read(rt2x00dev
, MAC_SYS_CTRL
);
54 rt2x00_set_field32(®
, MAC_SYS_CTRL_ENABLE_RX
, 1);
55 rt2x00usb_register_write(rt2x00dev
, MAC_SYS_CTRL
, reg
);
58 reg
= rt2x00usb_register_read(rt2x00dev
, BCN_TIME_CFG
);
59 rt2x00_set_field32(®
, BCN_TIME_CFG_TSF_TICKING
, 1);
60 rt2x00_set_field32(®
, BCN_TIME_CFG_TBTT_ENABLE
, 1);
61 rt2x00_set_field32(®
, BCN_TIME_CFG_BEACON_GEN
, 1);
62 rt2x00usb_register_write(rt2x00dev
, BCN_TIME_CFG
, reg
);
69 static void rt2800usb_stop_queue(struct data_queue
*queue
)
71 struct rt2x00_dev
*rt2x00dev
= queue
->rt2x00dev
;
76 reg
= rt2x00usb_register_read(rt2x00dev
, MAC_SYS_CTRL
);
77 rt2x00_set_field32(®
, MAC_SYS_CTRL_ENABLE_RX
, 0);
78 rt2x00usb_register_write(rt2x00dev
, MAC_SYS_CTRL
, reg
);
81 reg
= rt2x00usb_register_read(rt2x00dev
, BCN_TIME_CFG
);
82 rt2x00_set_field32(®
, BCN_TIME_CFG_TSF_TICKING
, 0);
83 rt2x00_set_field32(®
, BCN_TIME_CFG_TBTT_ENABLE
, 0);
84 rt2x00_set_field32(®
, BCN_TIME_CFG_BEACON_GEN
, 0);
85 rt2x00usb_register_write(rt2x00dev
, BCN_TIME_CFG
, reg
);
92 #define TXSTATUS_READ_INTERVAL 1000000
94 static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev
*rt2x00dev
,
95 int urb_status
, u32 tx_status
)
100 rt2x00_warn(rt2x00dev
, "TX status read failed %d\n",
106 valid
= rt2x00_get_field32(tx_status
, TX_STA_FIFO_VALID
);
108 if (!kfifo_put(&rt2x00dev
->txstatus_fifo
, tx_status
))
109 rt2x00_warn(rt2x00dev
, "TX status FIFO overrun\n");
111 queue_work(rt2x00dev
->workqueue
, &rt2x00dev
->txdone_work
);
113 /* Reschedule urb to read TX status again instantly */
117 /* Check if there is any entry that timedout waiting on TX status */
118 if (rt2800_txstatus_timeout(rt2x00dev
))
119 queue_work(rt2x00dev
->workqueue
, &rt2x00dev
->txdone_work
);
121 if (rt2800_txstatus_pending(rt2x00dev
)) {
122 /* Read register after 1 ms */
123 hrtimer_start(&rt2x00dev
->txstatus_timer
,
124 TXSTATUS_READ_INTERVAL
,
130 clear_bit(TX_STATUS_READING
, &rt2x00dev
->flags
);
132 * There is small race window above, between txstatus pending check and
133 * clear_bit someone could do rt2x00usb_interrupt_txdone, so recheck
134 * here again if status reading is needed.
136 if (rt2800_txstatus_pending(rt2x00dev
) &&
137 !test_and_set_bit(TX_STATUS_READING
, &rt2x00dev
->flags
))
143 static void rt2800usb_async_read_tx_status(struct rt2x00_dev
*rt2x00dev
)
146 if (test_and_set_bit(TX_STATUS_READING
, &rt2x00dev
->flags
))
149 /* Read TX_STA_FIFO register after 2 ms */
150 hrtimer_start(&rt2x00dev
->txstatus_timer
,
151 2 * TXSTATUS_READ_INTERVAL
,
155 static void rt2800usb_tx_dma_done(struct queue_entry
*entry
)
157 struct rt2x00_dev
*rt2x00dev
= entry
->queue
->rt2x00dev
;
159 rt2800usb_async_read_tx_status(rt2x00dev
);
162 static enum hrtimer_restart
rt2800usb_tx_sta_fifo_timeout(struct hrtimer
*timer
)
164 struct rt2x00_dev
*rt2x00dev
=
165 container_of(timer
, struct rt2x00_dev
, txstatus_timer
);
167 rt2x00usb_register_read_async(rt2x00dev
, TX_STA_FIFO
,
168 rt2800usb_tx_sta_fifo_read_completed
);
170 return HRTIMER_NORESTART
;
176 static int rt2800usb_autorun_detect(struct rt2x00_dev
*rt2x00dev
)
182 reg
= kmalloc(sizeof(*reg
), GFP_KERNEL
);
185 /* cannot use rt2x00usb_register_read here as it uses different
186 * mode (MULTI_READ vs. DEVICE_MODE) and does not pass the
187 * magic value USB_MODE_AUTORUN (0x11) to the device, thus the
188 * returned value would be invalid.
190 ret
= rt2x00usb_vendor_request(rt2x00dev
, USB_DEVICE_MODE
,
191 USB_VENDOR_REQUEST_IN
, 0,
192 USB_MODE_AUTORUN
, reg
, sizeof(*reg
),
193 REGISTER_TIMEOUT_FIRMWARE
);
194 fw_mode
= le32_to_cpu(*reg
);
199 if ((fw_mode
& 0x00000003) == 2)
205 static char *rt2800usb_get_firmware_name(struct rt2x00_dev
*rt2x00dev
)
207 return FIRMWARE_RT2870
;
210 static int rt2800usb_write_firmware(struct rt2x00_dev
*rt2x00dev
,
211 const u8
*data
, const size_t len
)
219 * Check which section of the firmware we need.
221 if (rt2x00_rt(rt2x00dev
, RT2860
) ||
222 rt2x00_rt(rt2x00dev
, RT2872
) ||
223 rt2x00_rt(rt2x00dev
, RT3070
)) {
232 * Write firmware to device.
234 retval
= rt2800usb_autorun_detect(rt2x00dev
);
238 rt2x00_info(rt2x00dev
,
239 "Firmware loading not required - NIC in AutoRun mode\n");
240 __clear_bit(REQUIRE_FIRMWARE
, &rt2x00dev
->cap_flags
);
242 rt2x00usb_register_multiwrite(rt2x00dev
, FIRMWARE_IMAGE_BASE
,
243 data
+ offset
, length
);
246 rt2x00usb_register_write(rt2x00dev
, H2M_MAILBOX_CID
, ~0);
247 rt2x00usb_register_write(rt2x00dev
, H2M_MAILBOX_STATUS
, ~0);
250 * Send firmware request to device to load firmware,
251 * we need to specify a long timeout time.
253 status
= rt2x00usb_vendor_request_sw(rt2x00dev
, USB_DEVICE_MODE
,
254 0, USB_MODE_FIRMWARE
,
255 REGISTER_TIMEOUT_FIRMWARE
);
257 rt2x00_err(rt2x00dev
, "Failed to write Firmware to device\n");
262 rt2x00usb_register_write(rt2x00dev
, H2M_MAILBOX_CSR
, 0);
268 * Device state switch handlers.
270 static int rt2800usb_init_registers(struct rt2x00_dev
*rt2x00dev
)
275 * Wait until BBP and RF are ready.
277 if (rt2800_wait_csr_ready(rt2x00dev
))
280 reg
= rt2x00usb_register_read(rt2x00dev
, PBF_SYS_CTRL
);
281 rt2x00usb_register_write(rt2x00dev
, PBF_SYS_CTRL
, reg
& ~0x00002000);
284 rt2x00_set_field32(®
, MAC_SYS_CTRL_RESET_CSR
, 1);
285 rt2x00_set_field32(®
, MAC_SYS_CTRL_RESET_BBP
, 1);
286 rt2x00usb_register_write(rt2x00dev
, MAC_SYS_CTRL
, reg
);
288 rt2x00usb_vendor_request_sw(rt2x00dev
, USB_DEVICE_MODE
, 0,
289 USB_MODE_RESET
, REGISTER_TIMEOUT
);
291 rt2x00usb_register_write(rt2x00dev
, MAC_SYS_CTRL
, 0x00000000);
296 static int rt2800usb_enable_radio(struct rt2x00_dev
*rt2x00dev
)
300 if (unlikely(rt2800_wait_wpdma_ready(rt2x00dev
)))
303 rt2x00_set_field32(®
, USB_DMA_CFG_PHY_CLEAR
, 0);
304 rt2x00_set_field32(®
, USB_DMA_CFG_RX_BULK_AGG_EN
, 0);
305 rt2x00_set_field32(®
, USB_DMA_CFG_RX_BULK_AGG_TIMEOUT
, 128);
307 * Total room for RX frames in kilobytes, PBF might still exceed
308 * this limit so reduce the number to prevent errors.
310 rt2x00_set_field32(®
, USB_DMA_CFG_RX_BULK_AGG_LIMIT
,
311 ((rt2x00dev
->rx
->limit
* DATA_FRAME_SIZE
)
313 rt2x00_set_field32(®
, USB_DMA_CFG_RX_BULK_EN
, 1);
314 rt2x00_set_field32(®
, USB_DMA_CFG_TX_BULK_EN
, 1);
315 rt2x00usb_register_write(rt2x00dev
, USB_DMA_CFG
, reg
);
317 return rt2800_enable_radio(rt2x00dev
);
320 static void rt2800usb_disable_radio(struct rt2x00_dev
*rt2x00dev
)
322 rt2800_disable_radio(rt2x00dev
);
325 static int rt2800usb_set_state(struct rt2x00_dev
*rt2x00dev
,
326 enum dev_state state
)
328 if (state
== STATE_AWAKE
)
329 rt2800_mcu_request(rt2x00dev
, MCU_WAKEUP
, 0xff, 0, 2);
331 rt2800_mcu_request(rt2x00dev
, MCU_SLEEP
, 0xff, 0xff, 2);
336 static int rt2800usb_set_device_state(struct rt2x00_dev
*rt2x00dev
,
337 enum dev_state state
)
344 * Before the radio can be enabled, the device first has
345 * to be woken up. After that it needs a bit of time
346 * to be fully awake and then the radio can be enabled.
348 rt2800usb_set_state(rt2x00dev
, STATE_AWAKE
);
350 retval
= rt2800usb_enable_radio(rt2x00dev
);
352 case STATE_RADIO_OFF
:
354 * After the radio has been disabled, the device should
355 * be put to sleep for powersaving.
357 rt2800usb_disable_radio(rt2x00dev
);
358 rt2800usb_set_state(rt2x00dev
, STATE_SLEEP
);
360 case STATE_RADIO_IRQ_ON
:
361 case STATE_RADIO_IRQ_OFF
:
362 /* No support, but no error either */
364 case STATE_DEEP_SLEEP
:
368 retval
= rt2800usb_set_state(rt2x00dev
, state
);
375 if (unlikely(retval
))
376 rt2x00_err(rt2x00dev
, "Device failed to enter state %d (%d)\n",
382 static unsigned int rt2800usb_get_dma_done(struct data_queue
*queue
)
384 struct queue_entry
*entry
;
386 entry
= rt2x00queue_get_entry(queue
, Q_INDEX_DMA_DONE
);
387 return entry
->entry_idx
;
391 * TX descriptor initialization
393 static __le32
*rt2800usb_get_txwi(struct queue_entry
*entry
)
395 if (entry
->queue
->qid
== QID_BEACON
)
396 return (__le32
*) (entry
->skb
->data
);
398 return (__le32
*) (entry
->skb
->data
+ TXINFO_DESC_SIZE
);
401 static void rt2800usb_write_tx_desc(struct queue_entry
*entry
,
402 struct txentry_desc
*txdesc
)
404 struct skb_frame_desc
*skbdesc
= get_skb_frame_desc(entry
->skb
);
405 __le32
*txi
= (__le32
*) entry
->skb
->data
;
409 * Initialize TXINFO descriptor
411 word
= rt2x00_desc_read(txi
, 0);
414 * The size of TXINFO_W0_USB_DMA_TX_PKT_LEN is
415 * TXWI + 802.11 header + L2 pad + payload + pad,
416 * so need to decrease size of TXINFO.
418 rt2x00_set_field32(&word
, TXINFO_W0_USB_DMA_TX_PKT_LEN
,
419 roundup(entry
->skb
->len
, 4) - TXINFO_DESC_SIZE
);
420 rt2x00_set_field32(&word
, TXINFO_W0_WIV
,
421 !test_bit(ENTRY_TXD_ENCRYPT_IV
, &txdesc
->flags
));
422 rt2x00_set_field32(&word
, TXINFO_W0_QSEL
, 2);
423 rt2x00_set_field32(&word
, TXINFO_W0_SW_USE_LAST_ROUND
, 0);
424 rt2x00_set_field32(&word
, TXINFO_W0_USB_DMA_NEXT_VALID
, 0);
425 rt2x00_set_field32(&word
, TXINFO_W0_USB_DMA_TX_BURST
,
426 test_bit(ENTRY_TXD_BURST
, &txdesc
->flags
));
427 rt2x00_desc_write(txi
, 0, word
);
430 * Register descriptor details in skb frame descriptor.
432 skbdesc
->flags
|= SKBDESC_DESC_IN_SKB
;
434 skbdesc
->desc_len
= TXINFO_DESC_SIZE
+ entry
->queue
->winfo_size
;
438 * TX data initialization
440 static int rt2800usb_get_tx_data_len(struct queue_entry
*entry
)
443 * pad(1~3 bytes) is needed after each 802.11 payload.
444 * USB end pad(4 bytes) is needed at each USB bulk out packet end.
445 * TX frame format is :
446 * | TXINFO | TXWI | 802.11 header | L2 pad | payload | pad | USB end pad |
447 * |<------------- tx_pkt_len ------------->|
450 return roundup(entry
->skb
->len
, 4) + 4;
454 * TX control handlers
456 static void rt2800usb_work_txdone(struct work_struct
*work
)
458 struct rt2x00_dev
*rt2x00dev
=
459 container_of(work
, struct rt2x00_dev
, txdone_work
);
461 while (!kfifo_is_empty(&rt2x00dev
->txstatus_fifo
) ||
462 rt2800_txstatus_timeout(rt2x00dev
)) {
464 rt2800_txdone(rt2x00dev
, UINT_MAX
);
466 rt2800_txdone_nostatus(rt2x00dev
);
469 * The hw may delay sending the packet after DMA complete
470 * if the medium is busy, thus the TX_STA_FIFO entry is
471 * also delayed -> use a timer to retrieve it.
473 if (rt2800_txstatus_pending(rt2x00dev
))
474 rt2800usb_async_read_tx_status(rt2x00dev
);
479 * RX control handlers
481 static void rt2800usb_fill_rxdone(struct queue_entry
*entry
,
482 struct rxdone_entry_desc
*rxdesc
)
484 struct skb_frame_desc
*skbdesc
= get_skb_frame_desc(entry
->skb
);
485 __le32
*rxi
= (__le32
*)entry
->skb
->data
;
491 * Copy descriptor to the skbdesc->desc buffer, making it safe from
492 * moving of frame data in rt2x00usb.
494 memcpy(skbdesc
->desc
, rxi
, skbdesc
->desc_len
);
497 * RX frame format is :
498 * | RXINFO | RXWI | header | L2 pad | payload | pad | RXD | USB pad |
499 * |<------------ rx_pkt_len -------------->|
501 word
= rt2x00_desc_read(rxi
, 0);
502 rx_pkt_len
= rt2x00_get_field32(word
, RXINFO_W0_USB_DMA_RX_PKT_LEN
);
505 * Remove the RXINFO structure from the sbk.
507 skb_pull(entry
->skb
, RXINFO_DESC_SIZE
);
510 * Check for rx_pkt_len validity. Return if invalid, leaving
511 * rxdesc->size zeroed out by the upper level.
513 if (unlikely(rx_pkt_len
== 0 ||
514 rx_pkt_len
> entry
->queue
->data_size
)) {
515 rt2x00_err(entry
->queue
->rt2x00dev
,
516 "Bad frame size %d, forcing to 0\n", rx_pkt_len
);
520 rxd
= (__le32
*)(entry
->skb
->data
+ rx_pkt_len
);
523 * It is now safe to read the descriptor on all architectures.
525 word
= rt2x00_desc_read(rxd
, 0);
527 if (rt2x00_get_field32(word
, RXD_W0_CRC_ERROR
))
528 rxdesc
->flags
|= RX_FLAG_FAILED_FCS_CRC
;
530 rxdesc
->cipher_status
= rt2x00_get_field32(word
, RXD_W0_CIPHER_ERROR
);
532 if (rt2x00_get_field32(word
, RXD_W0_DECRYPTED
)) {
534 * Hardware has stripped IV/EIV data from 802.11 frame during
535 * decryption. Unfortunately the descriptor doesn't contain
536 * any fields with the EIV/IV data either, so they can't
537 * be restored by rt2x00lib.
539 rxdesc
->flags
|= RX_FLAG_IV_STRIPPED
;
542 * The hardware has already checked the Michael Mic and has
543 * stripped it from the frame. Signal this to mac80211.
545 rxdesc
->flags
|= RX_FLAG_MMIC_STRIPPED
;
547 if (rxdesc
->cipher_status
== RX_CRYPTO_SUCCESS
) {
548 rxdesc
->flags
|= RX_FLAG_DECRYPTED
;
549 } else if (rxdesc
->cipher_status
== RX_CRYPTO_FAIL_MIC
) {
551 * In order to check the Michael Mic, the packet must have
552 * been decrypted. Mac80211 doesnt check the MMIC failure
553 * flag to initiate MMIC countermeasures if the decoded flag
556 rxdesc
->flags
|= RX_FLAG_DECRYPTED
;
558 rxdesc
->flags
|= RX_FLAG_MMIC_ERROR
;
562 if (rt2x00_get_field32(word
, RXD_W0_MY_BSS
))
563 rxdesc
->dev_flags
|= RXDONE_MY_BSS
;
565 if (rt2x00_get_field32(word
, RXD_W0_L2PAD
))
566 rxdesc
->dev_flags
|= RXDONE_L2PAD
;
569 * Remove RXD descriptor from end of buffer.
571 skb_trim(entry
->skb
, rx_pkt_len
);
574 * Process the RXWI structure.
576 rt2800_process_rxwi(entry
, rxdesc
);
580 * Device probe functions.
582 static int rt2800usb_efuse_detect(struct rt2x00_dev
*rt2x00dev
)
586 retval
= rt2800usb_autorun_detect(rt2x00dev
);
591 return rt2800_efuse_detect(rt2x00dev
);
594 static int rt2800usb_read_eeprom(struct rt2x00_dev
*rt2x00dev
)
598 retval
= rt2800usb_efuse_detect(rt2x00dev
);
602 retval
= rt2800_read_eeprom_efuse(rt2x00dev
);
604 retval
= rt2x00usb_eeprom_read(rt2x00dev
, rt2x00dev
->eeprom
,
610 static int rt2800usb_probe_hw(struct rt2x00_dev
*rt2x00dev
)
614 retval
= rt2800_probe_hw(rt2x00dev
);
619 * Set txstatus timer function.
621 rt2x00dev
->txstatus_timer
.function
= rt2800usb_tx_sta_fifo_timeout
;
624 * Overwrite TX done handler
626 INIT_WORK(&rt2x00dev
->txdone_work
, rt2800usb_work_txdone
);
631 static const struct ieee80211_ops rt2800usb_mac80211_ops
= {
633 .start
= rt2x00mac_start
,
634 .stop
= rt2x00mac_stop
,
635 .add_interface
= rt2x00mac_add_interface
,
636 .remove_interface
= rt2x00mac_remove_interface
,
637 .config
= rt2x00mac_config
,
638 .configure_filter
= rt2x00mac_configure_filter
,
639 .set_tim
= rt2x00mac_set_tim
,
640 .set_key
= rt2x00mac_set_key
,
641 .sw_scan_start
= rt2x00mac_sw_scan_start
,
642 .sw_scan_complete
= rt2x00mac_sw_scan_complete
,
643 .get_stats
= rt2x00mac_get_stats
,
644 .get_key_seq
= rt2800_get_key_seq
,
645 .set_rts_threshold
= rt2800_set_rts_threshold
,
646 .sta_add
= rt2800_sta_add
,
647 .sta_remove
= rt2800_sta_remove
,
648 .bss_info_changed
= rt2x00mac_bss_info_changed
,
649 .conf_tx
= rt2800_conf_tx
,
650 .get_tsf
= rt2800_get_tsf
,
651 .rfkill_poll
= rt2x00mac_rfkill_poll
,
652 .ampdu_action
= rt2800_ampdu_action
,
653 .flush
= rt2x00mac_flush
,
654 .get_survey
= rt2800_get_survey
,
655 .get_ringparam
= rt2x00mac_get_ringparam
,
656 .tx_frames_pending
= rt2x00mac_tx_frames_pending
,
657 .reconfig_complete
= rt2x00mac_reconfig_complete
,
660 static const struct rt2800_ops rt2800usb_rt2800_ops
= {
661 .register_read
= rt2x00usb_register_read
,
662 .register_read_lock
= rt2x00usb_register_read_lock
,
663 .register_write
= rt2x00usb_register_write
,
664 .register_write_lock
= rt2x00usb_register_write_lock
,
665 .register_multiread
= rt2x00usb_register_multiread
,
666 .register_multiwrite
= rt2x00usb_register_multiwrite
,
667 .regbusy_read
= rt2x00usb_regbusy_read
,
668 .read_eeprom
= rt2800usb_read_eeprom
,
669 .hwcrypt_disabled
= rt2800usb_hwcrypt_disabled
,
670 .drv_write_firmware
= rt2800usb_write_firmware
,
671 .drv_init_registers
= rt2800usb_init_registers
,
672 .drv_get_txwi
= rt2800usb_get_txwi
,
673 .drv_get_dma_done
= rt2800usb_get_dma_done
,
676 static const struct rt2x00lib_ops rt2800usb_rt2x00_ops
= {
677 .probe_hw
= rt2800usb_probe_hw
,
678 .get_firmware_name
= rt2800usb_get_firmware_name
,
679 .check_firmware
= rt2800_check_firmware
,
680 .load_firmware
= rt2800_load_firmware
,
681 .initialize
= rt2x00usb_initialize
,
682 .uninitialize
= rt2x00usb_uninitialize
,
683 .clear_entry
= rt2x00usb_clear_entry
,
684 .set_device_state
= rt2800usb_set_device_state
,
685 .rfkill_poll
= rt2800_rfkill_poll
,
686 .link_stats
= rt2800_link_stats
,
687 .reset_tuner
= rt2800_reset_tuner
,
688 .link_tuner
= rt2800_link_tuner
,
689 .gain_calibration
= rt2800_gain_calibration
,
690 .vco_calibration
= rt2800_vco_calibration
,
691 .watchdog
= rt2800_watchdog
,
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
,
710 .pre_reset_hw
= rt2800_pre_reset_hw
,
713 static void rt2800usb_queue_init(struct data_queue
*queue
)
715 struct rt2x00_dev
*rt2x00dev
= queue
->rt2x00dev
;
716 unsigned short txwi_size
, rxwi_size
;
718 rt2800_get_txwi_rxwi_size(rt2x00dev
, &txwi_size
, &rxwi_size
);
720 switch (queue
->qid
) {
723 queue
->data_size
= AGGREGATION_SIZE
;
724 queue
->desc_size
= RXINFO_DESC_SIZE
;
725 queue
->winfo_size
= rxwi_size
;
726 queue
->priv_size
= sizeof(struct queue_entry_priv_usb
);
734 queue
->data_size
= AGGREGATION_SIZE
;
735 queue
->desc_size
= TXINFO_DESC_SIZE
;
736 queue
->winfo_size
= txwi_size
;
737 queue
->priv_size
= sizeof(struct queue_entry_priv_usb
);
742 queue
->data_size
= MGMT_FRAME_SIZE
;
743 queue
->desc_size
= TXINFO_DESC_SIZE
;
744 queue
->winfo_size
= txwi_size
;
745 queue
->priv_size
= sizeof(struct queue_entry_priv_usb
);
756 static const struct rt2x00_ops rt2800usb_ops
= {
757 .name
= KBUILD_MODNAME
,
758 .drv_data_size
= sizeof(struct rt2800_drv_data
),
760 .eeprom_size
= EEPROM_SIZE
,
762 .tx_queues
= NUM_TX_QUEUES
,
763 .queue_init
= rt2800usb_queue_init
,
764 .lib
= &rt2800usb_rt2x00_ops
,
765 .drv
= &rt2800usb_rt2800_ops
,
766 .hw
= &rt2800usb_mac80211_ops
,
767 #ifdef CONFIG_RT2X00_LIB_DEBUGFS
768 .debugfs
= &rt2800_rt2x00debug
,
769 #endif /* CONFIG_RT2X00_LIB_DEBUGFS */
773 * rt2800usb module information.
775 static const struct usb_device_id rt2800usb_device_table
[] = {
777 { USB_DEVICE(0x07b8, 0x2870) },
778 { USB_DEVICE(0x07b8, 0x2770) },
779 { USB_DEVICE(0x07b8, 0x3070) },
780 { USB_DEVICE(0x07b8, 0x3071) },
781 { USB_DEVICE(0x07b8, 0x3072) },
782 { USB_DEVICE(0x1482, 0x3c09) },
784 { USB_DEVICE(0x1eda, 0x2012) },
785 { USB_DEVICE(0x1eda, 0x2210) },
786 { USB_DEVICE(0x1eda, 0x2310) },
788 { USB_DEVICE(0x8516, 0x2070) },
789 { USB_DEVICE(0x8516, 0x2770) },
790 { USB_DEVICE(0x8516, 0x2870) },
791 { USB_DEVICE(0x8516, 0x3070) },
792 { USB_DEVICE(0x8516, 0x3071) },
793 { USB_DEVICE(0x8516, 0x3072) },
795 { USB_DEVICE(0x14b2, 0x3c06) },
796 { USB_DEVICE(0x14b2, 0x3c07) },
797 { USB_DEVICE(0x14b2, 0x3c09) },
798 { USB_DEVICE(0x14b2, 0x3c12) },
799 { USB_DEVICE(0x14b2, 0x3c23) },
800 { USB_DEVICE(0x14b2, 0x3c25) },
801 { USB_DEVICE(0x14b2, 0x3c27) },
802 { USB_DEVICE(0x14b2, 0x3c28) },
803 { USB_DEVICE(0x14b2, 0x3c2c) },
805 { USB_DEVICE(0x15c5, 0x0008) },
807 { USB_DEVICE(0x1690, 0x0740) },
809 { USB_DEVICE(0x0b05, 0x1731) },
810 { USB_DEVICE(0x0b05, 0x1732) },
811 { USB_DEVICE(0x0b05, 0x1742) },
812 { USB_DEVICE(0x0b05, 0x1784) },
813 { USB_DEVICE(0x1761, 0x0b05) },
815 { USB_DEVICE(0x13d3, 0x3247) },
816 { USB_DEVICE(0x13d3, 0x3273) },
817 { USB_DEVICE(0x13d3, 0x3305) },
818 { USB_DEVICE(0x13d3, 0x3307) },
819 { USB_DEVICE(0x13d3, 0x3321) },
821 { USB_DEVICE(0x050d, 0x8053) },
822 { USB_DEVICE(0x050d, 0x805c) },
823 { USB_DEVICE(0x050d, 0x815c) },
824 { USB_DEVICE(0x050d, 0x825a) },
825 { USB_DEVICE(0x050d, 0x825b) },
826 { USB_DEVICE(0x050d, 0x935a) },
827 { USB_DEVICE(0x050d, 0x935b) },
829 { USB_DEVICE(0x0411, 0x00e8) },
830 { USB_DEVICE(0x0411, 0x0158) },
831 { USB_DEVICE(0x0411, 0x015d) },
832 { USB_DEVICE(0x0411, 0x016f) },
833 { USB_DEVICE(0x0411, 0x01a2) },
834 { USB_DEVICE(0x0411, 0x01ee) },
835 { USB_DEVICE(0x0411, 0x01a8) },
836 { USB_DEVICE(0x0411, 0x01fd) },
838 { USB_DEVICE(0x07aa, 0x002f) },
839 { USB_DEVICE(0x07aa, 0x003c) },
840 { USB_DEVICE(0x07aa, 0x003f) },
841 { USB_DEVICE(0x18c5, 0x0012) },
843 { USB_DEVICE(0x07d1, 0x3c09) },
844 { USB_DEVICE(0x07d1, 0x3c0a) },
845 { USB_DEVICE(0x07d1, 0x3c0d) },
846 { USB_DEVICE(0x07d1, 0x3c0e) },
847 { USB_DEVICE(0x07d1, 0x3c0f) },
848 { USB_DEVICE(0x07d1, 0x3c11) },
849 { USB_DEVICE(0x07d1, 0x3c13) },
850 { USB_DEVICE(0x07d1, 0x3c15) },
851 { USB_DEVICE(0x07d1, 0x3c16) },
852 { USB_DEVICE(0x07d1, 0x3c17) },
853 { USB_DEVICE(0x2001, 0x3317) },
854 { USB_DEVICE(0x2001, 0x3c1b) },
855 { USB_DEVICE(0x2001, 0x3c25) },
857 { USB_DEVICE(0x07fa, 0x7712) },
859 { USB_DEVICE(0x0fe9, 0xb307) },
861 { USB_DEVICE(0x7392, 0x4085) },
862 { USB_DEVICE(0x7392, 0x7711) },
863 { USB_DEVICE(0x7392, 0x7717) },
864 { USB_DEVICE(0x7392, 0x7718) },
865 { USB_DEVICE(0x7392, 0x7722) },
867 { USB_DEVICE(0x203d, 0x1480) },
868 { USB_DEVICE(0x203d, 0x14a9) },
870 { USB_DEVICE(0x1740, 0x9701) },
871 { USB_DEVICE(0x1740, 0x9702) },
872 { USB_DEVICE(0x1740, 0x9703) },
873 { USB_DEVICE(0x1740, 0x9705) },
874 { USB_DEVICE(0x1740, 0x9706) },
875 { USB_DEVICE(0x1740, 0x9707) },
876 { USB_DEVICE(0x1740, 0x9708) },
877 { USB_DEVICE(0x1740, 0x9709) },
879 { USB_DEVICE(0x15a9, 0x0012) },
881 { USB_DEVICE(0x1044, 0x800b) },
882 { USB_DEVICE(0x1044, 0x800d) },
884 { USB_DEVICE(0x0e66, 0x0001) },
885 { USB_DEVICE(0x0e66, 0x0003) },
886 { USB_DEVICE(0x0e66, 0x0009) },
887 { USB_DEVICE(0x0e66, 0x000b) },
888 { USB_DEVICE(0x0e66, 0x0013) },
889 { USB_DEVICE(0x0e66, 0x0017) },
890 { USB_DEVICE(0x0e66, 0x0018) },
892 { USB_DEVICE(0x04bb, 0x0945) },
893 { USB_DEVICE(0x04bb, 0x0947) },
894 { USB_DEVICE(0x04bb, 0x0948) },
896 { USB_DEVICE(0x13b1, 0x0031) },
897 { USB_DEVICE(0x1737, 0x0070) },
898 { USB_DEVICE(0x1737, 0x0071) },
899 { USB_DEVICE(0x1737, 0x0077) },
900 { USB_DEVICE(0x1737, 0x0078) },
902 { USB_DEVICE(0x0789, 0x0162) },
903 { USB_DEVICE(0x0789, 0x0163) },
904 { USB_DEVICE(0x0789, 0x0164) },
905 { USB_DEVICE(0x0789, 0x0166) },
907 { USB_DEVICE(0x100d, 0x9031) },
909 { USB_DEVICE(0x0db0, 0x3820) },
910 { USB_DEVICE(0x0db0, 0x3821) },
911 { USB_DEVICE(0x0db0, 0x3822) },
912 { USB_DEVICE(0x0db0, 0x3870) },
913 { USB_DEVICE(0x0db0, 0x3871) },
914 { USB_DEVICE(0x0db0, 0x6899) },
915 { USB_DEVICE(0x0db0, 0x821a) },
916 { USB_DEVICE(0x0db0, 0x822a) },
917 { USB_DEVICE(0x0db0, 0x822b) },
918 { USB_DEVICE(0x0db0, 0x822c) },
919 { USB_DEVICE(0x0db0, 0x870a) },
920 { USB_DEVICE(0x0db0, 0x871a) },
921 { USB_DEVICE(0x0db0, 0x871b) },
922 { USB_DEVICE(0x0db0, 0x871c) },
923 { USB_DEVICE(0x0db0, 0x899a) },
925 { USB_DEVICE(0x1b75, 0x3070) },
926 { USB_DEVICE(0x1b75, 0x3071) },
927 { USB_DEVICE(0x1b75, 0x3072) },
928 { USB_DEVICE(0x1b75, 0xa200) },
930 { USB_DEVICE(0x20b8, 0x8888) },
932 { USB_DEVICE(0x1d4d, 0x0002) },
933 { USB_DEVICE(0x1d4d, 0x000c) },
934 { USB_DEVICE(0x1d4d, 0x000e) },
935 { USB_DEVICE(0x1d4d, 0x0011) },
937 { USB_DEVICE(0x0471, 0x200f) },
939 { USB_DEVICE(0x2019, 0x5201) },
940 { USB_DEVICE(0x2019, 0xab25) },
941 { USB_DEVICE(0x2019, 0xed06) },
943 { USB_DEVICE(0x1a32, 0x0304) },
945 { USB_DEVICE(0x148f, 0x2070) },
946 { USB_DEVICE(0x148f, 0x2770) },
947 { USB_DEVICE(0x148f, 0x2870) },
948 { USB_DEVICE(0x148f, 0x3070) },
949 { USB_DEVICE(0x148f, 0x3071) },
950 { USB_DEVICE(0x148f, 0x3072) },
952 { USB_DEVICE(0x04e8, 0x2018) },
954 { USB_DEVICE(0x129b, 0x1828) },
956 { USB_DEVICE(0x0df6, 0x0017) },
957 { USB_DEVICE(0x0df6, 0x002b) },
958 { USB_DEVICE(0x0df6, 0x002c) },
959 { USB_DEVICE(0x0df6, 0x002d) },
960 { USB_DEVICE(0x0df6, 0x0039) },
961 { USB_DEVICE(0x0df6, 0x003b) },
962 { USB_DEVICE(0x0df6, 0x003d) },
963 { USB_DEVICE(0x0df6, 0x003e) },
964 { USB_DEVICE(0x0df6, 0x003f) },
965 { USB_DEVICE(0x0df6, 0x0040) },
966 { USB_DEVICE(0x0df6, 0x0042) },
967 { USB_DEVICE(0x0df6, 0x0047) },
968 { USB_DEVICE(0x0df6, 0x0048) },
969 { USB_DEVICE(0x0df6, 0x0051) },
970 { USB_DEVICE(0x0df6, 0x005f) },
971 { USB_DEVICE(0x0df6, 0x0060) },
973 { USB_DEVICE(0x083a, 0x6618) },
974 { USB_DEVICE(0x083a, 0x7511) },
975 { USB_DEVICE(0x083a, 0x7512) },
976 { USB_DEVICE(0x083a, 0x7522) },
977 { USB_DEVICE(0x083a, 0x8522) },
978 { USB_DEVICE(0x083a, 0xa618) },
979 { USB_DEVICE(0x083a, 0xa701) },
980 { USB_DEVICE(0x083a, 0xa702) },
981 { USB_DEVICE(0x083a, 0xa703) },
982 { USB_DEVICE(0x083a, 0xb522) },
984 { USB_DEVICE(0x15a9, 0x0006) },
986 { USB_DEVICE(0x177f, 0x0153) },
987 { USB_DEVICE(0x177f, 0x0164) },
988 { USB_DEVICE(0x177f, 0x0302) },
989 { USB_DEVICE(0x177f, 0x0313) },
990 { USB_DEVICE(0x177f, 0x0323) },
991 { USB_DEVICE(0x177f, 0x0324) },
993 { USB_DEVICE(0x157e, 0x300e) },
994 { USB_DEVICE(0x157e, 0x3013) },
996 { USB_DEVICE(0x0cde, 0x0022) },
997 { USB_DEVICE(0x0cde, 0x0025) },
999 { USB_DEVICE(0x5a57, 0x0280) },
1000 { USB_DEVICE(0x5a57, 0x0282) },
1001 { USB_DEVICE(0x5a57, 0x0283) },
1002 { USB_DEVICE(0x5a57, 0x5257) },
1004 { USB_DEVICE(0x0586, 0x3416) },
1005 { USB_DEVICE(0x0586, 0x3418) },
1006 { USB_DEVICE(0x0586, 0x341a) },
1007 { USB_DEVICE(0x0586, 0x341e) },
1008 { USB_DEVICE(0x0586, 0x343e) },
1009 #ifdef CONFIG_RT2800USB_RT33XX
1011 { USB_DEVICE(0x050d, 0x945b) },
1013 { USB_DEVICE(0x2001, 0x3c17) },
1015 { USB_DEVICE(0x083a, 0xb511) },
1016 /* Accton/Arcadyan/Epson */
1017 { USB_DEVICE(0x083a, 0xb512) },
1019 { USB_DEVICE(0x0471, 0x20dd) },
1021 { USB_DEVICE(0x148f, 0x3370) },
1022 { USB_DEVICE(0x148f, 0x8070) },
1024 { USB_DEVICE(0x0df6, 0x0050) },
1026 { USB_DEVICE(0x177f, 0x0163) },
1027 { USB_DEVICE(0x177f, 0x0165) },
1029 #ifdef CONFIG_RT2800USB_RT35XX
1031 { USB_DEVICE(0x8516, 0x3572) },
1033 { USB_DEVICE(0x1690, 0x0744) },
1034 { USB_DEVICE(0x1690, 0x0761) },
1035 { USB_DEVICE(0x1690, 0x0764) },
1037 { USB_DEVICE(0x0b05, 0x179d) },
1039 { USB_DEVICE(0x167b, 0x4001) },
1041 { USB_DEVICE(0x1740, 0x9801) },
1043 { USB_DEVICE(0x04bb, 0x0944) },
1045 { USB_DEVICE(0x13b1, 0x002f) },
1046 { USB_DEVICE(0x1737, 0x0079) },
1048 { USB_DEVICE(0x0789, 0x0170) },
1050 { USB_DEVICE(0x148f, 0x3572) },
1052 { USB_DEVICE(0x0df6, 0x0041) },
1053 { USB_DEVICE(0x0df6, 0x0062) },
1054 { USB_DEVICE(0x0df6, 0x0065) },
1055 { USB_DEVICE(0x0df6, 0x0066) },
1056 { USB_DEVICE(0x0df6, 0x0068) },
1058 { USB_DEVICE(0x0930, 0x0a07) },
1060 { USB_DEVICE(0x5a57, 0x0284) },
1062 #ifdef CONFIG_RT2800USB_RT3573
1064 { USB_DEVICE(0x1b75, 0x7733) },
1066 { USB_DEVICE(0x0b05, 0x17bc) },
1067 { USB_DEVICE(0x0b05, 0x17ad) },
1069 { USB_DEVICE(0x050d, 0x1103) },
1071 { USB_DEVICE(0x148f, 0xf301) },
1073 { USB_DEVICE(0x2001, 0x3c1f) },
1075 { USB_DEVICE(0x7392, 0x7733) },
1077 { USB_DEVICE(0x0e66, 0x0020) },
1078 { USB_DEVICE(0x0e66, 0x0021) },
1080 { USB_DEVICE(0x04bb, 0x094e) },
1082 { USB_DEVICE(0x13b1, 0x003b) },
1084 { USB_DEVICE(0x0789, 0x016b) },
1086 { USB_DEVICE(0x0846, 0x9012) },
1087 { USB_DEVICE(0x0846, 0x9013) },
1088 { USB_DEVICE(0x0846, 0x9019) },
1090 { USB_DEVICE(0x2019, 0xed14) },
1091 { USB_DEVICE(0x2019, 0xed19) },
1093 { USB_DEVICE(0x148f, 0x3573) },
1095 { USB_DEVICE(0x0df6, 0x0067) },
1096 { USB_DEVICE(0x0df6, 0x006a) },
1097 { USB_DEVICE(0x0df6, 0x006e) },
1099 { USB_DEVICE(0x0586, 0x3421) },
1101 #ifdef CONFIG_RT2800USB_RT53XX
1103 { USB_DEVICE(0x043e, 0x7a12) },
1104 { USB_DEVICE(0x043e, 0x7a32) },
1106 { USB_DEVICE(0x0b05, 0x17e8) },
1108 { USB_DEVICE(0x13d3, 0x3329) },
1109 { USB_DEVICE(0x13d3, 0x3365) },
1111 { USB_DEVICE(0x2001, 0x3c15) },
1112 { USB_DEVICE(0x2001, 0x3c19) },
1113 { USB_DEVICE(0x2001, 0x3c1c) },
1114 { USB_DEVICE(0x2001, 0x3c1d) },
1115 { USB_DEVICE(0x2001, 0x3c1e) },
1116 { USB_DEVICE(0x2001, 0x3c20) },
1117 { USB_DEVICE(0x2001, 0x3c22) },
1118 { USB_DEVICE(0x2001, 0x3c23) },
1120 { USB_DEVICE(0x043e, 0x7a22) },
1121 { USB_DEVICE(0x043e, 0x7a42) },
1123 { USB_DEVICE(0x04da, 0x1801) },
1124 { USB_DEVICE(0x04da, 0x1800) },
1125 { USB_DEVICE(0x04da, 0x23f6) },
1127 { USB_DEVICE(0x0471, 0x2104) },
1128 { USB_DEVICE(0x0471, 0x2126) },
1129 { USB_DEVICE(0x0471, 0x2180) },
1130 { USB_DEVICE(0x0471, 0x2181) },
1131 { USB_DEVICE(0x0471, 0x2182) },
1133 { USB_DEVICE(0x148f, 0x5370) },
1134 { USB_DEVICE(0x148f, 0x5372) },
1136 #ifdef CONFIG_RT2800USB_RT55XX
1138 { USB_DEVICE(0x043e, 0x7a32) },
1140 { USB_DEVICE(0x057c, 0x8501) },
1142 { USB_DEVICE(0x0411, 0x0241) },
1143 { USB_DEVICE(0x0411, 0x0253) },
1145 { USB_DEVICE(0x2001, 0x3c1a) },
1146 { USB_DEVICE(0x2001, 0x3c21) },
1148 { USB_DEVICE(0x043e, 0x7a13) },
1150 { USB_DEVICE(0x148f, 0x5572) },
1152 { USB_DEVICE(0x20f4, 0x724a) },
1154 #ifdef CONFIG_RT2800USB_UNKNOWN
1156 * Unclear what kind of devices these are (they aren't supported by the
1157 * vendor linux driver).
1160 { USB_DEVICE(0x07b8, 0x3073) },
1161 { USB_DEVICE(0x07b8, 0x3074) },
1162 /* Alpha Networks */
1163 { USB_DEVICE(0x14b2, 0x3c08) },
1164 { USB_DEVICE(0x14b2, 0x3c11) },
1166 { USB_DEVICE(0x0e0b, 0x9031) },
1167 { USB_DEVICE(0x0e0b, 0x9041) },
1169 { USB_DEVICE(0x0b05, 0x166a) },
1170 { USB_DEVICE(0x0b05, 0x1760) },
1171 { USB_DEVICE(0x0b05, 0x1761) },
1172 { USB_DEVICE(0x0b05, 0x1790) },
1173 { USB_DEVICE(0x0b05, 0x17a7) },
1175 { USB_DEVICE(0x13d3, 0x3262) },
1176 { USB_DEVICE(0x13d3, 0x3284) },
1177 { USB_DEVICE(0x13d3, 0x3322) },
1178 { USB_DEVICE(0x13d3, 0x3340) },
1179 { USB_DEVICE(0x13d3, 0x3399) },
1180 { USB_DEVICE(0x13d3, 0x3400) },
1181 { USB_DEVICE(0x13d3, 0x3401) },
1183 { USB_DEVICE(0x050d, 0x1003) },
1185 { USB_DEVICE(0x0411, 0x012e) },
1186 { USB_DEVICE(0x0411, 0x0148) },
1187 { USB_DEVICE(0x0411, 0x0150) },
1189 { USB_DEVICE(0x07aa, 0x0041) },
1190 { USB_DEVICE(0x07aa, 0x0042) },
1191 { USB_DEVICE(0x18c5, 0x0008) },
1193 { USB_DEVICE(0x07d1, 0x3c0b) },
1195 { USB_DEVICE(0x203d, 0x14a1) },
1197 { USB_DEVICE(0x1740, 0x0600) },
1198 { USB_DEVICE(0x1740, 0x0602) },
1200 { USB_DEVICE(0x15a9, 0x0010) },
1202 { USB_DEVICE(0x1044, 0x800c) },
1204 { USB_DEVICE(0x06f8, 0xe036) },
1206 { USB_DEVICE(0x148f, 0xf101) },
1208 { USB_DEVICE(0x04bb, 0x094b) },
1210 { USB_DEVICE(0x1740, 0x0605) },
1211 { USB_DEVICE(0x1740, 0x0615) },
1213 { USB_DEVICE(0x0789, 0x0168) },
1214 { USB_DEVICE(0x0789, 0x0169) },
1216 { USB_DEVICE(0x100d, 0x9032) },
1218 { USB_DEVICE(0x05a6, 0x0101) },
1219 { USB_DEVICE(0x1d4d, 0x0010) },
1221 { USB_DEVICE(0x2019, 0xab24) },
1222 { USB_DEVICE(0x2019, 0xab29) },
1224 { USB_DEVICE(0x18e8, 0x6259) },
1226 { USB_DEVICE(0x08b9, 0x1197) },
1228 { USB_DEVICE(0x0df6, 0x003c) },
1229 { USB_DEVICE(0x0df6, 0x004a) },
1230 { USB_DEVICE(0x0df6, 0x004d) },
1231 { USB_DEVICE(0x0df6, 0x0053) },
1232 { USB_DEVICE(0x0df6, 0x0069) },
1233 { USB_DEVICE(0x0df6, 0x006f) },
1234 { USB_DEVICE(0x0df6, 0x0078) },
1236 { USB_DEVICE(0x083a, 0xa512) },
1237 { USB_DEVICE(0x083a, 0xc522) },
1238 { USB_DEVICE(0x083a, 0xd522) },
1239 { USB_DEVICE(0x083a, 0xf511) },
1241 { USB_DEVICE(0x177f, 0x0254) },
1243 { USB_DEVICE(0xf201, 0x5370) },
1248 MODULE_AUTHOR(DRV_PROJECT
);
1249 MODULE_VERSION(DRV_VERSION
);
1250 MODULE_DESCRIPTION("Ralink RT2800 USB Wireless LAN driver.");
1251 MODULE_SUPPORTED_DEVICE("Ralink RT2870 USB chipset based cards");
1252 MODULE_DEVICE_TABLE(usb
, rt2800usb_device_table
);
1253 MODULE_FIRMWARE(FIRMWARE_RT2870
);
1254 MODULE_LICENSE("GPL");
1256 static int rt2800usb_probe(struct usb_interface
*usb_intf
,
1257 const struct usb_device_id
*id
)
1259 return rt2x00usb_probe(usb_intf
, &rt2800usb_ops
);
1262 static struct usb_driver rt2800usb_driver
= {
1263 .name
= KBUILD_MODNAME
,
1264 .id_table
= rt2800usb_device_table
,
1265 .probe
= rt2800usb_probe
,
1266 .disconnect
= rt2x00usb_disconnect
,
1267 .suspend
= rt2x00usb_suspend
,
1268 .resume
= rt2x00usb_resume
,
1269 .reset_resume
= rt2x00usb_resume
,
1270 .disable_hub_initiated_lpm
= 1,
1273 module_usb_driver(rt2800usb_driver
);