31 #include <linux/kernel.h>
32 #include <linux/module.h>
33 #include <linux/slab.h>
43 static bool modparam_nohwcrypt;
61 #define WAIT_FOR_BBP(__dev, __reg) \
62 rt2x00usb_regbusy_read((__dev), PHY_CSR3, PHY_CSR3_BUSY, (__reg))
63 #define WAIT_FOR_RF(__dev, __reg) \
64 rt2x00usb_regbusy_read((__dev), PHY_CSR4, PHY_CSR4_BUSY, (__reg))
66 static void rt73usb_bbp_write(
struct rt2x00_dev *rt2x00dev,
84 rt2x00usb_register_write_lock(rt2x00dev,
PHY_CSR3, reg);
90 static void rt73usb_bbp_read(
struct rt2x00_dev *rt2x00dev,
111 rt2x00usb_register_write_lock(rt2x00dev,
PHY_CSR3, reg);
121 static void rt73usb_rf_write(
struct rt2x00_dev *rt2x00dev,
122 const unsigned int word,
const u32 value)
140 20 + (rt2x00_rf(rt2x00dev,
RF5225) ||
141 rt2x00_rf(rt2x00dev,
RF2527)));
145 rt2x00usb_register_write_lock(rt2x00dev,
PHY_CSR4, reg);
146 rt2x00_rf_write(rt2x00dev, word, value);
152 #ifdef CONFIG_RT2X00_LIB_DEBUGFS
153 static const struct rt2x00debug rt73usb_rt2x00debug = {
156 .read = rt2x00usb_register_read,
157 .write = rt2x00usb_register_write,
160 .word_size =
sizeof(
u32),
164 .read = rt2x00_eeprom_read,
165 .write = rt2x00_eeprom_write,
167 .word_size =
sizeof(
u16),
171 .read = rt73usb_bbp_read,
172 .write = rt73usb_bbp_write,
174 .word_size =
sizeof(
u8),
178 .read = rt2x00_rf_read,
179 .write = rt73usb_rf_write,
181 .word_size =
sizeof(
u32),
187 static int rt73usb_rfkill_poll(
struct rt2x00_dev *rt2x00dev)
191 rt2x00usb_register_read(rt2x00dev,
MAC_CSR13, ®);
195 #ifdef CONFIG_RT2X00_LIB_LEDS
196 static void rt73usb_brightness_set(
struct led_classdev *led_cdev,
202 unsigned int a_mode =
204 unsigned int bg_mode =
236 static int rt73usb_blink_set(
struct led_classdev *led_cdev,
237 unsigned long *delay_on,
238 unsigned long *delay_off)
252 static void rt73usb_init_led(
struct rt2x00_dev *rt2x00dev,
258 led->
led_dev.brightness_set = rt73usb_brightness_set;
259 led->
led_dev.blink_set = rt73usb_blink_set;
267 static int rt73usb_config_shared_key(
struct rt2x00_dev *rt2x00dev,
287 mask = (0xf << crypto->
bssidx);
289 rt2x00usb_register_read(rt2x00dev,
SEC_CSR0, ®);
292 if (reg && reg == mask)
301 sizeof(key_entry.key));
303 sizeof(key_entry.tx_mic));
305 sizeof(key_entry.rx_mic));
308 rt2x00usb_register_multiwrite(rt2x00dev, reg,
309 &key_entry,
sizeof(key_entry));
322 rt2x00usb_register_read(rt2x00dev,
SEC_CSR1, ®);
324 rt2x00usb_register_write(rt2x00dev,
SEC_CSR1, reg);
329 rt2x00usb_register_read(rt2x00dev,
SEC_CSR5, ®);
331 rt2x00usb_register_write(rt2x00dev,
SEC_CSR5, reg);
354 rt2x00usb_register_read(rt2x00dev,
SEC_CSR0, ®);
359 rt2x00usb_register_write(rt2x00dev,
SEC_CSR0, reg);
364 static int rt73usb_config_pairwise_key(
struct rt2x00_dev *rt2x00dev,
383 rt2x00usb_register_read(rt2x00dev,
SEC_CSR2, ®);
384 if (reg && reg == ~0) {
386 rt2x00usb_register_read(rt2x00dev,
SEC_CSR3, ®);
387 if (reg && reg == ~0)
397 sizeof(key_entry.key));
399 sizeof(key_entry.tx_mic));
401 sizeof(key_entry.rx_mic));
404 rt2x00usb_register_multiwrite(rt2x00dev, reg,
405 &key_entry,
sizeof(key_entry));
410 memset(&addr_entry, 0,
sizeof(addr_entry));
412 addr_entry.cipher = crypto->
cipher;
415 rt2x00usb_register_multiwrite(rt2x00dev, reg,
416 &addr_entry,
sizeof(addr_entry));
423 rt2x00usb_register_read(rt2x00dev,
SEC_CSR4, ®);
424 reg |= (1 << crypto->
bssidx);
425 rt2x00usb_register_write(rt2x00dev,
SEC_CSR4, reg);
448 rt2x00usb_register_read(rt2x00dev,
SEC_CSR2, ®);
453 rt2x00usb_register_write(rt2x00dev,
SEC_CSR2, reg);
457 rt2x00usb_register_read(rt2x00dev,
SEC_CSR3, ®);
462 rt2x00usb_register_write(rt2x00dev,
SEC_CSR3, reg);
468 static void rt73usb_config_filter(
struct rt2x00_dev *rt2x00dev,
469 const unsigned int filter_flags)
479 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR0, ®);
497 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR0, reg);
500 static void rt73usb_config_intf(
struct rt2x00_dev *rt2x00dev,
503 const unsigned int flags)
511 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR9, ®);
513 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR9, reg);
521 rt2x00usb_register_multiwrite(rt2x00dev,
MAC_CSR2,
522 conf->
mac,
sizeof(conf->
mac));
530 rt2x00usb_register_multiwrite(rt2x00dev,
MAC_CSR4,
535 static void rt73usb_config_erp(
struct rt2x00_dev *rt2x00dev,
541 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR0, ®);
544 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR0, reg);
547 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR4, ®);
551 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR4, reg);
555 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR5,
559 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR9, ®);
562 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR9, reg);
566 rt2x00usb_register_read(rt2x00dev,
MAC_CSR9, ®);
568 rt2x00usb_register_write(rt2x00dev,
MAC_CSR9, reg);
570 rt2x00usb_register_read(rt2x00dev,
MAC_CSR8, ®);
574 rt2x00usb_register_write(rt2x00dev,
MAC_CSR8, reg);
578 static void rt73usb_config_antenna_5x(
struct rt2x00_dev *rt2x00dev,
586 rt73usb_bbp_read(rt2x00dev, 3, &r3);
587 rt73usb_bbp_read(rt2x00dev, 4, &r4);
588 rt73usb_bbp_read(rt2x00dev, 77, &r77);
621 rt73usb_bbp_write(rt2x00dev, 77, r77);
622 rt73usb_bbp_write(rt2x00dev, 3, r3);
623 rt73usb_bbp_write(rt2x00dev, 4, r4);
626 static void rt73usb_config_antenna_2x(
struct rt2x00_dev *rt2x00dev,
633 rt73usb_bbp_read(rt2x00dev, 3, &r3);
634 rt73usb_bbp_read(rt2x00dev, 4, &r4);
635 rt73usb_bbp_read(rt2x00dev, 77, &r77);
659 rt73usb_bbp_write(rt2x00dev, 77, r77);
660 rt73usb_bbp_write(rt2x00dev, 3, r3);
661 rt73usb_bbp_write(rt2x00dev, 4, r4);
673 static const struct antenna_sel antenna_sel_a[] = {
674 { 96, { 0x58, 0x78 } },
675 { 104, { 0x38, 0x48 } },
676 { 75, { 0xfe, 0x80 } },
677 { 86, { 0xfe, 0x80 } },
678 { 88, { 0xfe, 0x80 } },
679 { 35, { 0x60, 0x60 } },
680 { 97, { 0x58, 0x58 } },
681 { 98, { 0x58, 0x58 } },
684 static const struct antenna_sel antenna_sel_bg[] = {
685 { 96, { 0x48, 0x68 } },
686 { 104, { 0x2c, 0x3c } },
687 { 75, { 0xfe, 0x80 } },
688 { 86, { 0xfe, 0x80 } },
689 { 88, { 0xfe, 0x80 } },
690 { 35, { 0x50, 0x50 } },
691 { 97, { 0x48, 0x48 } },
692 { 98, { 0x48, 0x48 } },
695 static void rt73usb_config_ant(
struct rt2x00_dev *rt2x00dev,
714 sel = antenna_sel_bg;
718 for (i = 0; i <
ARRAY_SIZE(antenna_sel_a); i++)
719 rt73usb_bbp_write(rt2x00dev, sel[i].word, sel[i].value[lna]);
721 rt2x00usb_register_read(rt2x00dev,
PHY_CSR0, ®);
728 rt2x00usb_register_write(rt2x00dev,
PHY_CSR0, reg);
730 if (rt2x00_rf(rt2x00dev,
RF5226) || rt2x00_rf(rt2x00dev,
RF5225))
731 rt73usb_config_antenna_5x(rt2x00dev, ant);
732 else if (rt2x00_rf(rt2x00dev,
RF2528) || rt2x00_rf(rt2x00dev,
RF2527))
733 rt73usb_config_antenna_2x(rt2x00dev, ant);
736 static void rt73usb_config_lna_gain(
struct rt2x00_dev *rt2x00dev,
756 static void rt73usb_config_channel(
struct rt2x00_dev *rt2x00dev,
766 smart = !(rt2x00_rf(rt2x00dev,
RF5225) || rt2x00_rf(rt2x00dev,
RF2527));
768 rt73usb_bbp_read(rt2x00dev, 3, &r3);
770 rt73usb_bbp_write(rt2x00dev, 3, r3);
775 else if (txpower < MIN_TXPOWER && txpower >= (
MIN_TXPOWER - r94))
777 rt73usb_bbp_write(rt2x00dev, 94, r94);
779 rt73usb_rf_write(rt2x00dev, 1, rf->
rf1);
780 rt73usb_rf_write(rt2x00dev, 2, rf->
rf2);
781 rt73usb_rf_write(rt2x00dev, 3, rf->
rf3 & ~0x00000004);
782 rt73usb_rf_write(rt2x00dev, 4, rf->
rf4);
784 rt73usb_rf_write(rt2x00dev, 1, rf->
rf1);
785 rt73usb_rf_write(rt2x00dev, 2, rf->
rf2);
786 rt73usb_rf_write(rt2x00dev, 3, rf->
rf3 | 0x00000004);
787 rt73usb_rf_write(rt2x00dev, 4, rf->
rf4);
789 rt73usb_rf_write(rt2x00dev, 1, rf->
rf1);
790 rt73usb_rf_write(rt2x00dev, 2, rf->
rf2);
791 rt73usb_rf_write(rt2x00dev, 3, rf->
rf3 & ~0x00000004);
792 rt73usb_rf_write(rt2x00dev, 4, rf->
rf4);
797 static void rt73usb_config_txpower(
struct rt2x00_dev *rt2x00dev,
802 rt2x00_rf_read(rt2x00dev, 1, &rf.
rf1);
803 rt2x00_rf_read(rt2x00dev, 2, &rf.
rf2);
804 rt2x00_rf_read(rt2x00dev, 3, &rf.
rf3);
805 rt2x00_rf_read(rt2x00dev, 4, &rf.
rf4);
807 rt73usb_config_channel(rt2x00dev, &rf, txpower);
810 static void rt73usb_config_retry_limit(
struct rt2x00_dev *rt2x00dev,
815 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR4, ®);
820 libconf->
conf->long_frame_max_tx_count);
822 libconf->
conf->short_frame_max_tx_count);
823 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR4, reg);
826 static void rt73usb_config_ps(
struct rt2x00_dev *rt2x00dev,
835 rt2x00usb_register_read(rt2x00dev,
MAC_CSR11, ®);
839 libconf->
conf->listen_interval - 1);
844 rt2x00usb_register_write(rt2x00dev,
MAC_CSR11, reg);
847 rt2x00usb_register_write(rt2x00dev,
MAC_CSR11, reg);
852 rt2x00usb_register_read(rt2x00dev,
MAC_CSR11, ®);
857 rt2x00usb_register_write(rt2x00dev,
MAC_CSR11, reg);
864 static void rt73usb_config(
struct rt2x00_dev *rt2x00dev,
866 const unsigned int flags)
869 rt73usb_config_lna_gain(rt2x00dev, libconf);
872 rt73usb_config_channel(rt2x00dev, &libconf->
rf,
873 libconf->
conf->power_level);
875 !(flags & IEEE80211_CONF_CHANGE_CHANNEL))
876 rt73usb_config_txpower(rt2x00dev, libconf->
conf->power_level);
878 rt73usb_config_retry_limit(rt2x00dev, libconf);
880 rt73usb_config_ps(rt2x00dev, libconf);
886 static void rt73usb_link_stats(
struct rt2x00_dev *rt2x00dev,
894 rt2x00usb_register_read(rt2x00dev,
STA_CSR0, ®);
900 rt2x00usb_register_read(rt2x00dev,
STA_CSR1, ®);
904 static inline void rt73usb_set_vgc(
struct rt2x00_dev *rt2x00dev,
908 rt73usb_bbp_write(rt2x00dev, 17, vgc_level);
914 static void rt73usb_reset_tuner(
struct rt2x00_dev *rt2x00dev,
917 rt73usb_set_vgc(rt2x00dev, qual, 0x20);
920 static void rt73usb_link_tuner(
struct rt2x00_dev *rt2x00dev,
938 if (qual->
rssi > -82) {
941 }
else if (qual->
rssi > -84) {
960 goto dynamic_cca_tune;
965 if (qual->
rssi > -35) {
966 rt73usb_set_vgc(rt2x00dev, qual, 0x60);
973 if (qual->
rssi >= -58) {
974 rt73usb_set_vgc(rt2x00dev, qual, up_bound);
981 if (qual->
rssi >= -66) {
982 rt73usb_set_vgc(rt2x00dev, qual, low_bound + 0x10);
989 if (qual->
rssi >= -74) {
990 rt73usb_set_vgc(rt2x00dev, qual, low_bound + 0x08);
998 up_bound -= 2 * (-74 - qual->
rssi);
999 if (low_bound > up_bound)
1000 up_bound = low_bound;
1003 rt73usb_set_vgc(rt2x00dev, qual, up_bound);
1014 rt73usb_set_vgc(rt2x00dev, qual,
1017 rt73usb_set_vgc(rt2x00dev, qual,
1029 switch (queue->
qid) {
1031 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR0, ®);
1033 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR0, reg);
1036 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR9, ®);
1040 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR9, reg);
1047 static void rt73usb_stop_queue(
struct data_queue *queue)
1052 switch (queue->
qid) {
1054 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR0, ®);
1056 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR0, reg);
1059 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR9, ®);
1063 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR9, reg);
1073 static char *rt73usb_get_firmware_name(
struct rt2x00_dev *rt2x00dev)
1078 static int rt73usb_check_firmware(
struct rt2x00_dev *rt2x00dev,
1079 const u8 *
data,
const size_t len)
1095 fw_crc = (data[len - 2] << 8 | data[len - 1]);
1101 crc = crc_itu_t_byte(crc, 0);
1102 crc = crc_itu_t_byte(crc, 0);
1107 static int rt73usb_load_firmware(
struct rt2x00_dev *rt2x00dev,
1108 const u8 *data,
const size_t len)
1117 for (i = 0; i < 100; i++) {
1118 rt2x00usb_register_read(rt2x00dev,
MAC_CSR0, ®);
1125 ERROR(rt2x00dev,
"Unstable hardware.\n");
1142 ERROR(rt2x00dev,
"Failed to write Firmware to device.\n");
1152 static int rt73usb_init_registers(
struct rt2x00_dev *rt2x00dev)
1156 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR0, ®);
1160 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR0, reg);
1162 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR1, ®);
1171 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR1, reg);
1176 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR2, ®);
1185 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR2, reg);
1190 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR3, ®);
1197 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR3, reg);
1199 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR7, ®);
1204 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR7, reg);
1206 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR8, ®);
1211 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR8, reg);
1213 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR9, ®);
1220 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR9, reg);
1222 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR15, 0x0000000f);
1224 rt2x00usb_register_read(rt2x00dev,
MAC_CSR6, ®);
1226 rt2x00usb_register_write(rt2x00dev,
MAC_CSR6, reg);
1228 rt2x00usb_register_write(rt2x00dev,
MAC_CSR10, 0x00000718);
1230 if (rt2x00dev->
ops->lib->set_device_state(rt2x00dev,
STATE_AWAKE))
1233 rt2x00usb_register_write(rt2x00dev,
MAC_CSR13, 0x00007f00);
1239 rt2x00usb_register_write(rt2x00dev,
SEC_CSR0, 0x00000000);
1240 rt2x00usb_register_write(rt2x00dev,
SEC_CSR1, 0x00000000);
1241 rt2x00usb_register_write(rt2x00dev,
SEC_CSR5, 0x00000000);
1244 if (rt2x00_rf(rt2x00dev,
RF5225) || rt2x00_rf(rt2x00dev,
RF2527))
1246 rt2x00usb_register_write(rt2x00dev,
PHY_CSR1, reg);
1248 rt2x00usb_register_write(rt2x00dev,
PHY_CSR5, 0x00040a06);
1249 rt2x00usb_register_write(rt2x00dev,
PHY_CSR6, 0x00080606);
1250 rt2x00usb_register_write(rt2x00dev,
PHY_CSR7, 0x00000408);
1252 rt2x00usb_register_read(rt2x00dev,
MAC_CSR9, ®);
1254 rt2x00usb_register_write(rt2x00dev,
MAC_CSR9, reg);
1272 rt2x00usb_register_read(rt2x00dev,
STA_CSR0, ®);
1273 rt2x00usb_register_read(rt2x00dev,
STA_CSR1, ®);
1274 rt2x00usb_register_read(rt2x00dev,
STA_CSR2, ®);
1279 rt2x00usb_register_read(rt2x00dev,
MAC_CSR1, ®);
1282 rt2x00usb_register_write(rt2x00dev,
MAC_CSR1, reg);
1284 rt2x00usb_register_read(rt2x00dev,
MAC_CSR1, ®);
1287 rt2x00usb_register_write(rt2x00dev,
MAC_CSR1, reg);
1289 rt2x00usb_register_read(rt2x00dev,
MAC_CSR1, ®);
1291 rt2x00usb_register_write(rt2x00dev,
MAC_CSR1, reg);
1296 static int rt73usb_wait_bbp_ready(
struct rt2x00_dev *rt2x00dev)
1302 rt73usb_bbp_read(rt2x00dev, 0, &value);
1303 if ((value != 0xff) && (value != 0x00))
1308 ERROR(rt2x00dev,
"BBP register access failed, aborting.\n");
1312 static int rt73usb_init_bbp(
struct rt2x00_dev *rt2x00dev)
1319 if (
unlikely(rt73usb_wait_bbp_ready(rt2x00dev)))
1322 rt73usb_bbp_write(rt2x00dev, 3, 0x80);
1323 rt73usb_bbp_write(rt2x00dev, 15, 0x30);
1324 rt73usb_bbp_write(rt2x00dev, 21, 0xc8);
1325 rt73usb_bbp_write(rt2x00dev, 22, 0x38);
1326 rt73usb_bbp_write(rt2x00dev, 23, 0x06);
1327 rt73usb_bbp_write(rt2x00dev, 24, 0xfe);
1328 rt73usb_bbp_write(rt2x00dev, 25, 0x0a);
1329 rt73usb_bbp_write(rt2x00dev, 26, 0x0d);
1330 rt73usb_bbp_write(rt2x00dev, 32, 0x0b);
1331 rt73usb_bbp_write(rt2x00dev, 34, 0x12);
1332 rt73usb_bbp_write(rt2x00dev, 37, 0x07);
1333 rt73usb_bbp_write(rt2x00dev, 39, 0xf8);
1334 rt73usb_bbp_write(rt2x00dev, 41, 0x60);
1335 rt73usb_bbp_write(rt2x00dev, 53, 0x10);
1336 rt73usb_bbp_write(rt2x00dev, 54, 0x18);
1337 rt73usb_bbp_write(rt2x00dev, 60, 0x10);
1338 rt73usb_bbp_write(rt2x00dev, 61, 0x04);
1339 rt73usb_bbp_write(rt2x00dev, 62, 0x04);
1340 rt73usb_bbp_write(rt2x00dev, 75, 0xfe);
1341 rt73usb_bbp_write(rt2x00dev, 86, 0xfe);
1342 rt73usb_bbp_write(rt2x00dev, 88, 0xfe);
1343 rt73usb_bbp_write(rt2x00dev, 90, 0x0f);
1344 rt73usb_bbp_write(rt2x00dev, 99, 0x00);
1345 rt73usb_bbp_write(rt2x00dev, 102, 0x16);
1346 rt73usb_bbp_write(rt2x00dev, 107, 0x04);
1351 if (eeprom != 0xffff && eeprom != 0x0000) {
1354 rt73usb_bbp_write(rt2x00dev, reg_id, value);
1364 static int rt73usb_enable_radio(
struct rt2x00_dev *rt2x00dev)
1369 if (
unlikely(rt73usb_init_registers(rt2x00dev) ||
1370 rt73usb_init_bbp(rt2x00dev)))
1376 static void rt73usb_disable_radio(
struct rt2x00_dev *rt2x00dev)
1378 rt2x00usb_register_write(rt2x00dev,
MAC_CSR10, 0x00001818);
1383 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR9, 0);
1396 rt2x00usb_register_read(rt2x00dev,
MAC_CSR12, ®);
1399 rt2x00usb_register_write(rt2x00dev,
MAC_CSR12, reg);
1407 rt2x00usb_register_read(rt2x00dev,
MAC_CSR12, ®2);
1409 if (state == !put_to_sleep)
1411 rt2x00usb_register_write(rt2x00dev,
MAC_CSR12, reg);
1418 static int rt73usb_set_device_state(
struct rt2x00_dev *rt2x00dev,
1425 retval = rt73usb_enable_radio(rt2x00dev);
1428 rt73usb_disable_radio(rt2x00dev);
1438 retval = rt73usb_set_state(rt2x00dev, state);
1446 ERROR(rt2x00dev,
"Device failed to enter state %d (%d).\n",
1455 static void rt73usb_write_tx_desc(
struct queue_entry *
entry,
1465 rt2x00_desc_read(txd, 0, &word);
1489 rt2x00_desc_write(txd, 0, word);
1491 rt2x00_desc_read(txd, 1, &word);
1499 rt2x00_desc_write(txd, 1, word);
1501 rt2x00_desc_read(txd, 2, &word);
1505 txdesc->
u.
plcp.length_low);
1507 txdesc->
u.
plcp.length_high);
1508 rt2x00_desc_write(txd, 2, word);
1511 _rt2x00_desc_write(txd, 3, skbdesc->
iv[0]);
1512 _rt2x00_desc_write(txd, 4, skbdesc->
iv[1]);
1515 rt2x00_desc_read(txd, 5, &word);
1519 rt2x00_desc_write(txd, 5, word);
1525 skbdesc->
desc = txd;
1532 static void rt73usb_write_beacon(
struct queue_entry *entry,
1535 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
1536 unsigned int beacon_base;
1537 unsigned int padding_len;
1544 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR9, ®);
1547 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR9, reg);
1558 rt73usb_write_tx_desc(entry, txdesc);
1568 padding_len =
roundup(entry->skb->len, 4) - entry->skb->len;
1569 if (padding_len &&
skb_pad(entry->skb, padding_len)) {
1570 ERROR(rt2x00dev,
"Failure padding beacon, aborting\n");
1573 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR9, orig_reg);
1578 rt2x00usb_register_multiwrite(rt2x00dev, beacon_base, entry->skb->data,
1579 entry->skb->len + padding_len);
1587 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR10, 0x00001008);
1590 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR9, reg);
1595 dev_kfree_skb(entry->skb);
1599 static void rt73usb_clear_beacon(
struct queue_entry *entry)
1601 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
1602 unsigned int beacon_base;
1609 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR9, ®);
1611 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR9, reg);
1617 rt2x00usb_register_write(rt2x00dev, beacon_base, 0);
1623 rt2x00usb_register_write(rt2x00dev,
TXRX_CSR9, reg);
1626 static int rt73usb_get_tx_data_len(
struct queue_entry *entry)
1634 length =
roundup(entry->skb->len, 4);
1635 length += (4 * !(length % entry->queue->usb_maxpacket));
1643 static int rt73usb_agc_to_rssi(
struct rt2x00_dev *rt2x00dev,
int rxd_w1)
1665 if (lna == 3 || lna == 2)
1678 static void rt73usb_fill_rxdone(
struct queue_entry *entry,
1681 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
1697 rt2x00_desc_read(rxd, 0, &word0);
1698 rt2x00_desc_read(rxd, 1, &word1);
1707 _rt2x00_desc_read(rxd, 2, &rxdesc->
iv[0]);
1708 _rt2x00_desc_read(rxd, 3, &rxdesc->
iv[1]);
1711 _rt2x00_desc_read(rxd, 4, &rxdesc->
icv);
1740 rxdesc->
rssi = rt73usb_agc_to_rssi(rt2x00dev, word1);
1753 skb_pull(entry->skb, entry->queue->desc_size);
1760 static int rt73usb_validate_eeprom(
struct rt2x00_dev *rt2x00dev)
1772 if (!is_valid_ether_addr(mac)) {
1773 eth_random_addr(mac);
1774 EEPROM(rt2x00dev,
"MAC: %pM\n", mac);
1778 if (word == 0xffff) {
1789 EEPROM(rt2x00dev,
"Antenna: 0x%04x\n", word);
1792 rt2x00_eeprom_read(rt2x00dev,
EEPROM_NIC, &word);
1793 if (word == 0xffff) {
1795 rt2x00_eeprom_write(rt2x00dev,
EEPROM_NIC, word);
1796 EEPROM(rt2x00dev,
"NIC: 0x%04x\n", word);
1799 rt2x00_eeprom_read(rt2x00dev,
EEPROM_LED, &word);
1800 if (word == 0xffff) {
1811 rt2x00_eeprom_write(rt2x00dev,
EEPROM_LED, word);
1812 EEPROM(rt2x00dev,
"Led: 0x%04x\n", word);
1815 rt2x00_eeprom_read(rt2x00dev,
EEPROM_FREQ, &word);
1816 if (word == 0xffff) {
1819 rt2x00_eeprom_write(rt2x00dev,
EEPROM_FREQ, word);
1820 EEPROM(rt2x00dev,
"Freq: 0x%04x\n", word);
1824 if (word == 0xffff) {
1828 EEPROM(rt2x00dev,
"RSSI OFFSET BG: 0x%04x\n", word);
1831 if (value < -10 || value > 10)
1834 if (value < -10 || value > 10)
1840 if (word == 0xffff) {
1844 EEPROM(rt2x00dev,
"RSSI OFFSET A: 0x%04x\n", word);
1847 if (value < -10 || value > 10)
1850 if (value < -10 || value > 10)
1858 static int rt73usb_init_eeprom(
struct rt2x00_dev *rt2x00dev)
1873 rt2x00usb_register_read(rt2x00dev,
MAC_CSR0, ®);
1877 if (!rt2x00_rt(rt2x00dev,
RT2573) || (rt2x00_rev(rt2x00dev) == 0)) {
1878 ERROR(rt2x00dev,
"Invalid RT chipset detected.\n");
1882 if (!rt2x00_rf(rt2x00dev,
RF5226) &&
1883 !rt2x00_rf(rt2x00dev,
RF2528) &&
1884 !rt2x00_rf(rt2x00dev,
RF5225) &&
1885 !rt2x00_rf(rt2x00dev,
RF2527)) {
1886 ERROR(rt2x00dev,
"Invalid RF chipset detected.\n");
1913 rt2x00_eeprom_read(rt2x00dev,
EEPROM_FREQ, &eeprom);
1919 rt2x00_eeprom_read(rt2x00dev,
EEPROM_NIC, &eeprom);
1929 #ifdef CONFIG_RT2X00_LIB_LEDS
1930 rt2x00_eeprom_read(rt2x00dev,
EEPROM_LED, &eeprom);
1932 rt73usb_init_led(rt2x00dev, &rt2x00dev->led_radio,
LED_TYPE_RADIO);
1933 rt73usb_init_led(rt2x00dev, &rt2x00dev->led_assoc,
LED_TYPE_ASSOC);
1935 rt73usb_init_led(rt2x00dev, &rt2x00dev->led_qual,
1971 static const struct rf_channel rf_vals_bg_2528[] = {
1972 { 1, 0x00002c0c, 0x00000786, 0x00068255, 0x000fea0b },
1973 { 2, 0x00002c0c, 0x00000786, 0x00068255, 0x000fea1f },
1974 { 3, 0x00002c0c, 0x0000078a, 0x00068255, 0x000fea0b },
1975 { 4, 0x00002c0c, 0x0000078a, 0x00068255, 0x000fea1f },
1976 { 5, 0x00002c0c, 0x0000078e, 0x00068255, 0x000fea0b },
1977 { 6, 0x00002c0c, 0x0000078e, 0x00068255, 0x000fea1f },
1978 { 7, 0x00002c0c, 0x00000792, 0x00068255, 0x000fea0b },
1979 { 8, 0x00002c0c, 0x00000792, 0x00068255, 0x000fea1f },
1980 { 9, 0x00002c0c, 0x00000796, 0x00068255, 0x000fea0b },
1981 { 10, 0x00002c0c, 0x00000796, 0x00068255, 0x000fea1f },
1982 { 11, 0x00002c0c, 0x0000079a, 0x00068255, 0x000fea0b },
1983 { 12, 0x00002c0c, 0x0000079a, 0x00068255, 0x000fea1f },
1984 { 13, 0x00002c0c, 0x0000079e, 0x00068255, 0x000fea0b },
1985 { 14, 0x00002c0c, 0x000007a2, 0x00068255, 0x000fea13 },
1992 static const struct rf_channel rf_vals_5226[] = {
1993 { 1, 0x00002c0c, 0x00000786, 0x00068255, 0x000fea0b },
1994 { 2, 0x00002c0c, 0x00000786, 0x00068255, 0x000fea1f },
1995 { 3, 0x00002c0c, 0x0000078a, 0x00068255, 0x000fea0b },
1996 { 4, 0x00002c0c, 0x0000078a, 0x00068255, 0x000fea1f },
1997 { 5, 0x00002c0c, 0x0000078e, 0x00068255, 0x000fea0b },
1998 { 6, 0x00002c0c, 0x0000078e, 0x00068255, 0x000fea1f },
1999 { 7, 0x00002c0c, 0x00000792, 0x00068255, 0x000fea0b },
2000 { 8, 0x00002c0c, 0x00000792, 0x00068255, 0x000fea1f },
2001 { 9, 0x00002c0c, 0x00000796, 0x00068255, 0x000fea0b },
2002 { 10, 0x00002c0c, 0x00000796, 0x00068255, 0x000fea1f },
2003 { 11, 0x00002c0c, 0x0000079a, 0x00068255, 0x000fea0b },
2004 { 12, 0x00002c0c, 0x0000079a, 0x00068255, 0x000fea1f },
2005 { 13, 0x00002c0c, 0x0000079e, 0x00068255, 0x000fea0b },
2006 { 14, 0x00002c0c, 0x000007a2, 0x00068255, 0x000fea13 },
2009 { 36, 0x00002c0c, 0x0000099a, 0x00098255, 0x000fea23 },
2010 { 40, 0x00002c0c, 0x000009a2, 0x00098255, 0x000fea03 },
2011 { 44, 0x00002c0c, 0x000009a6, 0x00098255, 0x000fea0b },
2012 { 48, 0x00002c0c, 0x000009aa, 0x00098255, 0x000fea13 },
2013 { 52, 0x00002c0c, 0x000009ae, 0x00098255, 0x000fea1b },
2014 { 56, 0x00002c0c, 0x000009b2, 0x00098255, 0x000fea23 },
2015 { 60, 0x00002c0c, 0x000009ba, 0x00098255, 0x000fea03 },
2016 { 64, 0x00002c0c, 0x000009be, 0x00098255, 0x000fea0b },
2019 { 100, 0x00002c0c, 0x00000a2a, 0x000b8255, 0x000fea03 },
2020 { 104, 0x00002c0c, 0x00000a2e, 0x000b8255, 0x000fea0b },
2021 { 108, 0x00002c0c, 0x00000a32, 0x000b8255, 0x000fea13 },
2022 { 112, 0x00002c0c, 0x00000a36, 0x000b8255, 0x000fea1b },
2023 { 116, 0x00002c0c, 0x00000a3a, 0x000b8255, 0x000fea23 },
2024 { 120, 0x00002c0c, 0x00000a82, 0x000b8255, 0x000fea03 },
2025 { 124, 0x00002c0c, 0x00000a86, 0x000b8255, 0x000fea0b },
2026 { 128, 0x00002c0c, 0x00000a8a, 0x000b8255, 0x000fea13 },
2027 { 132, 0x00002c0c, 0x00000a8e, 0x000b8255, 0x000fea1b },
2028 { 136, 0x00002c0c, 0x00000a92, 0x000b8255, 0x000fea23 },
2031 { 140, 0x00002c0c, 0x00000a9a, 0x000b8255, 0x000fea03 },
2032 { 149, 0x00002c0c, 0x00000aa2, 0x000b8255, 0x000fea1f },
2033 { 153, 0x00002c0c, 0x00000aa6, 0x000b8255, 0x000fea27 },
2034 { 157, 0x00002c0c, 0x00000aae, 0x000b8255, 0x000fea07 },
2035 { 161, 0x00002c0c, 0x00000ab2, 0x000b8255, 0x000fea0f },
2036 { 165, 0x00002c0c, 0x00000ab6, 0x000b8255, 0x000fea17 },
2039 { 34, 0x00002c0c, 0x0008099a, 0x000da255, 0x000d3a0b },
2040 { 38, 0x00002c0c, 0x0008099e, 0x000da255, 0x000d3a13 },
2041 { 42, 0x00002c0c, 0x000809a2, 0x000da255, 0x000d3a1b },
2042 { 46, 0x00002c0c, 0x000809a6, 0x000da255, 0x000d3a23 },
2049 static const struct rf_channel rf_vals_5225_2527[] = {
2050 { 1, 0x00002ccc, 0x00004786, 0x00068455, 0x000ffa0b },
2051 { 2, 0x00002ccc, 0x00004786, 0x00068455, 0x000ffa1f },
2052 { 3, 0x00002ccc, 0x0000478a, 0x00068455, 0x000ffa0b },
2053 { 4, 0x00002ccc, 0x0000478a, 0x00068455, 0x000ffa1f },
2054 { 5, 0x00002ccc, 0x0000478e, 0x00068455, 0x000ffa0b },
2055 { 6, 0x00002ccc, 0x0000478e, 0x00068455, 0x000ffa1f },
2056 { 7, 0x00002ccc, 0x00004792, 0x00068455, 0x000ffa0b },
2057 { 8, 0x00002ccc, 0x00004792, 0x00068455, 0x000ffa1f },
2058 { 9, 0x00002ccc, 0x00004796, 0x00068455, 0x000ffa0b },
2059 { 10, 0x00002ccc, 0x00004796, 0x00068455, 0x000ffa1f },
2060 { 11, 0x00002ccc, 0x0000479a, 0x00068455, 0x000ffa0b },
2061 { 12, 0x00002ccc, 0x0000479a, 0x00068455, 0x000ffa1f },
2062 { 13, 0x00002ccc, 0x0000479e, 0x00068455, 0x000ffa0b },
2063 { 14, 0x00002ccc, 0x000047a2, 0x00068455, 0x000ffa13 },
2066 { 36, 0x00002ccc, 0x0000499a, 0x0009be55, 0x000ffa23 },
2067 { 40, 0x00002ccc, 0x000049a2, 0x0009be55, 0x000ffa03 },
2068 { 44, 0x00002ccc, 0x000049a6, 0x0009be55, 0x000ffa0b },
2069 { 48, 0x00002ccc, 0x000049aa, 0x0009be55, 0x000ffa13 },
2070 { 52, 0x00002ccc, 0x000049ae, 0x0009ae55, 0x000ffa1b },
2071 { 56, 0x00002ccc, 0x000049b2, 0x0009ae55, 0x000ffa23 },
2072 { 60, 0x00002ccc, 0x000049ba, 0x0009ae55, 0x000ffa03 },
2073 { 64, 0x00002ccc, 0x000049be, 0x0009ae55, 0x000ffa0b },
2076 { 100, 0x00002ccc, 0x00004a2a, 0x000bae55, 0x000ffa03 },
2077 { 104, 0x00002ccc, 0x00004a2e, 0x000bae55, 0x000ffa0b },
2078 { 108, 0x00002ccc, 0x00004a32, 0x000bae55, 0x000ffa13 },
2079 { 112, 0x00002ccc, 0x00004a36, 0x000bae55, 0x000ffa1b },
2080 { 116, 0x00002ccc, 0x00004a3a, 0x000bbe55, 0x000ffa23 },
2081 { 120, 0x00002ccc, 0x00004a82, 0x000bbe55, 0x000ffa03 },
2082 { 124, 0x00002ccc, 0x00004a86, 0x000bbe55, 0x000ffa0b },
2083 { 128, 0x00002ccc, 0x00004a8a, 0x000bbe55, 0x000ffa13 },
2084 { 132, 0x00002ccc, 0x00004a8e, 0x000bbe55, 0x000ffa1b },
2085 { 136, 0x00002ccc, 0x00004a92, 0x000bbe55, 0x000ffa23 },
2088 { 140, 0x00002ccc, 0x00004a9a, 0x000bbe55, 0x000ffa03 },
2089 { 149, 0x00002ccc, 0x00004aa2, 0x000bbe55, 0x000ffa1f },
2090 { 153, 0x00002ccc, 0x00004aa6, 0x000bbe55, 0x000ffa27 },
2091 { 157, 0x00002ccc, 0x00004aae, 0x000bbe55, 0x000ffa07 },
2092 { 161, 0x00002ccc, 0x00004ab2, 0x000bbe55, 0x000ffa0f },
2093 { 165, 0x00002ccc, 0x00004ab6, 0x000bbe55, 0x000ffa17 },
2096 { 34, 0x00002ccc, 0x0000499a, 0x0009be55, 0x000ffa0b },
2097 { 38, 0x00002ccc, 0x0000499e, 0x0009be55, 0x000ffa13 },
2098 { 42, 0x00002ccc, 0x000049a2, 0x0009be55, 0x000ffa1b },
2099 { 46, 0x00002ccc, 0x000049a6, 0x0009be55, 0x000ffa23 },
2103 static int rt73usb_probe_hw_mode(
struct rt2x00_dev *rt2x00dev)
2119 rt2x00dev->
hw->flags =
2124 SET_IEEE80211_DEV(rt2x00dev->
hw, rt2x00dev->
dev);
2125 SET_IEEE80211_PERM_ADDR(rt2x00dev->
hw,
2126 rt2x00_eeprom_addr(rt2x00dev,
2135 if (rt2x00_rf(rt2x00dev,
RF2528)) {
2138 }
else if (rt2x00_rf(rt2x00dev,
RF5226)) {
2142 }
else if (rt2x00_rf(rt2x00dev,
RF2527)) {
2144 spec->
channels = rf_vals_5225_2527;
2145 }
else if (rt2x00_rf(rt2x00dev,
RF5225)) {
2148 spec->
channels = rf_vals_5225_2527;
2161 for (i = 0; i < 14; i++) {
2177 static int rt73usb_probe_hw(
struct rt2x00_dev *rt2x00dev)
2185 retval = rt73usb_validate_eeprom(rt2x00dev);
2189 retval = rt73usb_init_eeprom(rt2x00dev);
2197 rt2x00usb_register_read(rt2x00dev,
MAC_CSR13, ®);
2199 rt2x00usb_register_write(rt2x00dev,
MAC_CSR13, reg);
2204 retval = rt73usb_probe_hw_mode(rt2x00dev);
2218 if (!modparam_nohwcrypt)
2262 queue = rt2x00queue_get_tx_queue(rt2x00dev, queue_idx);
2266 field.bit_offset = (queue_idx & 1) * 16;
2269 rt2x00usb_register_read(rt2x00dev, offset, ®);
2271 rt2x00usb_register_write(rt2x00dev, offset, reg);
2274 field.bit_offset = queue_idx * 4;
2277 rt2x00usb_register_read(rt2x00dev,
AIFSN_CSR, ®);
2279 rt2x00usb_register_write(rt2x00dev,
AIFSN_CSR, reg);
2281 rt2x00usb_register_read(rt2x00dev,
CWMIN_CSR, ®);
2283 rt2x00usb_register_write(rt2x00dev,
CWMIN_CSR, reg);
2285 rt2x00usb_register_read(rt2x00dev,
CWMAX_CSR, ®);
2287 rt2x00usb_register_write(rt2x00dev,
CWMAX_CSR, reg);
2298 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR13, ®);
2300 rt2x00usb_register_read(rt2x00dev,
TXRX_CSR12, ®);
2320 .conf_tx = rt73usb_conf_tx,
2321 .get_tsf = rt73usb_get_tsf,
2331 .probe_hw = rt73usb_probe_hw,
2332 .get_firmware_name = rt73usb_get_firmware_name,
2333 .check_firmware = rt73usb_check_firmware,
2334 .load_firmware = rt73usb_load_firmware,
2338 .set_device_state = rt73usb_set_device_state,
2339 .rfkill_poll = rt73usb_rfkill_poll,
2340 .link_stats = rt73usb_link_stats,
2341 .reset_tuner = rt73usb_reset_tuner,
2342 .link_tuner = rt73usb_link_tuner,
2344 .start_queue = rt73usb_start_queue,
2346 .stop_queue = rt73usb_stop_queue,
2348 .write_tx_desc = rt73usb_write_tx_desc,
2349 .write_beacon = rt73usb_write_beacon,
2350 .clear_beacon = rt73usb_clear_beacon,
2351 .get_tx_data_len = rt73usb_get_tx_data_len,
2352 .fill_rxdone = rt73usb_fill_rxdone,
2353 .config_shared_key = rt73usb_config_shared_key,
2354 .config_pairwise_key = rt73usb_config_pairwise_key,
2355 .config_filter = rt73usb_config_filter,
2356 .config_intf = rt73usb_config_intf,
2357 .config_erp = rt73usb_config_erp,
2358 .config_ant = rt73usb_config_ant,
2359 .config = rt73usb_config,
2383 static const struct rt2x00_ops rt73usb_ops = {
2384 .name = KBUILD_MODNAME,
2390 .rx = &rt73usb_queue_rx,
2391 .tx = &rt73usb_queue_tx,
2392 .bcn = &rt73usb_queue_bcn,
2393 .lib = &rt73usb_rt2x00_ops,
2394 .hw = &rt73usb_mac80211_ops,
2395 #ifdef CONFIG_RT2X00_LIB_DEBUGFS
2396 .debugfs = &rt73usb_rt2x00debug,
2405 { USB_DEVICE(0x07b8, 0xb21b) },
2406 { USB_DEVICE(0x07b8, 0xb21c) },
2407 { USB_DEVICE(0x07b8, 0xb21d) },
2408 { USB_DEVICE(0x07b8, 0xb21e) },
2409 { USB_DEVICE(0x07b8, 0xb21f) },
2411 { USB_DEVICE(0x14b2, 0x3c10) },
2413 { USB_DEVICE(0x148f, 0x9021) },
2414 { USB_DEVICE(0x0eb0, 0x9021) },
2416 { USB_DEVICE(0x18c5, 0x0002) },
2418 { USB_DEVICE(0x1690, 0x0722) },
2420 { USB_DEVICE(0x0b05, 0x1723) },
2421 { USB_DEVICE(0x0b05, 0x1724) },
2423 { USB_DEVICE(0x050d, 0x7050) },
2424 { USB_DEVICE(0x050d, 0x705a) },
2425 { USB_DEVICE(0x050d, 0x905b) },
2426 { USB_DEVICE(0x050d, 0x905c) },
2428 { USB_DEVICE(0x1631, 0xc019) },
2429 { USB_DEVICE(0x08dd, 0x0120) },
2431 { USB_DEVICE(0x0411, 0x00d8) },
2432 { USB_DEVICE(0x0411, 0x00d9) },
2433 { USB_DEVICE(0x0411, 0x00e6) },
2434 { USB_DEVICE(0x0411, 0x00f4) },
2435 { USB_DEVICE(0x0411, 0x0116) },
2436 { USB_DEVICE(0x0411, 0x0119) },
2437 { USB_DEVICE(0x0411, 0x0137) },
2439 { USB_DEVICE(0x178d, 0x02be) },
2441 { USB_DEVICE(0x1371, 0x9022) },
2442 { USB_DEVICE(0x1371, 0x9032) },
2444 { USB_DEVICE(0x14b2, 0x3c22) },
2446 { USB_DEVICE(0x07aa, 0x002e) },
2448 { USB_DEVICE(0x07d1, 0x3c03) },
2449 { USB_DEVICE(0x07d1, 0x3c04) },
2450 { USB_DEVICE(0x07d1, 0x3c06) },
2451 { USB_DEVICE(0x07d1, 0x3c07) },
2453 { USB_DEVICE(0x7392, 0x7318) },
2454 { USB_DEVICE(0x7392, 0x7618) },
2456 { USB_DEVICE(0x1740, 0x3701) },
2458 { USB_DEVICE(0x15a9, 0x0004) },
2460 { USB_DEVICE(0x1044, 0x8008) },
2461 { USB_DEVICE(0x1044, 0x800a) },
2463 { USB_DEVICE(0x1472, 0x0009) },
2465 { USB_DEVICE(0x06f8, 0xe002) },
2466 { USB_DEVICE(0x06f8, 0xe010) },
2467 { USB_DEVICE(0x06f8, 0xe020) },
2469 { USB_DEVICE(0x13b1, 0x0020) },
2470 { USB_DEVICE(0x13b1, 0x0023) },
2471 { USB_DEVICE(0x13b1, 0x0028) },
2473 { USB_DEVICE(0x0db0, 0x4600) },
2474 { USB_DEVICE(0x0db0, 0x6877) },
2475 { USB_DEVICE(0x0db0, 0x6874) },
2476 { USB_DEVICE(0x0db0, 0xa861) },
2477 { USB_DEVICE(0x0db0, 0xa874) },
2479 { USB_DEVICE(0x1b75, 0x7318) },
2481 { USB_DEVICE(0x04bb, 0x093d) },
2482 { USB_DEVICE(0x148f, 0x2573) },
2483 { USB_DEVICE(0x148f, 0x2671) },
2484 { USB_DEVICE(0x0812, 0x3101) },
2486 { USB_DEVICE(0x18e8, 0x6196) },
2487 { USB_DEVICE(0x18e8, 0x6229) },
2488 { USB_DEVICE(0x18e8, 0x6238) },
2490 { USB_DEVICE(0x04e8, 0x4471) },
2492 { USB_DEVICE(0x1740, 0x7100) },
2494 { USB_DEVICE(0x0df6, 0x0024) },
2495 { USB_DEVICE(0x0df6, 0x0027) },
2496 { USB_DEVICE(0x0df6, 0x002f) },
2497 { USB_DEVICE(0x0df6, 0x90ac) },
2498 { USB_DEVICE(0x0df6, 0x9712) },
2500 { USB_DEVICE(0x0769, 0x31f3) },
2502 { USB_DEVICE(0x6933, 0x5001) },
2504 { USB_DEVICE(0x0471, 0x200a) },
2506 { USB_DEVICE(0x2019, 0xab01) },
2507 { USB_DEVICE(0x2019, 0xab50) },
2509 { USB_DEVICE(0x7167, 0x3840) },
2511 { USB_DEVICE(0x0cde, 0x001c) },
2513 { USB_DEVICE(0x0586, 0x3415) },
2531 static struct usb_driver rt73usb_driver = {
2532 .name = KBUILD_MODNAME,
2533 .id_table = rt73usb_device_table,
2534 .probe = rt73usb_probe,
2539 .disable_hub_initiated_lpm = 1,