diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-26 02:26:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 02:26:21 -0500 |
commit | 19bc291c99f018bd4f2c38bbf69144086dca903f (patch) | |
tree | 9d3cf9bc0c5a78e363dc0547da8bcd1e7c394265 /drivers/net/wireless/rt2x00 | |
parent | 04488734806948624dabc4514f96f14cd75b9a50 (diff) | |
parent | 4a6967b88af02eebeedfbb91bc09160750225bb5 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/rt2x00/rt2800pci.c
Diffstat (limited to 'drivers/net/wireless/rt2x00')
20 files changed, 414 insertions, 282 deletions
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig index 3ca824a91ad9..5239e082cd0f 100644 --- a/drivers/net/wireless/rt2x00/Kconfig +++ b/drivers/net/wireless/rt2x00/Kconfig | |||
@@ -64,7 +64,7 @@ config RT2800PCI_SOC | |||
64 | default y | 64 | default y |
65 | 65 | ||
66 | config RT2800PCI | 66 | config RT2800PCI |
67 | tristate "Ralink rt2800 (PCI/PCMCIA) support (VERY EXPERIMENTAL)" | 67 | tristate "Ralink rt28xx/rt30xx/rt35xx (PCI/PCIe/PCMCIA) support (EXPERIMENTAL)" |
68 | depends on (RT2800PCI_PCI || RT2800PCI_SOC) && EXPERIMENTAL | 68 | depends on (RT2800PCI_PCI || RT2800PCI_SOC) && EXPERIMENTAL |
69 | select RT2800_LIB | 69 | select RT2800_LIB |
70 | select RT2X00_LIB_PCI if RT2800PCI_PCI | 70 | select RT2X00_LIB_PCI if RT2800PCI_PCI |
@@ -75,7 +75,7 @@ config RT2800PCI | |||
75 | select CRC_CCITT | 75 | select CRC_CCITT |
76 | select EEPROM_93CX6 | 76 | select EEPROM_93CX6 |
77 | ---help--- | 77 | ---help--- |
78 | This adds support for rt2800 wireless chipset family. | 78 | This adds support for rt2800/rt3000/rt3500 wireless chipset family. |
79 | Supported chips: RT2760, RT2790, RT2860, RT2880, RT2890 & RT3052 | 79 | Supported chips: RT2760, RT2790, RT2860, RT2880, RT2890 & RT3052 |
80 | 80 | ||
81 | This driver is non-functional at the moment and is intended for | 81 | This driver is non-functional at the moment and is intended for |
@@ -83,6 +83,32 @@ config RT2800PCI | |||
83 | 83 | ||
84 | When compiled as a module, this driver will be called "rt2800pci.ko". | 84 | When compiled as a module, this driver will be called "rt2800pci.ko". |
85 | 85 | ||
86 | if RT2800PCI | ||
87 | |||
88 | config RT2800PCI_RT30XX | ||
89 | bool "rt2800pci - Include support for rt30xx (PCI/PCIe/PCMCIA) devices" | ||
90 | default n | ||
91 | ---help--- | ||
92 | This adds support for rt30xx wireless chipset family to the | ||
93 | rt2800pci driver. | ||
94 | Supported chips: RT3090, RT3091 & RT3092 | ||
95 | |||
96 | Support for these devices is non-functional at the moment and is | ||
97 | intended for testers and developers. | ||
98 | |||
99 | config RT2800PCI_RT35XX | ||
100 | bool "rt2800pci - Include support for rt35xx (PCI/PCIe/PCMCIA) devices" | ||
101 | default n | ||
102 | ---help--- | ||
103 | This adds support for rt35xx wireless chipset family to the | ||
104 | rt2800pci driver. | ||
105 | Supported chips: RT3060, RT3062, RT3562, RT3592 | ||
106 | |||
107 | Support for these devices is non-functional at the moment and is | ||
108 | intended for testers and developers. | ||
109 | |||
110 | endif | ||
111 | |||
86 | config RT2500USB | 112 | config RT2500USB |
87 | tristate "Ralink rt2500 (USB) support" | 113 | tristate "Ralink rt2500 (USB) support" |
88 | depends on USB | 114 | depends on USB |
@@ -126,6 +152,43 @@ config RT2800USB | |||
126 | 152 | ||
127 | When compiled as a module, this driver will be called "rt2800usb.ko". | 153 | When compiled as a module, this driver will be called "rt2800usb.ko". |
128 | 154 | ||
155 | if RT2800USB | ||
156 | |||
157 | config RT2800USB_RT30XX | ||
158 | bool "rt2800usb - Include support for rt30xx (USB) devices" | ||
159 | default n | ||
160 | ---help--- | ||
161 | This adds support for rt30xx wireless chipset family to the | ||
162 | rt2800usb driver. | ||
163 | Supported chips: RT3070, RT3071 & RT3072 | ||
164 | |||
165 | Support for these devices is non-functional at the moment and is | ||
166 | intended for testers and developers. | ||
167 | |||
168 | config RT2800USB_RT35XX | ||
169 | bool "rt2800usb - Include support for rt35xx (USB) devices" | ||
170 | default n | ||
171 | ---help--- | ||
172 | This adds support for rt35xx wireless chipset family to the | ||
173 | rt2800usb driver. | ||
174 | Supported chips: RT3572 | ||
175 | |||
176 | Support for these devices is non-functional at the moment and is | ||
177 | intended for testers and developers. | ||
178 | |||
179 | config RT2800USB_UNKNOWN | ||
180 | bool "rt2800usb - Include support for unknown (USB) devices" | ||
181 | default n | ||
182 | ---help--- | ||
183 | This adds support for rt2800 family devices that are known to | ||
184 | have a rt2800 family chipset, but for which the exact chipset | ||
185 | is unknown. | ||
186 | |||
187 | Support status for these devices is unknown, and enabling these | ||
188 | devices may or may not work. | ||
189 | |||
190 | endif | ||
191 | |||
129 | config RT2800_LIB | 192 | config RT2800_LIB |
130 | tristate | 193 | tristate |
131 | 194 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 108982762d45..c22b04042d5c 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1340,8 +1340,8 @@ static int rt2400pci_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1340 | */ | 1340 | */ |
1341 | value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); | 1341 | value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); |
1342 | rt2x00pci_register_read(rt2x00dev, CSR0, ®); | 1342 | rt2x00pci_register_read(rt2x00dev, CSR0, ®); |
1343 | rt2x00_set_chip_rf(rt2x00dev, value, reg); | 1343 | rt2x00_set_chip(rt2x00dev, RT2460, value, |
1344 | rt2x00_print_chip(rt2x00dev); | 1344 | rt2x00_get_field32(reg, CSR0_REVISION)); |
1345 | 1345 | ||
1346 | if (!rt2x00_rf(rt2x00dev, RF2420) && !rt2x00_rf(rt2x00dev, RF2421)) { | 1346 | if (!rt2x00_rf(rt2x00dev, RF2420) && !rt2x00_rf(rt2x00dev, RF2421)) { |
1347 | ERROR(rt2x00dev, "Invalid RF chipset detected.\n"); | 1347 | ERROR(rt2x00dev, "Invalid RF chipset detected.\n"); |
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.h b/drivers/net/wireless/rt2x00/rt2400pci.h index c3dea697b907..c048b18f4133 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.h +++ b/drivers/net/wireless/rt2x00/rt2400pci.h | |||
@@ -65,6 +65,7 @@ | |||
65 | * CSR0: ASIC revision number. | 65 | * CSR0: ASIC revision number. |
66 | */ | 66 | */ |
67 | #define CSR0 0x0000 | 67 | #define CSR0 0x0000 |
68 | #define CSR0_REVISION FIELD32(0x0000ffff) | ||
68 | 69 | ||
69 | /* | 70 | /* |
70 | * CSR1: System control register. | 71 | * CSR1: System control register. |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index f6440bb0e5f6..52bbcf1bd17c 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1503,8 +1503,8 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1503 | */ | 1503 | */ |
1504 | value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); | 1504 | value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); |
1505 | rt2x00pci_register_read(rt2x00dev, CSR0, ®); | 1505 | rt2x00pci_register_read(rt2x00dev, CSR0, ®); |
1506 | rt2x00_set_chip_rf(rt2x00dev, value, reg); | 1506 | rt2x00_set_chip(rt2x00dev, RT2560, value, |
1507 | rt2x00_print_chip(rt2x00dev); | 1507 | rt2x00_get_field32(reg, CSR0_REVISION)); |
1508 | 1508 | ||
1509 | if (!rt2x00_rf(rt2x00dev, RF2522) && | 1509 | if (!rt2x00_rf(rt2x00dev, RF2522) && |
1510 | !rt2x00_rf(rt2x00dev, RF2523) && | 1510 | !rt2x00_rf(rt2x00dev, RF2523) && |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.h b/drivers/net/wireless/rt2x00/rt2500pci.h index c6bd1fcae7eb..d708031361ac 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.h +++ b/drivers/net/wireless/rt2x00/rt2500pci.h | |||
@@ -76,6 +76,7 @@ | |||
76 | * CSR0: ASIC revision number. | 76 | * CSR0: ASIC revision number. |
77 | */ | 77 | */ |
78 | #define CSR0 0x0000 | 78 | #define CSR0 0x0000 |
79 | #define CSR0_REVISION FIELD32(0x0000ffff) | ||
79 | 80 | ||
80 | /* | 81 | /* |
81 | * CSR1: System control register. | 82 | * CSR1: System control register. |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 81ca4ec068db..ee34c137e7cd 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1408,10 +1408,8 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1408 | value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); | 1408 | value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); |
1409 | rt2500usb_register_read(rt2x00dev, MAC_CSR0, ®); | 1409 | rt2500usb_register_read(rt2x00dev, MAC_CSR0, ®); |
1410 | rt2x00_set_chip(rt2x00dev, RT2570, value, reg); | 1410 | rt2x00_set_chip(rt2x00dev, RT2570, value, reg); |
1411 | rt2x00_print_chip(rt2x00dev); | ||
1412 | 1411 | ||
1413 | if (!rt2x00_check_rev(rt2x00dev, 0x000ffff0, 0) || | 1412 | if (((reg & 0xfff0) != 0) || ((reg & 0x0000000f) == 0)) { |
1414 | rt2x00_check_rev(rt2x00dev, 0x0000000f, 0)) { | ||
1415 | ERROR(rt2x00dev, "Invalid RT chipset detected.\n"); | 1413 | ERROR(rt2x00dev, "Invalid RT chipset detected.\n"); |
1416 | return -ENODEV; | 1414 | return -ENODEV; |
1417 | } | 1415 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h index 1a7eae357fef..74c0433dba37 100644 --- a/drivers/net/wireless/rt2x00/rt2800.h +++ b/drivers/net/wireless/rt2x00/rt2800.h | |||
@@ -60,11 +60,11 @@ | |||
60 | /* | 60 | /* |
61 | * Chipset version. | 61 | * Chipset version. |
62 | */ | 62 | */ |
63 | #define RT2860C_VERSION 0x28600100 | 63 | #define RT2860C_VERSION 0x0100 |
64 | #define RT2860D_VERSION 0x28600101 | 64 | #define RT2860D_VERSION 0x0101 |
65 | #define RT2880E_VERSION 0x28720200 | 65 | #define RT2880E_VERSION 0x0200 |
66 | #define RT2883_VERSION 0x28830300 | 66 | #define RT2883_VERSION 0x0300 |
67 | #define RT3070_VERSION 0x30700200 | 67 | #define RT3070_VERSION 0x0200 |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * Signal information. | 70 | * Signal information. |
@@ -408,8 +408,8 @@ | |||
408 | * ASIC_VER: 2860 or 2870 | 408 | * ASIC_VER: 2860 or 2870 |
409 | */ | 409 | */ |
410 | #define MAC_CSR0 0x1000 | 410 | #define MAC_CSR0 0x1000 |
411 | #define MAC_CSR0_ASIC_REV FIELD32(0x0000ffff) | 411 | #define MAC_CSR0_REVISION FIELD32(0x0000ffff) |
412 | #define MAC_CSR0_ASIC_VER FIELD32(0xffff0000) | 412 | #define MAC_CSR0_CHIPSET FIELD32(0xffff0000) |
413 | 413 | ||
414 | /* | 414 | /* |
415 | * MAC_SYS_CTRL: | 415 | * MAC_SYS_CTRL: |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index a45e027f2d1f..18d4d8e4ae6b 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -40,6 +40,9 @@ | |||
40 | #if defined(CONFIG_RT2X00_LIB_USB) || defined(CONFIG_RT2X00_LIB_USB_MODULE) | 40 | #if defined(CONFIG_RT2X00_LIB_USB) || defined(CONFIG_RT2X00_LIB_USB_MODULE) |
41 | #include "rt2x00usb.h" | 41 | #include "rt2x00usb.h" |
42 | #endif | 42 | #endif |
43 | #if defined(CONFIG_RT2X00_LIB_PCI) || defined(CONFIG_RT2X00_LIB_PCI_MODULE) | ||
44 | #include "rt2x00pci.h" | ||
45 | #endif | ||
43 | #include "rt2800lib.h" | 46 | #include "rt2800lib.h" |
44 | #include "rt2800.h" | 47 | #include "rt2800.h" |
45 | #include "rt2800usb.h" | 48 | #include "rt2800usb.h" |
@@ -89,7 +92,7 @@ static void rt2800_bbp_write(struct rt2x00_dev *rt2x00dev, | |||
89 | rt2x00_set_field32(®, BBP_CSR_CFG_REGNUM, word); | 92 | rt2x00_set_field32(®, BBP_CSR_CFG_REGNUM, word); |
90 | rt2x00_set_field32(®, BBP_CSR_CFG_BUSY, 1); | 93 | rt2x00_set_field32(®, BBP_CSR_CFG_BUSY, 1); |
91 | rt2x00_set_field32(®, BBP_CSR_CFG_READ_CONTROL, 0); | 94 | rt2x00_set_field32(®, BBP_CSR_CFG_READ_CONTROL, 0); |
92 | if (rt2x00_intf_is_pci(rt2x00dev)) | 95 | if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev)) |
93 | rt2x00_set_field32(®, BBP_CSR_CFG_BBP_RW_MODE, 1); | 96 | rt2x00_set_field32(®, BBP_CSR_CFG_BBP_RW_MODE, 1); |
94 | 97 | ||
95 | rt2800_register_write_lock(rt2x00dev, BBP_CSR_CFG, reg); | 98 | rt2800_register_write_lock(rt2x00dev, BBP_CSR_CFG, reg); |
@@ -118,7 +121,7 @@ static void rt2800_bbp_read(struct rt2x00_dev *rt2x00dev, | |||
118 | rt2x00_set_field32(®, BBP_CSR_CFG_REGNUM, word); | 121 | rt2x00_set_field32(®, BBP_CSR_CFG_REGNUM, word); |
119 | rt2x00_set_field32(®, BBP_CSR_CFG_BUSY, 1); | 122 | rt2x00_set_field32(®, BBP_CSR_CFG_BUSY, 1); |
120 | rt2x00_set_field32(®, BBP_CSR_CFG_READ_CONTROL, 1); | 123 | rt2x00_set_field32(®, BBP_CSR_CFG_READ_CONTROL, 1); |
121 | if (rt2x00_intf_is_pci(rt2x00dev)) | 124 | if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev)) |
122 | rt2x00_set_field32(®, BBP_CSR_CFG_BBP_RW_MODE, 1); | 125 | rt2x00_set_field32(®, BBP_CSR_CFG_BBP_RW_MODE, 1); |
123 | 126 | ||
124 | rt2800_register_write_lock(rt2x00dev, BBP_CSR_CFG, reg); | 127 | rt2800_register_write_lock(rt2x00dev, BBP_CSR_CFG, reg); |
@@ -218,9 +221,9 @@ void rt2800_mcu_request(struct rt2x00_dev *rt2x00dev, | |||
218 | u32 reg; | 221 | u32 reg; |
219 | 222 | ||
220 | /* | 223 | /* |
221 | * RT2880 and RT3052 don't support MCU requests. | 224 | * SOC devices don't support MCU requests. |
222 | */ | 225 | */ |
223 | if (rt2x00_rt(rt2x00dev, RT2880) || rt2x00_rt(rt2x00dev, RT3052)) | 226 | if (rt2x00_is_soc(rt2x00dev)) |
224 | return; | 227 | return; |
225 | 228 | ||
226 | mutex_lock(&rt2x00dev->csr_mutex); | 229 | mutex_lock(&rt2x00dev->csr_mutex); |
@@ -660,7 +663,7 @@ void rt2800_config_ant(struct rt2x00_dev *rt2x00dev, struct antenna_setup *ant) | |||
660 | switch ((int)ant->tx) { | 663 | switch ((int)ant->tx) { |
661 | case 1: | 664 | case 1: |
662 | rt2x00_set_field8(&r1, BBP1_TX_ANTENNA, 0); | 665 | rt2x00_set_field8(&r1, BBP1_TX_ANTENNA, 0); |
663 | if (rt2x00_intf_is_pci(rt2x00dev)) | 666 | if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev)) |
664 | rt2x00_set_field8(&r3, BBP3_RX_ANTENNA, 0); | 667 | rt2x00_set_field8(&r3, BBP3_RX_ANTENNA, 0); |
665 | break; | 668 | break; |
666 | case 2: | 669 | case 2: |
@@ -895,7 +898,8 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, | |||
895 | rt2x00_set_field8(&bbp, BBP3_HT40_PLUS, conf_is_ht40_plus(conf)); | 898 | rt2x00_set_field8(&bbp, BBP3_HT40_PLUS, conf_is_ht40_plus(conf)); |
896 | rt2800_bbp_write(rt2x00dev, 3, bbp); | 899 | rt2800_bbp_write(rt2x00dev, 3, bbp); |
897 | 900 | ||
898 | if (rt2x00_rev(rt2x00dev) == RT2860C_VERSION) { | 901 | if (rt2x00_rt(rt2x00dev, RT2860) && |
902 | (rt2x00_rev(rt2x00dev) == RT2860C_VERSION)) { | ||
899 | if (conf_is_ht40(conf)) { | 903 | if (conf_is_ht40(conf)) { |
900 | rt2800_bbp_write(rt2x00dev, 69, 0x1a); | 904 | rt2800_bbp_write(rt2x00dev, 69, 0x1a); |
901 | rt2800_bbp_write(rt2x00dev, 70, 0x0a); | 905 | rt2800_bbp_write(rt2x00dev, 70, 0x0a); |
@@ -1057,8 +1061,9 @@ EXPORT_SYMBOL_GPL(rt2800_link_stats); | |||
1057 | static u8 rt2800_get_default_vgc(struct rt2x00_dev *rt2x00dev) | 1061 | static u8 rt2800_get_default_vgc(struct rt2x00_dev *rt2x00dev) |
1058 | { | 1062 | { |
1059 | if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) { | 1063 | if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) { |
1060 | if (rt2x00_intf_is_usb(rt2x00dev) && | 1064 | if (rt2x00_is_usb(rt2x00dev) && |
1061 | rt2x00_rev(rt2x00dev) == RT3070_VERSION) | 1065 | rt2x00_rt(rt2x00dev, RT3070) && |
1066 | (rt2x00_rev(rt2x00dev) == RT3070_VERSION)) | ||
1062 | return 0x1c + (2 * rt2x00dev->lna_gain); | 1067 | return 0x1c + (2 * rt2x00dev->lna_gain); |
1063 | else | 1068 | else |
1064 | return 0x2e + rt2x00dev->lna_gain; | 1069 | return 0x2e + rt2x00dev->lna_gain; |
@@ -1089,7 +1094,8 @@ EXPORT_SYMBOL_GPL(rt2800_reset_tuner); | |||
1089 | void rt2800_link_tuner(struct rt2x00_dev *rt2x00dev, struct link_qual *qual, | 1094 | void rt2800_link_tuner(struct rt2x00_dev *rt2x00dev, struct link_qual *qual, |
1090 | const u32 count) | 1095 | const u32 count) |
1091 | { | 1096 | { |
1092 | if (rt2x00_rev(rt2x00dev) == RT2860C_VERSION) | 1097 | if (rt2x00_rt(rt2x00dev, RT2860) && |
1098 | (rt2x00_rev(rt2x00dev) == RT2860C_VERSION)) | ||
1093 | return; | 1099 | return; |
1094 | 1100 | ||
1095 | /* | 1101 | /* |
@@ -1109,7 +1115,7 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) | |||
1109 | u32 reg; | 1115 | u32 reg; |
1110 | unsigned int i; | 1116 | unsigned int i; |
1111 | 1117 | ||
1112 | if (rt2x00_intf_is_usb(rt2x00dev)) { | 1118 | if (rt2x00_is_usb(rt2x00dev)) { |
1113 | /* | 1119 | /* |
1114 | * Wait until BBP and RF are ready. | 1120 | * Wait until BBP and RF are ready. |
1115 | */ | 1121 | */ |
@@ -1128,7 +1134,7 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) | |||
1128 | rt2800_register_read(rt2x00dev, PBF_SYS_CTRL, ®); | 1134 | rt2800_register_read(rt2x00dev, PBF_SYS_CTRL, ®); |
1129 | rt2800_register_write(rt2x00dev, PBF_SYS_CTRL, | 1135 | rt2800_register_write(rt2x00dev, PBF_SYS_CTRL, |
1130 | reg & ~0x00002000); | 1136 | reg & ~0x00002000); |
1131 | } else if (rt2x00_intf_is_pci(rt2x00dev)) | 1137 | } else if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev)) |
1132 | rt2800_register_write(rt2x00dev, PWR_PIN_CFG, 0x00000003); | 1138 | rt2800_register_write(rt2x00dev, PWR_PIN_CFG, 0x00000003); |
1133 | 1139 | ||
1134 | rt2800_register_read(rt2x00dev, MAC_SYS_CTRL, ®); | 1140 | rt2800_register_read(rt2x00dev, MAC_SYS_CTRL, ®); |
@@ -1136,7 +1142,7 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) | |||
1136 | rt2x00_set_field32(®, MAC_SYS_CTRL_RESET_BBP, 1); | 1142 | rt2x00_set_field32(®, MAC_SYS_CTRL_RESET_BBP, 1); |
1137 | rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, reg); | 1143 | rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, reg); |
1138 | 1144 | ||
1139 | if (rt2x00_intf_is_usb(rt2x00dev)) { | 1145 | if (rt2x00_is_usb(rt2x00dev)) { |
1140 | rt2800_register_write(rt2x00dev, USB_DMA_CFG, 0x00000000); | 1146 | rt2800_register_write(rt2x00dev, USB_DMA_CFG, 0x00000000); |
1141 | #if defined(CONFIG_RT2X00_LIB_USB) || defined(CONFIG_RT2X00_LIB_USB_MODULE) | 1147 | #if defined(CONFIG_RT2X00_LIB_USB) || defined(CONFIG_RT2X00_LIB_USB_MODULE) |
1142 | rt2x00usb_vendor_request_sw(rt2x00dev, USB_DEVICE_MODE, 0, | 1148 | rt2x00usb_vendor_request_sw(rt2x00dev, USB_DEVICE_MODE, 0, |
@@ -1174,8 +1180,9 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) | |||
1174 | rt2x00_set_field32(®, BCN_TIME_CFG_TX_TIME_COMPENSATE, 0); | 1180 | rt2x00_set_field32(®, BCN_TIME_CFG_TX_TIME_COMPENSATE, 0); |
1175 | rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg); | 1181 | rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg); |
1176 | 1182 | ||
1177 | if (rt2x00_intf_is_usb(rt2x00dev) && | 1183 | if (rt2x00_is_usb(rt2x00dev) && |
1178 | rt2x00_rev(rt2x00dev) == RT3070_VERSION) { | 1184 | rt2x00_rt(rt2x00dev, RT3070) && |
1185 | (rt2x00_rev(rt2x00dev) == RT3070_VERSION)) { | ||
1179 | rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000400); | 1186 | rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000400); |
1180 | rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00000000); | 1187 | rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00000000); |
1181 | rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000); | 1188 | rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000); |
@@ -1202,8 +1209,14 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) | |||
1202 | 1209 | ||
1203 | rt2800_register_read(rt2x00dev, MAX_LEN_CFG, ®); | 1210 | rt2800_register_read(rt2x00dev, MAX_LEN_CFG, ®); |
1204 | rt2x00_set_field32(®, MAX_LEN_CFG_MAX_MPDU, AGGREGATION_SIZE); | 1211 | rt2x00_set_field32(®, MAX_LEN_CFG_MAX_MPDU, AGGREGATION_SIZE); |
1205 | if (rt2x00_rev(rt2x00dev) >= RT2880E_VERSION && | 1212 | if ((rt2x00_rt(rt2x00dev, RT2872) && |
1206 | rt2x00_rev(rt2x00dev) < RT3070_VERSION) | 1213 | (rt2x00_rev(rt2x00dev) >= RT2880E_VERSION)) || |
1214 | rt2x00_rt(rt2x00dev, RT2880) || | ||
1215 | rt2x00_rt(rt2x00dev, RT2883) || | ||
1216 | rt2x00_rt(rt2x00dev, RT2890) || | ||
1217 | rt2x00_rt(rt2x00dev, RT3052) || | ||
1218 | (rt2x00_rt(rt2x00dev, RT3070) && | ||
1219 | (rt2x00_rev(rt2x00dev) < RT3070_VERSION))) | ||
1207 | rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 2); | 1220 | rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 2); |
1208 | else | 1221 | else |
1209 | rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 1); | 1222 | rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 1); |
@@ -1293,7 +1306,7 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) | |||
1293 | rt2x00_set_field32(®, GF40_PROT_CFG_TX_OP_ALLOW_GF40, 1); | 1306 | rt2x00_set_field32(®, GF40_PROT_CFG_TX_OP_ALLOW_GF40, 1); |
1294 | rt2800_register_write(rt2x00dev, GF40_PROT_CFG, reg); | 1307 | rt2800_register_write(rt2x00dev, GF40_PROT_CFG, reg); |
1295 | 1308 | ||
1296 | if (rt2x00_intf_is_usb(rt2x00dev)) { | 1309 | if (rt2x00_is_usb(rt2x00dev)) { |
1297 | rt2800_register_write(rt2x00dev, PBF_CFG, 0xf40006); | 1310 | rt2800_register_write(rt2x00dev, PBF_CFG, 0xf40006); |
1298 | 1311 | ||
1299 | rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, ®); | 1312 | rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, ®); |
@@ -1353,7 +1366,7 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) | |||
1353 | rt2800_register_write(rt2x00dev, HW_BEACON_BASE6, 0); | 1366 | rt2800_register_write(rt2x00dev, HW_BEACON_BASE6, 0); |
1354 | rt2800_register_write(rt2x00dev, HW_BEACON_BASE7, 0); | 1367 | rt2800_register_write(rt2x00dev, HW_BEACON_BASE7, 0); |
1355 | 1368 | ||
1356 | if (rt2x00_intf_is_usb(rt2x00dev)) { | 1369 | if (rt2x00_is_usb(rt2x00dev)) { |
1357 | rt2800_register_read(rt2x00dev, USB_CYC_CFG, ®); | 1370 | rt2800_register_read(rt2x00dev, USB_CYC_CFG, ®); |
1358 | rt2x00_set_field32(®, USB_CYC_CFG_CLOCK_CYCLE, 30); | 1371 | rt2x00_set_field32(®, USB_CYC_CFG_CLOCK_CYCLE, 30); |
1359 | rt2800_register_write(rt2x00dev, USB_CYC_CFG, reg); | 1372 | rt2800_register_write(rt2x00dev, USB_CYC_CFG, reg); |
@@ -1482,16 +1495,19 @@ int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev) | |||
1482 | rt2800_bbp_write(rt2x00dev, 103, 0x00); | 1495 | rt2800_bbp_write(rt2x00dev, 103, 0x00); |
1483 | rt2800_bbp_write(rt2x00dev, 105, 0x05); | 1496 | rt2800_bbp_write(rt2x00dev, 105, 0x05); |
1484 | 1497 | ||
1485 | if (rt2x00_rev(rt2x00dev) == RT2860C_VERSION) { | 1498 | if (rt2x00_rt(rt2x00dev, RT2860) && |
1499 | (rt2x00_rev(rt2x00dev) == RT2860C_VERSION)) { | ||
1486 | rt2800_bbp_write(rt2x00dev, 69, 0x16); | 1500 | rt2800_bbp_write(rt2x00dev, 69, 0x16); |
1487 | rt2800_bbp_write(rt2x00dev, 73, 0x12); | 1501 | rt2800_bbp_write(rt2x00dev, 73, 0x12); |
1488 | } | 1502 | } |
1489 | 1503 | ||
1490 | if (rt2x00_rev(rt2x00dev) > RT2860D_VERSION) | 1504 | if (rt2x00_rt(rt2x00dev, RT2860) && |
1505 | (rt2x00_rev(rt2x00dev) > RT2860D_VERSION)) | ||
1491 | rt2800_bbp_write(rt2x00dev, 84, 0x19); | 1506 | rt2800_bbp_write(rt2x00dev, 84, 0x19); |
1492 | 1507 | ||
1493 | if (rt2x00_intf_is_usb(rt2x00dev) && | 1508 | if (rt2x00_is_usb(rt2x00dev) && |
1494 | rt2x00_rev(rt2x00dev) == RT3070_VERSION) { | 1509 | rt2x00_rt(rt2x00dev, RT3070) && |
1510 | (rt2x00_rev(rt2x00dev) == RT3070_VERSION)) { | ||
1495 | rt2800_bbp_write(rt2x00dev, 70, 0x0a); | 1511 | rt2800_bbp_write(rt2x00dev, 70, 0x0a); |
1496 | rt2800_bbp_write(rt2x00dev, 84, 0x99); | 1512 | rt2800_bbp_write(rt2x00dev, 84, 0x99); |
1497 | rt2800_bbp_write(rt2x00dev, 105, 0x05); | 1513 | rt2800_bbp_write(rt2x00dev, 105, 0x05); |
@@ -1582,11 +1598,12 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev) | |||
1582 | u8 rfcsr; | 1598 | u8 rfcsr; |
1583 | u8 bbp; | 1599 | u8 bbp; |
1584 | 1600 | ||
1585 | if (rt2x00_intf_is_usb(rt2x00dev) && | 1601 | if (rt2x00_is_usb(rt2x00dev) && |
1586 | rt2x00_rev(rt2x00dev) != RT3070_VERSION) | 1602 | rt2x00_rt(rt2x00dev, RT3070) && |
1603 | (rt2x00_rev(rt2x00dev) != RT3070_VERSION)) | ||
1587 | return 0; | 1604 | return 0; |
1588 | 1605 | ||
1589 | if (rt2x00_intf_is_pci(rt2x00dev)) { | 1606 | if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev)) { |
1590 | if (!rt2x00_rf(rt2x00dev, RF3020) && | 1607 | if (!rt2x00_rf(rt2x00dev, RF3020) && |
1591 | !rt2x00_rf(rt2x00dev, RF3021) && | 1608 | !rt2x00_rf(rt2x00dev, RF3021) && |
1592 | !rt2x00_rf(rt2x00dev, RF3022)) | 1609 | !rt2x00_rf(rt2x00dev, RF3022)) |
@@ -1603,7 +1620,7 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev) | |||
1603 | rt2x00_set_field8(&rfcsr, RFCSR30_RF_CALIBRATION, 0); | 1620 | rt2x00_set_field8(&rfcsr, RFCSR30_RF_CALIBRATION, 0); |
1604 | rt2800_rfcsr_write(rt2x00dev, 30, rfcsr); | 1621 | rt2800_rfcsr_write(rt2x00dev, 30, rfcsr); |
1605 | 1622 | ||
1606 | if (rt2x00_intf_is_usb(rt2x00dev)) { | 1623 | if (rt2x00_is_usb(rt2x00dev)) { |
1607 | rt2800_rfcsr_write(rt2x00dev, 4, 0x40); | 1624 | rt2800_rfcsr_write(rt2x00dev, 4, 0x40); |
1608 | rt2800_rfcsr_write(rt2x00dev, 5, 0x03); | 1625 | rt2800_rfcsr_write(rt2x00dev, 5, 0x03); |
1609 | rt2800_rfcsr_write(rt2x00dev, 6, 0x02); | 1626 | rt2800_rfcsr_write(rt2x00dev, 6, 0x02); |
@@ -1624,7 +1641,7 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev) | |||
1624 | rt2800_rfcsr_write(rt2x00dev, 25, 0x01); | 1641 | rt2800_rfcsr_write(rt2x00dev, 25, 0x01); |
1625 | rt2800_rfcsr_write(rt2x00dev, 27, 0x03); | 1642 | rt2800_rfcsr_write(rt2x00dev, 27, 0x03); |
1626 | rt2800_rfcsr_write(rt2x00dev, 29, 0x1f); | 1643 | rt2800_rfcsr_write(rt2x00dev, 29, 0x1f); |
1627 | } else if (rt2x00_intf_is_pci(rt2x00dev)) { | 1644 | } else if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev)) { |
1628 | rt2800_rfcsr_write(rt2x00dev, 0, 0x50); | 1645 | rt2800_rfcsr_write(rt2x00dev, 0, 0x50); |
1629 | rt2800_rfcsr_write(rt2x00dev, 1, 0x01); | 1646 | rt2800_rfcsr_write(rt2x00dev, 1, 0x01); |
1630 | rt2800_rfcsr_write(rt2x00dev, 2, 0xf7); | 1647 | rt2800_rfcsr_write(rt2x00dev, 2, 0xf7); |
@@ -1754,7 +1771,12 @@ int rt2800_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1754 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF2820); | 1771 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF2820); |
1755 | rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word); | 1772 | rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word); |
1756 | EEPROM(rt2x00dev, "Antenna: 0x%04x\n", word); | 1773 | EEPROM(rt2x00dev, "Antenna: 0x%04x\n", word); |
1757 | } else if (rt2x00_rev(rt2x00dev) < RT2883_VERSION) { | 1774 | } else if (rt2x00_rt(rt2x00dev, RT2860) || |
1775 | rt2x00_rt(rt2x00dev, RT2870) || | ||
1776 | rt2x00_rt(rt2x00dev, RT2872) || | ||
1777 | rt2x00_rt(rt2x00dev, RT2880) || | ||
1778 | (rt2x00_rt(rt2x00dev, RT2883) && | ||
1779 | (rt2x00_rev(rt2x00dev) < RT2883_VERSION))) { | ||
1758 | /* | 1780 | /* |
1759 | * There is a max of 2 RX streams for RT28x0 series | 1781 | * There is a max of 2 RX streams for RT28x0 series |
1760 | */ | 1782 | */ |
@@ -1853,25 +1875,24 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1853 | value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); | 1875 | value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); |
1854 | rt2800_register_read(rt2x00dev, MAC_CSR0, ®); | 1876 | rt2800_register_read(rt2x00dev, MAC_CSR0, ®); |
1855 | 1877 | ||
1856 | rt2x00_set_chip_rf(rt2x00dev, value, reg); | 1878 | rt2x00_set_chip(rt2x00dev, rt2x00_get_field32(reg, MAC_CSR0_CHIPSET), |
1857 | 1879 | value, rt2x00_get_field32(reg, MAC_CSR0_REVISION)); | |
1858 | if (rt2x00_intf_is_usb(rt2x00dev)) { | 1880 | |
1859 | /* | 1881 | if (!rt2x00_rt(rt2x00dev, RT2860) && |
1860 | * The check for rt2860 is not a typo, some rt2870 hardware | 1882 | !rt2x00_rt(rt2x00dev, RT2870) && |
1861 | * identifies itself as rt2860 in the CSR register. | 1883 | !rt2x00_rt(rt2x00dev, RT2872) && |
1862 | */ | 1884 | !rt2x00_rt(rt2x00dev, RT2880) && |
1863 | if (rt2x00_check_rev(rt2x00dev, 0xfff00000, 0x28600000) || | 1885 | !rt2x00_rt(rt2x00dev, RT2883) && |
1864 | rt2x00_check_rev(rt2x00dev, 0xfff00000, 0x28700000) || | 1886 | !rt2x00_rt(rt2x00dev, RT2890) && |
1865 | rt2x00_check_rev(rt2x00dev, 0xfff00000, 0x28800000)) { | 1887 | !rt2x00_rt(rt2x00dev, RT3052) && |
1866 | rt2x00_set_chip_rt(rt2x00dev, RT2870); | 1888 | !rt2x00_rt(rt2x00dev, RT3070) && |
1867 | } else if (rt2x00_check_rev(rt2x00dev, 0xffff0000, 0x30700000)) { | 1889 | !rt2x00_rt(rt2x00dev, RT3071) && |
1868 | rt2x00_set_chip_rt(rt2x00dev, RT3070); | 1890 | !rt2x00_rt(rt2x00dev, RT3090) && |
1869 | } else { | 1891 | !rt2x00_rt(rt2x00dev, RT3390) && |
1870 | ERROR(rt2x00dev, "Invalid RT chipset detected.\n"); | 1892 | !rt2x00_rt(rt2x00dev, RT3572)) { |
1871 | return -ENODEV; | 1893 | ERROR(rt2x00dev, "Invalid RT chipset detected.\n"); |
1872 | } | 1894 | return -ENODEV; |
1873 | } | 1895 | } |
1874 | rt2x00_print_chip(rt2x00dev); | ||
1875 | 1896 | ||
1876 | if (!rt2x00_rf(rt2x00dev, RF2820) && | 1897 | if (!rt2x00_rf(rt2x00dev, RF2820) && |
1877 | !rt2x00_rf(rt2x00dev, RF2850) && | 1898 | !rt2x00_rf(rt2x00dev, RF2850) && |
@@ -2039,7 +2060,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
2039 | /* | 2060 | /* |
2040 | * Disable powersaving as default on PCI devices. | 2061 | * Disable powersaving as default on PCI devices. |
2041 | */ | 2062 | */ |
2042 | if (rt2x00_intf_is_pci(rt2x00dev)) | 2063 | if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev)) |
2043 | rt2x00dev->hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; | 2064 | rt2x00dev->hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; |
2044 | 2065 | ||
2045 | /* | 2066 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index d64181cbc9cb..aca8c124f434 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -1041,18 +1041,12 @@ static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1041 | /* | 1041 | /* |
1042 | * Read EEPROM into buffer | 1042 | * Read EEPROM into buffer |
1043 | */ | 1043 | */ |
1044 | switch (rt2x00dev->chip.rt) { | 1044 | if (rt2x00_is_soc(rt2x00dev)) |
1045 | case RT2880: | ||
1046 | case RT3052: | ||
1047 | rt2800pci_read_eeprom_soc(rt2x00dev); | 1045 | rt2800pci_read_eeprom_soc(rt2x00dev); |
1048 | break; | 1046 | else if (rt2800pci_efuse_detect(rt2x00dev)) |
1049 | default: | 1047 | rt2800pci_read_eeprom_efuse(rt2x00dev); |
1050 | if (rt2800pci_efuse_detect(rt2x00dev)) | 1048 | else |
1051 | rt2800pci_read_eeprom_efuse(rt2x00dev); | 1049 | rt2800pci_read_eeprom_pci(rt2x00dev); |
1052 | else | ||
1053 | rt2800pci_read_eeprom_pci(rt2x00dev); | ||
1054 | break; | ||
1055 | } | ||
1056 | 1050 | ||
1057 | return rt2800_validate_eeprom(rt2x00dev); | 1051 | return rt2800_validate_eeprom(rt2x00dev); |
1058 | } | 1052 | } |
@@ -1103,7 +1097,7 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
1103 | /* | 1097 | /* |
1104 | * This device requires firmware. | 1098 | * This device requires firmware. |
1105 | */ | 1099 | */ |
1106 | if (!rt2x00_rt(rt2x00dev, RT2880) && !rt2x00_rt(rt2x00dev, RT3052)) | 1100 | if (!rt2x00_is_soc(rt2x00dev)) |
1107 | __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags); | 1101 | __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags); |
1108 | __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags); | 1102 | __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags); |
1109 | __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); | 1103 | __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); |
@@ -1191,7 +1185,10 @@ static const struct rt2x00_ops rt2800pci_ops = { | |||
1191 | * RT2800pci module information. | 1185 | * RT2800pci module information. |
1192 | */ | 1186 | */ |
1193 | static DEFINE_PCI_DEVICE_TABLE(rt2800pci_device_table) = { | 1187 | static DEFINE_PCI_DEVICE_TABLE(rt2800pci_device_table) = { |
1194 | { PCI_DEVICE(0x1462, 0x891a), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1188 | { PCI_DEVICE(0x1814, 0x0601), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
1189 | { PCI_DEVICE(0x1814, 0x0681), PCI_DEVICE_DATA(&rt2800pci_ops) }, | ||
1190 | { PCI_DEVICE(0x1814, 0x0701), PCI_DEVICE_DATA(&rt2800pci_ops) }, | ||
1191 | { PCI_DEVICE(0x1814, 0x0781), PCI_DEVICE_DATA(&rt2800pci_ops) }, | ||
1195 | { PCI_DEVICE(0x1432, 0x7708), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1192 | { PCI_DEVICE(0x1432, 0x7708), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
1196 | { PCI_DEVICE(0x1432, 0x7727), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1193 | { PCI_DEVICE(0x1432, 0x7727), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
1197 | { PCI_DEVICE(0x1432, 0x7728), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1194 | { PCI_DEVICE(0x1432, 0x7728), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
@@ -1199,18 +1196,19 @@ static DEFINE_PCI_DEVICE_TABLE(rt2800pci_device_table) = { | |||
1199 | { PCI_DEVICE(0x1432, 0x7748), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1196 | { PCI_DEVICE(0x1432, 0x7748), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
1200 | { PCI_DEVICE(0x1432, 0x7758), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1197 | { PCI_DEVICE(0x1432, 0x7758), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
1201 | { PCI_DEVICE(0x1432, 0x7768), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1198 | { PCI_DEVICE(0x1432, 0x7768), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
1202 | { PCI_DEVICE(0x1814, 0x0601), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1199 | { PCI_DEVICE(0x1a3b, 0x1059), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
1203 | { PCI_DEVICE(0x1814, 0x0681), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1200 | #ifdef CONFIG_RT2800PCI_RT30XX |
1204 | { PCI_DEVICE(0x1814, 0x0701), PCI_DEVICE_DATA(&rt2800pci_ops) }, | ||
1205 | { PCI_DEVICE(0x1814, 0x0781), PCI_DEVICE_DATA(&rt2800pci_ops) }, | ||
1206 | { PCI_DEVICE(0x1814, 0x3060), PCI_DEVICE_DATA(&rt2800pci_ops) }, | ||
1207 | { PCI_DEVICE(0x1814, 0x3062), PCI_DEVICE_DATA(&rt2800pci_ops) }, | ||
1208 | { PCI_DEVICE(0x1814, 0x3090), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1201 | { PCI_DEVICE(0x1814, 0x3090), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
1209 | { PCI_DEVICE(0x1814, 0x3091), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1202 | { PCI_DEVICE(0x1814, 0x3091), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
1210 | { PCI_DEVICE(0x1814, 0x3092), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1203 | { PCI_DEVICE(0x1814, 0x3092), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
1204 | { PCI_DEVICE(0x1462, 0x891a), PCI_DEVICE_DATA(&rt2800pci_ops) }, | ||
1205 | #endif | ||
1206 | #ifdef CONFIG_RT2800PCI_RT35XX | ||
1207 | { PCI_DEVICE(0x1814, 0x3060), PCI_DEVICE_DATA(&rt2800pci_ops) }, | ||
1208 | { PCI_DEVICE(0x1814, 0x3062), PCI_DEVICE_DATA(&rt2800pci_ops) }, | ||
1211 | { PCI_DEVICE(0x1814, 0x3562), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1209 | { PCI_DEVICE(0x1814, 0x3562), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
1212 | { PCI_DEVICE(0x1814, 0x3592), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1210 | { PCI_DEVICE(0x1814, 0x3592), PCI_DEVICE_DATA(&rt2800pci_ops) }, |
1213 | { PCI_DEVICE(0x1a3b, 0x1059), PCI_DEVICE_DATA(&rt2800pci_ops) }, | 1211 | #endif |
1214 | { 0, } | 1212 | { 0, } |
1215 | }; | 1213 | }; |
1216 | 1214 | ||
@@ -1225,11 +1223,10 @@ MODULE_DEVICE_TABLE(pci, rt2800pci_device_table); | |||
1225 | MODULE_LICENSE("GPL"); | 1223 | MODULE_LICENSE("GPL"); |
1226 | 1224 | ||
1227 | #ifdef CONFIG_RT2800PCI_SOC | 1225 | #ifdef CONFIG_RT2800PCI_SOC |
1228 | #if defined(CONFIG_RALINK_RT288X) | 1226 | static int rt2800soc_probe(struct platform_device *pdev) |
1229 | __rt2x00soc_probe(RT2880, &rt2800pci_ops); | 1227 | { |
1230 | #elif defined(CONFIG_RALINK_RT305X) | 1228 | return rt2x00soc_probe(pdev, rt2800pci_ops); |
1231 | __rt2x00soc_probe(RT3052, &rt2800pci_ops); | 1229 | } |
1232 | #endif | ||
1233 | 1230 | ||
1234 | static struct platform_driver rt2800soc_driver = { | 1231 | static struct platform_driver rt2800soc_driver = { |
1235 | .driver = { | 1232 | .driver = { |
@@ -1237,7 +1234,7 @@ static struct platform_driver rt2800soc_driver = { | |||
1237 | .owner = THIS_MODULE, | 1234 | .owner = THIS_MODULE, |
1238 | .mod_name = KBUILD_MODNAME, | 1235 | .mod_name = KBUILD_MODNAME, |
1239 | }, | 1236 | }, |
1240 | .probe = __rt2x00soc_probe, | 1237 | .probe = rt2800soc_probe, |
1241 | .remove = __devexit_p(rt2x00soc_remove), | 1238 | .remove = __devexit_p(rt2x00soc_remove), |
1242 | .suspend = rt2x00soc_suspend, | 1239 | .suspend = rt2x00soc_suspend, |
1243 | .resume = rt2x00soc_resume, | 1240 | .resume = rt2x00soc_resume, |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 82755cf8b73e..5e4ee2023fcf 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -92,7 +92,6 @@ static bool rt2800usb_check_crc(const u8 *data, const size_t len) | |||
92 | static int rt2800usb_check_firmware(struct rt2x00_dev *rt2x00dev, | 92 | static int rt2800usb_check_firmware(struct rt2x00_dev *rt2x00dev, |
93 | const u8 *data, const size_t len) | 93 | const u8 *data, const size_t len) |
94 | { | 94 | { |
95 | u16 chipset = (rt2x00_rev(rt2x00dev) >> 16) & 0xffff; | ||
96 | size_t offset = 0; | 95 | size_t offset = 0; |
97 | 96 | ||
98 | /* | 97 | /* |
@@ -111,9 +110,9 @@ static int rt2800usb_check_firmware(struct rt2x00_dev *rt2x00dev, | |||
111 | * Check if we need the upper 4kb firmware data or not. | 110 | * Check if we need the upper 4kb firmware data or not. |
112 | */ | 111 | */ |
113 | if ((len == 4096) && | 112 | if ((len == 4096) && |
114 | (chipset != 0x2860) && | 113 | !rt2x00_rt(rt2x00dev, RT2860) && |
115 | (chipset != 0x2872) && | 114 | !rt2x00_rt(rt2x00dev, RT2872) && |
116 | (chipset != 0x3070)) | 115 | !rt2x00_rt(rt2x00dev, RT3070)) |
117 | return FW_BAD_VERSION; | 116 | return FW_BAD_VERSION; |
118 | 117 | ||
119 | /* | 118 | /* |
@@ -138,14 +137,13 @@ static int rt2800usb_load_firmware(struct rt2x00_dev *rt2x00dev, | |||
138 | u32 reg; | 137 | u32 reg; |
139 | u32 offset; | 138 | u32 offset; |
140 | u32 length; | 139 | u32 length; |
141 | u16 chipset = (rt2x00_rev(rt2x00dev) >> 16) & 0xffff; | ||
142 | 140 | ||
143 | /* | 141 | /* |
144 | * Check which section of the firmware we need. | 142 | * Check which section of the firmware we need. |
145 | */ | 143 | */ |
146 | if ((chipset == 0x2860) || | 144 | if (rt2x00_rt(rt2x00dev, RT2860) || |
147 | (chipset == 0x2872) || | 145 | rt2x00_rt(rt2x00dev, RT2872) || |
148 | (chipset == 0x3070)) { | 146 | rt2x00_rt(rt2x00dev, RT3070)) { |
149 | offset = 0; | 147 | offset = 0; |
150 | length = 4096; | 148 | length = 4096; |
151 | } else { | 149 | } else { |
@@ -200,9 +198,9 @@ static int rt2800usb_load_firmware(struct rt2x00_dev *rt2x00dev, | |||
200 | */ | 198 | */ |
201 | rt2800_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0xff, 0, 0); | 199 | rt2800_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0xff, 0, 0); |
202 | 200 | ||
203 | if ((chipset == 0x3070) || | 201 | if (rt2x00_rt(rt2x00dev, RT3070) || |
204 | (chipset == 0x3071) || | 202 | rt2x00_rt(rt2x00dev, RT3071) || |
205 | (chipset == 0x3572)) { | 203 | rt2x00_rt(rt2x00dev, RT3572)) { |
206 | udelay(200); | 204 | udelay(200); |
207 | rt2800_mcu_request(rt2x00dev, MCU_CURRENT, 0, 0, 0); | 205 | rt2800_mcu_request(rt2x00dev, MCU_CURRENT, 0, 0, 0); |
208 | udelay(10); | 206 | udelay(10); |
@@ -807,51 +805,27 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
807 | /* Abocom */ | 805 | /* Abocom */ |
808 | { USB_DEVICE(0x07b8, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) }, | 806 | { USB_DEVICE(0x07b8, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) }, |
809 | { USB_DEVICE(0x07b8, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) }, | 807 | { USB_DEVICE(0x07b8, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) }, |
810 | { USB_DEVICE(0x07b8, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
811 | { USB_DEVICE(0x07b8, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
812 | { USB_DEVICE(0x07b8, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
813 | { USB_DEVICE(0x1482, 0x3c09), USB_DEVICE_DATA(&rt2800usb_ops) }, | 808 | { USB_DEVICE(0x1482, 0x3c09), USB_DEVICE_DATA(&rt2800usb_ops) }, |
814 | /* AirTies */ | ||
815 | { USB_DEVICE(0x1eda, 0x2310), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
816 | /* Amigo */ | ||
817 | { USB_DEVICE(0x0e0b, 0x9031), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
818 | { USB_DEVICE(0x0e0b, 0x9041), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
819 | /* Amit */ | 809 | /* Amit */ |
820 | { USB_DEVICE(0x15c5, 0x0008), USB_DEVICE_DATA(&rt2800usb_ops) }, | 810 | { USB_DEVICE(0x15c5, 0x0008), USB_DEVICE_DATA(&rt2800usb_ops) }, |
821 | /* Askey */ | 811 | /* Askey */ |
822 | { USB_DEVICE(0x1690, 0x0740), USB_DEVICE_DATA(&rt2800usb_ops) }, | 812 | { USB_DEVICE(0x1690, 0x0740), USB_DEVICE_DATA(&rt2800usb_ops) }, |
823 | { USB_DEVICE(0x1690, 0x0744), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
824 | { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
825 | /* ASUS */ | 813 | /* ASUS */ |
826 | { USB_DEVICE(0x0b05, 0x1731), USB_DEVICE_DATA(&rt2800usb_ops) }, | 814 | { USB_DEVICE(0x0b05, 0x1731), USB_DEVICE_DATA(&rt2800usb_ops) }, |
827 | { USB_DEVICE(0x0b05, 0x1732), USB_DEVICE_DATA(&rt2800usb_ops) }, | 815 | { USB_DEVICE(0x0b05, 0x1732), USB_DEVICE_DATA(&rt2800usb_ops) }, |
828 | { USB_DEVICE(0x0b05, 0x1742), USB_DEVICE_DATA(&rt2800usb_ops) }, | 816 | { USB_DEVICE(0x0b05, 0x1742), USB_DEVICE_DATA(&rt2800usb_ops) }, |
829 | { USB_DEVICE(0x0b05, 0x1760), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
830 | { USB_DEVICE(0x0b05, 0x1761), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
831 | { USB_DEVICE(0x0b05, 0x1784), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
832 | /* AzureWave */ | 817 | /* AzureWave */ |
833 | { USB_DEVICE(0x13d3, 0x3247), USB_DEVICE_DATA(&rt2800usb_ops) }, | 818 | { USB_DEVICE(0x13d3, 0x3247), USB_DEVICE_DATA(&rt2800usb_ops) }, |
834 | { USB_DEVICE(0x13d3, 0x3262), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
835 | { USB_DEVICE(0x13d3, 0x3273), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
836 | { USB_DEVICE(0x13d3, 0x3284), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
837 | { USB_DEVICE(0x13d3, 0x3305), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
838 | /* Belkin */ | 819 | /* Belkin */ |
839 | { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) }, | 820 | { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) }, |
840 | { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 821 | { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) }, |
841 | { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 822 | { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) }, |
842 | { USB_DEVICE(0x050d, 0x825a), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
843 | /* Buffalo */ | 823 | /* Buffalo */ |
844 | { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) }, | 824 | { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) }, |
845 | { USB_DEVICE(0x0411, 0x012e), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
846 | /* Cisco */ | ||
847 | { USB_DEVICE(0x167b, 0x4001), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
848 | /* Conceptronic */ | 825 | /* Conceptronic */ |
849 | { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) }, | 826 | { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) }, |
850 | { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) }, | 827 | { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) }, |
851 | { USB_DEVICE(0x14b2, 0x3c08), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
852 | { USB_DEVICE(0x14b2, 0x3c09), USB_DEVICE_DATA(&rt2800usb_ops) }, | 828 | { USB_DEVICE(0x14b2, 0x3c09), USB_DEVICE_DATA(&rt2800usb_ops) }, |
853 | { USB_DEVICE(0x14b2, 0x3c11), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
854 | { USB_DEVICE(0x14b2, 0x3c12), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
855 | { USB_DEVICE(0x14b2, 0x3c23), USB_DEVICE_DATA(&rt2800usb_ops) }, | 829 | { USB_DEVICE(0x14b2, 0x3c23), USB_DEVICE_DATA(&rt2800usb_ops) }, |
856 | { USB_DEVICE(0x14b2, 0x3c25), USB_DEVICE_DATA(&rt2800usb_ops) }, | 830 | { USB_DEVICE(0x14b2, 0x3c25), USB_DEVICE_DATA(&rt2800usb_ops) }, |
857 | { USB_DEVICE(0x14b2, 0x3c27), USB_DEVICE_DATA(&rt2800usb_ops) }, | 831 | { USB_DEVICE(0x14b2, 0x3c27), USB_DEVICE_DATA(&rt2800usb_ops) }, |
@@ -860,157 +834,257 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
860 | { USB_DEVICE(0x07aa, 0x002f), USB_DEVICE_DATA(&rt2800usb_ops) }, | 834 | { USB_DEVICE(0x07aa, 0x002f), USB_DEVICE_DATA(&rt2800usb_ops) }, |
861 | { USB_DEVICE(0x07aa, 0x003c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 835 | { USB_DEVICE(0x07aa, 0x003c), USB_DEVICE_DATA(&rt2800usb_ops) }, |
862 | { USB_DEVICE(0x07aa, 0x003f), USB_DEVICE_DATA(&rt2800usb_ops) }, | 836 | { USB_DEVICE(0x07aa, 0x003f), USB_DEVICE_DATA(&rt2800usb_ops) }, |
863 | { USB_DEVICE(0x07aa, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
864 | { USB_DEVICE(0x07aa, 0x0042), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
865 | { USB_DEVICE(0x18c5, 0x0008), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
866 | { USB_DEVICE(0x18c5, 0x0012), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
867 | /* D-Link */ | 837 | /* D-Link */ |
868 | { USB_DEVICE(0x07d1, 0x3c09), USB_DEVICE_DATA(&rt2800usb_ops) }, | 838 | { USB_DEVICE(0x07d1, 0x3c09), USB_DEVICE_DATA(&rt2800usb_ops) }, |
839 | { USB_DEVICE(0x07d1, 0x3c11), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
840 | /* Edimax */ | ||
841 | { USB_DEVICE(0x7392, 0x7717), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
842 | { USB_DEVICE(0x7392, 0x7718), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
843 | /* EnGenius */ | ||
844 | { USB_DEVICE(0X1740, 0x9701), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
845 | { USB_DEVICE(0x1740, 0x9702), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
846 | /* Gigabyte */ | ||
847 | { USB_DEVICE(0x1044, 0x800b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
848 | /* Hawking */ | ||
849 | { USB_DEVICE(0x0e66, 0x0001), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
850 | { USB_DEVICE(0x0e66, 0x0003), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
851 | /* Linksys */ | ||
852 | { USB_DEVICE(0x1737, 0x0070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
853 | { USB_DEVICE(0x1737, 0x0071), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
854 | /* Logitec */ | ||
855 | { USB_DEVICE(0x0789, 0x0162), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
856 | { USB_DEVICE(0x0789, 0x0163), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
857 | { USB_DEVICE(0x0789, 0x0164), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
858 | /* Motorola */ | ||
859 | { USB_DEVICE(0x100d, 0x9031), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
860 | /* MSI */ | ||
861 | { USB_DEVICE(0x0db0, 0x6899), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
862 | /* Philips */ | ||
863 | { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
864 | /* Planex */ | ||
865 | { USB_DEVICE(0x2019, 0xed06), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
866 | /* Ralink */ | ||
867 | { USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
868 | { USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
869 | /* Samsung */ | ||
870 | { USB_DEVICE(0x04e8, 0x2018), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
871 | /* Siemens */ | ||
872 | { USB_DEVICE(0x129b, 0x1828), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
873 | /* Sitecom */ | ||
874 | { USB_DEVICE(0x0df6, 0x0017), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
875 | { USB_DEVICE(0x0df6, 0x002b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
876 | { USB_DEVICE(0x0df6, 0x002c), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
877 | { USB_DEVICE(0x0df6, 0x002d), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
878 | { USB_DEVICE(0x0df6, 0x0039), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
879 | { USB_DEVICE(0x0df6, 0x003f), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
880 | /* SMC */ | ||
881 | { USB_DEVICE(0x083a, 0x6618), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
882 | { USB_DEVICE(0x083a, 0x7512), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
883 | { USB_DEVICE(0x083a, 0x7522), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
884 | { USB_DEVICE(0x083a, 0x8522), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
885 | { USB_DEVICE(0x083a, 0xa618), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
886 | { USB_DEVICE(0x083a, 0xb522), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
887 | /* Sparklan */ | ||
888 | { USB_DEVICE(0x15a9, 0x0006), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
889 | /* Sweex */ | ||
890 | { USB_DEVICE(0x177f, 0x0302), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
891 | /* U-Media*/ | ||
892 | { USB_DEVICE(0x157e, 0x300e), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
893 | /* ZCOM */ | ||
894 | { USB_DEVICE(0x0cde, 0x0022), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
895 | { USB_DEVICE(0x0cde, 0x0025), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
896 | /* Zinwell */ | ||
897 | { USB_DEVICE(0x5a57, 0x0280), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
898 | { USB_DEVICE(0x5a57, 0x0282), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
899 | /* Zyxel */ | ||
900 | { USB_DEVICE(0x0586, 0x3416), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
901 | #ifdef CONFIG_RT2800USB_RT30XX | ||
902 | /* Abocom */ | ||
903 | { USB_DEVICE(0x07b8, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
904 | { USB_DEVICE(0x07b8, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
905 | { USB_DEVICE(0x07b8, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
906 | /* AirTies */ | ||
907 | { USB_DEVICE(0x1eda, 0x2310), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
908 | /* AzureWave */ | ||
909 | { USB_DEVICE(0x13d3, 0x3273), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
910 | /* Conceptronic */ | ||
911 | { USB_DEVICE(0x14b2, 0x3c12), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
912 | /* Corega */ | ||
913 | { USB_DEVICE(0x18c5, 0x0012), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
914 | /* D-Link */ | ||
869 | { USB_DEVICE(0x07d1, 0x3c0a), USB_DEVICE_DATA(&rt2800usb_ops) }, | 915 | { USB_DEVICE(0x07d1, 0x3c0a), USB_DEVICE_DATA(&rt2800usb_ops) }, |
870 | { USB_DEVICE(0x07d1, 0x3c0b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
871 | { USB_DEVICE(0x07d1, 0x3c0d), USB_DEVICE_DATA(&rt2800usb_ops) }, | 916 | { USB_DEVICE(0x07d1, 0x3c0d), USB_DEVICE_DATA(&rt2800usb_ops) }, |
872 | { USB_DEVICE(0x07d1, 0x3c0e), USB_DEVICE_DATA(&rt2800usb_ops) }, | 917 | { USB_DEVICE(0x07d1, 0x3c0e), USB_DEVICE_DATA(&rt2800usb_ops) }, |
873 | { USB_DEVICE(0x07d1, 0x3c0f), USB_DEVICE_DATA(&rt2800usb_ops) }, | 918 | { USB_DEVICE(0x07d1, 0x3c0f), USB_DEVICE_DATA(&rt2800usb_ops) }, |
874 | { USB_DEVICE(0x07d1, 0x3c11), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
875 | { USB_DEVICE(0x07d1, 0x3c13), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
876 | { USB_DEVICE(0x07d1, 0x3c15), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
877 | /* Edimax */ | 919 | /* Edimax */ |
878 | { USB_DEVICE(0x7392, 0x7711), USB_DEVICE_DATA(&rt2800usb_ops) }, | 920 | { USB_DEVICE(0x7392, 0x7711), USB_DEVICE_DATA(&rt2800usb_ops) }, |
879 | { USB_DEVICE(0x7392, 0x7717), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
880 | { USB_DEVICE(0x7392, 0x7718), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
881 | /* Encore */ | 921 | /* Encore */ |
882 | { USB_DEVICE(0x203d, 0x1480), USB_DEVICE_DATA(&rt2800usb_ops) }, | 922 | { USB_DEVICE(0x203d, 0x1480), USB_DEVICE_DATA(&rt2800usb_ops) }, |
883 | { USB_DEVICE(0x203d, 0x14a1), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
884 | { USB_DEVICE(0x203d, 0x14a9), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
885 | /* EnGenius */ | 923 | /* EnGenius */ |
886 | { USB_DEVICE(0X1740, 0x9701), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
887 | { USB_DEVICE(0x1740, 0x9702), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
888 | { USB_DEVICE(0x1740, 0x9703), USB_DEVICE_DATA(&rt2800usb_ops) }, | 924 | { USB_DEVICE(0x1740, 0x9703), USB_DEVICE_DATA(&rt2800usb_ops) }, |
889 | { USB_DEVICE(0x1740, 0x9705), USB_DEVICE_DATA(&rt2800usb_ops) }, | 925 | { USB_DEVICE(0x1740, 0x9705), USB_DEVICE_DATA(&rt2800usb_ops) }, |
890 | { USB_DEVICE(0x1740, 0x9706), USB_DEVICE_DATA(&rt2800usb_ops) }, | 926 | { USB_DEVICE(0x1740, 0x9706), USB_DEVICE_DATA(&rt2800usb_ops) }, |
927 | /* Gigabyte */ | ||
928 | { USB_DEVICE(0x1044, 0x800d), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
929 | /* I-O DATA */ | ||
930 | { USB_DEVICE(0x04bb, 0x0945), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
931 | /* MSI */ | ||
932 | { USB_DEVICE(0x0db0, 0x3820), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
933 | /* Pegatron */ | ||
934 | { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
935 | { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
936 | /* Planex */ | ||
937 | { USB_DEVICE(0x2019, 0xab25), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
938 | /* Quanta */ | ||
939 | { USB_DEVICE(0x1a32, 0x0304), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
940 | /* Ralink */ | ||
941 | { USB_DEVICE(0x148f, 0x2070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
942 | { USB_DEVICE(0x148f, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
943 | { USB_DEVICE(0x148f, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
944 | { USB_DEVICE(0x148f, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
945 | /* Sitecom */ | ||
946 | { USB_DEVICE(0x0df6, 0x003e), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
947 | { USB_DEVICE(0x0df6, 0x0042), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
948 | /* SMC */ | ||
949 | { USB_DEVICE(0x083a, 0x7511), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
950 | /* Zinwell */ | ||
951 | { USB_DEVICE(0x5a57, 0x0283), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
952 | { USB_DEVICE(0x5a57, 0x5257), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
953 | #endif | ||
954 | #ifdef CONFIG_RT2800USB_RT35XX | ||
955 | /* Askey */ | ||
956 | { USB_DEVICE(0x1690, 0x0744), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
957 | /* Cisco */ | ||
958 | { USB_DEVICE(0x167b, 0x4001), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
959 | /* EnGenius */ | ||
960 | { USB_DEVICE(0x1740, 0x9801), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
961 | /* I-O DATA */ | ||
962 | { USB_DEVICE(0x04bb, 0x0944), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
963 | /* Ralink */ | ||
964 | { USB_DEVICE(0x148f, 0x3370), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
965 | { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
966 | { USB_DEVICE(0x148f, 0x8070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
967 | /* Sitecom */ | ||
968 | { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
969 | /* Zinwell */ | ||
970 | { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
971 | #endif | ||
972 | #ifdef CONFIG_RT2800USB_UNKNOWN | ||
973 | /* | ||
974 | * Unclear what kind of devices these are (they aren't supported by the | ||
975 | * vendor driver). | ||
976 | */ | ||
977 | /* Allwin */ | ||
978 | { USB_DEVICE(0x8516, 0x2070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
979 | { USB_DEVICE(0x8516, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
980 | { USB_DEVICE(0x8516, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
981 | { USB_DEVICE(0x8516, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
982 | { USB_DEVICE(0x8516, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
983 | { USB_DEVICE(0x8516, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
984 | { USB_DEVICE(0x8516, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
985 | /* Amigo */ | ||
986 | { USB_DEVICE(0x0e0b, 0x9031), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
987 | { USB_DEVICE(0x0e0b, 0x9041), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
988 | /* Askey */ | ||
989 | { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
990 | /* ASUS */ | ||
991 | { USB_DEVICE(0x0b05, 0x1760), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
992 | { USB_DEVICE(0x0b05, 0x1761), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
993 | { USB_DEVICE(0x0b05, 0x1784), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
994 | { USB_DEVICE(0x0b05, 0x1790), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
995 | { USB_DEVICE(0x1761, 0x0b05), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
996 | /* AzureWave */ | ||
997 | { USB_DEVICE(0x13d3, 0x3262), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
998 | { USB_DEVICE(0x13d3, 0x3284), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
999 | { USB_DEVICE(0x13d3, 0x3305), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1000 | /* Belkin */ | ||
1001 | { USB_DEVICE(0x050d, 0x825a), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1002 | /* Buffalo */ | ||
1003 | { USB_DEVICE(0x0411, 0x012e), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1004 | { USB_DEVICE(0x0411, 0x0148), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1005 | { USB_DEVICE(0x0411, 0x0150), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1006 | { USB_DEVICE(0x0411, 0x015d), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1007 | /* Conceptronic */ | ||
1008 | { USB_DEVICE(0x14b2, 0x3c08), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1009 | { USB_DEVICE(0x14b2, 0x3c11), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1010 | /* Corega */ | ||
1011 | { USB_DEVICE(0x07aa, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1012 | { USB_DEVICE(0x07aa, 0x0042), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1013 | { USB_DEVICE(0x18c5, 0x0008), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1014 | /* D-Link */ | ||
1015 | { USB_DEVICE(0x07d1, 0x3c0b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1016 | { USB_DEVICE(0x07d1, 0x3c13), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1017 | { USB_DEVICE(0x07d1, 0x3c15), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1018 | { USB_DEVICE(0x07d1, 0x3c16), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1019 | /* Encore */ | ||
1020 | { USB_DEVICE(0x203d, 0x14a1), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1021 | { USB_DEVICE(0x203d, 0x14a9), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1022 | /* EnGenius */ | ||
891 | { USB_DEVICE(0x1740, 0x9707), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1023 | { USB_DEVICE(0x1740, 0x9707), USB_DEVICE_DATA(&rt2800usb_ops) }, |
892 | { USB_DEVICE(0x1740, 0x9708), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1024 | { USB_DEVICE(0x1740, 0x9708), USB_DEVICE_DATA(&rt2800usb_ops) }, |
893 | { USB_DEVICE(0x1740, 0x9709), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1025 | { USB_DEVICE(0x1740, 0x9709), USB_DEVICE_DATA(&rt2800usb_ops) }, |
894 | { USB_DEVICE(0x1740, 0x9801), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
895 | /* Gemtek */ | 1026 | /* Gemtek */ |
896 | { USB_DEVICE(0x15a9, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1027 | { USB_DEVICE(0x15a9, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, |
897 | /* Gigabyte */ | 1028 | /* Gigabyte */ |
898 | { USB_DEVICE(0x1044, 0x800b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
899 | { USB_DEVICE(0x1044, 0x800c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1029 | { USB_DEVICE(0x1044, 0x800c), USB_DEVICE_DATA(&rt2800usb_ops) }, |
900 | { USB_DEVICE(0x1044, 0x800d), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
901 | /* Hawking */ | 1030 | /* Hawking */ |
902 | { USB_DEVICE(0x0e66, 0x0001), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
903 | { USB_DEVICE(0x0e66, 0x0003), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
904 | { USB_DEVICE(0x0e66, 0x0009), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1031 | { USB_DEVICE(0x0e66, 0x0009), USB_DEVICE_DATA(&rt2800usb_ops) }, |
905 | { USB_DEVICE(0x0e66, 0x000b), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1032 | { USB_DEVICE(0x0e66, 0x000b), USB_DEVICE_DATA(&rt2800usb_ops) }, |
906 | /* I-O DATA */ | 1033 | /* I-O DATA */ |
907 | { USB_DEVICE(0x04bb, 0x0944), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
908 | { USB_DEVICE(0x04bb, 0x0945), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
909 | { USB_DEVICE(0x04bb, 0x0947), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1034 | { USB_DEVICE(0x04bb, 0x0947), USB_DEVICE_DATA(&rt2800usb_ops) }, |
910 | { USB_DEVICE(0x04bb, 0x0948), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1035 | { USB_DEVICE(0x04bb, 0x0948), USB_DEVICE_DATA(&rt2800usb_ops) }, |
911 | /* LevelOne */ | 1036 | /* LevelOne */ |
912 | { USB_DEVICE(0x1740, 0x0605), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1037 | { USB_DEVICE(0x1740, 0x0605), USB_DEVICE_DATA(&rt2800usb_ops) }, |
913 | { USB_DEVICE(0x1740, 0x0615), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1038 | { USB_DEVICE(0x1740, 0x0615), USB_DEVICE_DATA(&rt2800usb_ops) }, |
914 | /* Linksys */ | 1039 | /* Linksys */ |
915 | { USB_DEVICE(0x1737, 0x0070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
916 | { USB_DEVICE(0x1737, 0x0071), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
917 | { USB_DEVICE(0x1737, 0x0077), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1040 | { USB_DEVICE(0x1737, 0x0077), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1041 | { USB_DEVICE(0x1737, 0x0078), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
918 | { USB_DEVICE(0x1737, 0x0079), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1042 | { USB_DEVICE(0x1737, 0x0079), USB_DEVICE_DATA(&rt2800usb_ops) }, |
919 | /* Logitec */ | ||
920 | { USB_DEVICE(0x0789, 0x0162), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
921 | { USB_DEVICE(0x0789, 0x0163), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
922 | { USB_DEVICE(0x0789, 0x0164), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
923 | /* Motorola */ | 1043 | /* Motorola */ |
924 | { USB_DEVICE(0x100d, 0x9031), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
925 | { USB_DEVICE(0x100d, 0x9032), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1044 | { USB_DEVICE(0x100d, 0x9032), USB_DEVICE_DATA(&rt2800usb_ops) }, |
926 | /* MSI */ | 1045 | /* MSI */ |
927 | { USB_DEVICE(0x0db0, 0x3820), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
928 | { USB_DEVICE(0x0db0, 0x3821), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1046 | { USB_DEVICE(0x0db0, 0x3821), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1047 | { USB_DEVICE(0x0db0, 0x3822), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
929 | { USB_DEVICE(0x0db0, 0x3870), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1048 | { USB_DEVICE(0x0db0, 0x3870), USB_DEVICE_DATA(&rt2800usb_ops) }, |
930 | { USB_DEVICE(0x0db0, 0x6899), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1049 | { USB_DEVICE(0x0db0, 0x3871), USB_DEVICE_DATA(&rt2800usb_ops) }, |
931 | { USB_DEVICE(0x0db0, 0x821a), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1050 | { USB_DEVICE(0x0db0, 0x821a), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1051 | { USB_DEVICE(0x0db0, 0x822a), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
932 | { USB_DEVICE(0x0db0, 0x870a), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1052 | { USB_DEVICE(0x0db0, 0x870a), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1053 | { USB_DEVICE(0x0db0, 0x871a), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
933 | { USB_DEVICE(0x0db0, 0x899a), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1054 | { USB_DEVICE(0x0db0, 0x899a), USB_DEVICE_DATA(&rt2800usb_ops) }, |
934 | /* Ovislink */ | 1055 | /* Ovislink */ |
935 | { USB_DEVICE(0x1b75, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1056 | { USB_DEVICE(0x1b75, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, |
936 | /* Para */ | 1057 | /* Para */ |
937 | { USB_DEVICE(0x20b8, 0x8888), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1058 | { USB_DEVICE(0x20b8, 0x8888), USB_DEVICE_DATA(&rt2800usb_ops) }, |
938 | /* Pegatron */ | 1059 | /* Pegatron */ |
1060 | { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
939 | { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1061 | { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, |
940 | { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1062 | { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, |
941 | { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
942 | /* Philips */ | ||
943 | { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
944 | /* Planex */ | 1063 | /* Planex */ |
945 | { USB_DEVICE(0x2019, 0xed06), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
946 | { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1064 | { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, |
947 | { USB_DEVICE(0x2019, 0xab25), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
948 | /* Qcom */ | 1065 | /* Qcom */ |
949 | { USB_DEVICE(0x18e8, 0x6259), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1066 | { USB_DEVICE(0x18e8, 0x6259), USB_DEVICE_DATA(&rt2800usb_ops) }, |
950 | /* Quanta */ | ||
951 | { USB_DEVICE(0x1a32, 0x0304), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
952 | /* Ralink */ | ||
953 | { USB_DEVICE(0x148f, 0x2070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
954 | { USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
955 | { USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
956 | { USB_DEVICE(0x148f, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
957 | { USB_DEVICE(0x148f, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
958 | { USB_DEVICE(0x148f, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
959 | { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
960 | /* Samsung */ | ||
961 | { USB_DEVICE(0x04e8, 0x2018), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
962 | /* Siemens */ | ||
963 | { USB_DEVICE(0x129b, 0x1828), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
964 | /* Sitecom */ | 1067 | /* Sitecom */ |
965 | { USB_DEVICE(0x0df6, 0x0017), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
966 | { USB_DEVICE(0x0df6, 0x002b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
967 | { USB_DEVICE(0x0df6, 0x002c), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
968 | { USB_DEVICE(0x0df6, 0x002d), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
969 | { USB_DEVICE(0x0df6, 0x0039), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
970 | { USB_DEVICE(0x0df6, 0x003b), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1068 | { USB_DEVICE(0x0df6, 0x003b), USB_DEVICE_DATA(&rt2800usb_ops) }, |
971 | { USB_DEVICE(0x0df6, 0x003c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1069 | { USB_DEVICE(0x0df6, 0x003c), USB_DEVICE_DATA(&rt2800usb_ops) }, |
972 | { USB_DEVICE(0x0df6, 0x003d), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1070 | { USB_DEVICE(0x0df6, 0x003d), USB_DEVICE_DATA(&rt2800usb_ops) }, |
973 | { USB_DEVICE(0x0df6, 0x003e), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
974 | { USB_DEVICE(0x0df6, 0x003f), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
975 | { USB_DEVICE(0x0df6, 0x0040), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1071 | { USB_DEVICE(0x0df6, 0x0040), USB_DEVICE_DATA(&rt2800usb_ops) }, |
976 | { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
977 | { USB_DEVICE(0x0df6, 0x0042), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
978 | { USB_DEVICE(0x0df6, 0x0047), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1072 | { USB_DEVICE(0x0df6, 0x0047), USB_DEVICE_DATA(&rt2800usb_ops) }, |
979 | { USB_DEVICE(0x0df6, 0x0048), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1073 | { USB_DEVICE(0x0df6, 0x0048), USB_DEVICE_DATA(&rt2800usb_ops) }, |
980 | { USB_DEVICE(0x0df6, 0x004a), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1074 | { USB_DEVICE(0x0df6, 0x004a), USB_DEVICE_DATA(&rt2800usb_ops) }, |
981 | { USB_DEVICE(0x0df6, 0x004d), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1075 | { USB_DEVICE(0x0df6, 0x004d), USB_DEVICE_DATA(&rt2800usb_ops) }, |
982 | /* SMC */ | 1076 | /* SMC */ |
983 | { USB_DEVICE(0x083a, 0x6618), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
984 | { USB_DEVICE(0x083a, 0x7511), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
985 | { USB_DEVICE(0x083a, 0x7512), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
986 | { USB_DEVICE(0x083a, 0x7522), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
987 | { USB_DEVICE(0x083a, 0x8522), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
988 | { USB_DEVICE(0x083a, 0xa512), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1077 | { USB_DEVICE(0x083a, 0xa512), USB_DEVICE_DATA(&rt2800usb_ops) }, |
989 | { USB_DEVICE(0x083a, 0xa618), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
990 | { USB_DEVICE(0x083a, 0xa701), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1078 | { USB_DEVICE(0x083a, 0xa701), USB_DEVICE_DATA(&rt2800usb_ops) }, |
991 | { USB_DEVICE(0x083a, 0xa702), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1079 | { USB_DEVICE(0x083a, 0xa702), USB_DEVICE_DATA(&rt2800usb_ops) }, |
992 | { USB_DEVICE(0x083a, 0xb522), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
993 | { USB_DEVICE(0x083a, 0xc522), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1080 | { USB_DEVICE(0x083a, 0xc522), USB_DEVICE_DATA(&rt2800usb_ops) }, |
994 | /* Sparklan */ | 1081 | { USB_DEVICE(0x083a, 0xd522), USB_DEVICE_DATA(&rt2800usb_ops) }, |
995 | { USB_DEVICE(0x15a9, 0x0006), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
996 | /* Sweex */ | 1082 | /* Sweex */ |
997 | { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1083 | { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) }, |
998 | { USB_DEVICE(0x177f, 0x0302), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
999 | { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1084 | { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1000 | /* U-Media*/ | ||
1001 | { USB_DEVICE(0x157e, 0x300e), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1002 | /* ZCOM */ | ||
1003 | { USB_DEVICE(0x0cde, 0x0022), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1004 | { USB_DEVICE(0x0cde, 0x0025), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1005 | /* Zinwell */ | ||
1006 | { USB_DEVICE(0x5a57, 0x0280), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1007 | { USB_DEVICE(0x5a57, 0x0282), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1008 | { USB_DEVICE(0x5a57, 0x0283), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1009 | { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1010 | { USB_DEVICE(0x5a57, 0x5257), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1011 | /* Zyxel */ | 1085 | /* Zyxel */ |
1012 | { USB_DEVICE(0x0586, 0x3416), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1013 | { USB_DEVICE(0x0586, 0x341a), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1086 | { USB_DEVICE(0x0586, 0x341a), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1087 | #endif | ||
1014 | { 0, } | 1088 | { 0, } |
1015 | }; | 1089 | }; |
1016 | 1090 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 43b70c6e4e9c..d9daa9c406fa 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -160,6 +160,7 @@ struct avg_val { | |||
160 | enum rt2x00_chip_intf { | 160 | enum rt2x00_chip_intf { |
161 | RT2X00_CHIP_INTF_PCI, | 161 | RT2X00_CHIP_INTF_PCI, |
162 | RT2X00_CHIP_INTF_USB, | 162 | RT2X00_CHIP_INTF_USB, |
163 | RT2X00_CHIP_INTF_SOC, | ||
163 | }; | 164 | }; |
164 | 165 | ||
165 | /* | 166 | /* |
@@ -169,25 +170,26 @@ enum rt2x00_chip_intf { | |||
169 | */ | 170 | */ |
170 | struct rt2x00_chip { | 171 | struct rt2x00_chip { |
171 | u16 rt; | 172 | u16 rt; |
172 | #define RT2460 0x0101 | 173 | #define RT2460 0x2460 |
173 | #define RT2560 0x0201 | 174 | #define RT2560 0x2560 |
174 | #define RT2570 0x1201 | 175 | #define RT2570 0x2570 |
175 | #define RT2561s 0x0301 /* Turbo */ | 176 | #define RT2661 0x2661 |
176 | #define RT2561 0x0302 | 177 | #define RT2573 0x2573 |
177 | #define RT2661 0x0401 | 178 | #define RT2860 0x2860 /* 2.4GHz PCI/CB */ |
178 | #define RT2571 0x1300 | 179 | #define RT2870 0x2870 |
179 | #define RT2860 0x0601 /* 2.4GHz PCI/CB */ | 180 | #define RT2872 0x2872 |
180 | #define RT2860D 0x0681 /* 2.4GHz, 5GHz PCI/CB */ | ||
181 | #define RT2890 0x0701 /* 2.4GHz PCIe */ | ||
182 | #define RT2890D 0x0781 /* 2.4GHz, 5GHz PCIe */ | ||
183 | #define RT2880 0x2880 /* WSOC */ | 181 | #define RT2880 0x2880 /* WSOC */ |
182 | #define RT2883 0x2883 /* WSOC */ | ||
183 | #define RT2890 0x2890 /* 2.4GHz PCIe */ | ||
184 | #define RT3052 0x3052 /* WSOC */ | 184 | #define RT3052 0x3052 /* WSOC */ |
185 | #define RT3070 0x3070 | ||
186 | #define RT3071 0x3071 | ||
185 | #define RT3090 0x3090 /* 2.4GHz PCIe */ | 187 | #define RT3090 0x3090 /* 2.4GHz PCIe */ |
186 | #define RT2870 0x1600 | 188 | #define RT3390 0x3390 |
187 | #define RT3070 0x1800 | 189 | #define RT3572 0x3572 |
188 | 190 | ||
189 | u16 rf; | 191 | u16 rf; |
190 | u32 rev; | 192 | u16 rev; |
191 | 193 | ||
192 | enum rt2x00_chip_intf intf; | 194 | enum rt2x00_chip_intf intf; |
193 | }; | 195 | }; |
@@ -917,29 +919,14 @@ static inline void rt2x00_eeprom_write(struct rt2x00_dev *rt2x00dev, | |||
917 | * Chipset handlers | 919 | * Chipset handlers |
918 | */ | 920 | */ |
919 | static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev, | 921 | static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev, |
920 | const u16 rt, const u16 rf, const u32 rev) | 922 | const u16 rt, const u16 rf, const u16 rev) |
921 | { | 923 | { |
922 | rt2x00dev->chip.rt = rt; | 924 | rt2x00dev->chip.rt = rt; |
923 | rt2x00dev->chip.rf = rf; | 925 | rt2x00dev->chip.rf = rf; |
924 | rt2x00dev->chip.rev = rev; | 926 | rt2x00dev->chip.rev = rev; |
925 | } | ||
926 | |||
927 | static inline void rt2x00_set_chip_rt(struct rt2x00_dev *rt2x00dev, | ||
928 | const u16 rt) | ||
929 | { | ||
930 | rt2x00dev->chip.rt = rt; | ||
931 | } | ||
932 | |||
933 | static inline void rt2x00_set_chip_rf(struct rt2x00_dev *rt2x00dev, | ||
934 | const u16 rf, const u32 rev) | ||
935 | { | ||
936 | rt2x00_set_chip(rt2x00dev, rt2x00dev->chip.rt, rf, rev); | ||
937 | } | ||
938 | 927 | ||
939 | static inline void rt2x00_print_chip(struct rt2x00_dev *rt2x00dev) | ||
940 | { | ||
941 | INFO(rt2x00dev, | 928 | INFO(rt2x00dev, |
942 | "Chipset detected - rt: %04x, rf: %04x, rev: %08x.\n", | 929 | "Chipset detected - rt: %04x, rf: %04x, rev: %04x.\n", |
943 | rt2x00dev->chip.rt, rt2x00dev->chip.rf, rt2x00dev->chip.rev); | 930 | rt2x00dev->chip.rt, rt2x00dev->chip.rf, rt2x00dev->chip.rev); |
944 | } | 931 | } |
945 | 932 | ||
@@ -953,17 +940,11 @@ static inline char rt2x00_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) | |||
953 | return (rt2x00dev->chip.rf == rf); | 940 | return (rt2x00dev->chip.rf == rf); |
954 | } | 941 | } |
955 | 942 | ||
956 | static inline u32 rt2x00_rev(struct rt2x00_dev *rt2x00dev) | 943 | static inline u16 rt2x00_rev(struct rt2x00_dev *rt2x00dev) |
957 | { | 944 | { |
958 | return rt2x00dev->chip.rev; | 945 | return rt2x00dev->chip.rev; |
959 | } | 946 | } |
960 | 947 | ||
961 | static inline bool rt2x00_check_rev(struct rt2x00_dev *rt2x00dev, | ||
962 | const u32 mask, const u32 rev) | ||
963 | { | ||
964 | return ((rt2x00dev->chip.rev & mask) == rev); | ||
965 | } | ||
966 | |||
967 | static inline void rt2x00_set_chip_intf(struct rt2x00_dev *rt2x00dev, | 948 | static inline void rt2x00_set_chip_intf(struct rt2x00_dev *rt2x00dev, |
968 | enum rt2x00_chip_intf intf) | 949 | enum rt2x00_chip_intf intf) |
969 | { | 950 | { |
@@ -976,16 +957,21 @@ static inline bool rt2x00_intf(struct rt2x00_dev *rt2x00dev, | |||
976 | return (rt2x00dev->chip.intf == intf); | 957 | return (rt2x00dev->chip.intf == intf); |
977 | } | 958 | } |
978 | 959 | ||
979 | static inline bool rt2x00_intf_is_pci(struct rt2x00_dev *rt2x00dev) | 960 | static inline bool rt2x00_is_pci(struct rt2x00_dev *rt2x00dev) |
980 | { | 961 | { |
981 | return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI); | 962 | return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI); |
982 | } | 963 | } |
983 | 964 | ||
984 | static inline bool rt2x00_intf_is_usb(struct rt2x00_dev *rt2x00dev) | 965 | static inline bool rt2x00_is_usb(struct rt2x00_dev *rt2x00dev) |
985 | { | 966 | { |
986 | return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_USB); | 967 | return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_USB); |
987 | } | 968 | } |
988 | 969 | ||
970 | static inline bool rt2x00_is_soc(struct rt2x00_dev *rt2x00dev) | ||
971 | { | ||
972 | return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC); | ||
973 | } | ||
974 | |||
989 | /** | 975 | /** |
990 | * rt2x00queue_map_txskb - Map a skb into DMA for TX purposes. | 976 | * rt2x00queue_map_txskb - Map a skb into DMA for TX purposes. |
991 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | 977 | * @rt2x00dev: Pointer to &struct rt2x00_dev. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c index 7d323a763b54..70c04c282efc 100644 --- a/drivers/net/wireless/rt2x00/rt2x00debug.c +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c | |||
@@ -184,7 +184,7 @@ void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, | |||
184 | dump_hdr->data_length = cpu_to_le32(skb->len); | 184 | dump_hdr->data_length = cpu_to_le32(skb->len); |
185 | dump_hdr->chip_rt = cpu_to_le16(rt2x00dev->chip.rt); | 185 | dump_hdr->chip_rt = cpu_to_le16(rt2x00dev->chip.rt); |
186 | dump_hdr->chip_rf = cpu_to_le16(rt2x00dev->chip.rf); | 186 | dump_hdr->chip_rf = cpu_to_le16(rt2x00dev->chip.rf); |
187 | dump_hdr->chip_rev = cpu_to_le32(rt2x00dev->chip.rev); | 187 | dump_hdr->chip_rev = cpu_to_le16(rt2x00dev->chip.rev); |
188 | dump_hdr->type = cpu_to_le16(type); | 188 | dump_hdr->type = cpu_to_le16(type); |
189 | dump_hdr->queue_index = desc->entry->queue->qid; | 189 | dump_hdr->queue_index = desc->entry->queue->qid; |
190 | dump_hdr->entry_index = desc->entry->entry_idx; | 190 | dump_hdr->entry_index = desc->entry->entry_idx; |
@@ -573,7 +573,7 @@ static struct dentry *rt2x00debug_create_file_chipset(const char *name, | |||
573 | blob->data = data; | 573 | blob->data = data; |
574 | data += sprintf(data, "rt chip:\t%04x\n", intf->rt2x00dev->chip.rt); | 574 | data += sprintf(data, "rt chip:\t%04x\n", intf->rt2x00dev->chip.rt); |
575 | data += sprintf(data, "rf chip:\t%04x\n", intf->rt2x00dev->chip.rf); | 575 | data += sprintf(data, "rf chip:\t%04x\n", intf->rt2x00dev->chip.rf); |
576 | data += sprintf(data, "revision:\t%08x\n", intf->rt2x00dev->chip.rev); | 576 | data += sprintf(data, "revision:\t%04x\n", intf->rt2x00dev->chip.rev); |
577 | data += sprintf(data, "\n"); | 577 | data += sprintf(data, "\n"); |
578 | data += sprintf(data, "register\tbase\twords\twordsize\n"); | 578 | data += sprintf(data, "register\tbase\twords\twordsize\n"); |
579 | data += sprintf(data, "csr\t%d\t%d\t%d\n", | 579 | data += sprintf(data, "csr\t%d\t%d\t%d\n", |
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 801be436cf1d..047123b766fc 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -272,7 +272,6 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) | |||
272 | struct ieee80211_hw *hw; | 272 | struct ieee80211_hw *hw; |
273 | struct rt2x00_dev *rt2x00dev; | 273 | struct rt2x00_dev *rt2x00dev; |
274 | int retval; | 274 | int retval; |
275 | u16 chip; | ||
276 | 275 | ||
277 | retval = pci_request_regions(pci_dev, pci_name(pci_dev)); | 276 | retval = pci_request_regions(pci_dev, pci_name(pci_dev)); |
278 | if (retval) { | 277 | if (retval) { |
@@ -315,12 +314,6 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) | |||
315 | 314 | ||
316 | rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI); | 315 | rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI); |
317 | 316 | ||
318 | /* | ||
319 | * Determine RT chipset by reading PCI header. | ||
320 | */ | ||
321 | pci_read_config_word(pci_dev, PCI_DEVICE_ID, &chip); | ||
322 | rt2x00_set_chip_rt(rt2x00dev, chip); | ||
323 | |||
324 | retval = rt2x00pci_alloc_reg(rt2x00dev); | 317 | retval = rt2x00pci_alloc_reg(rt2x00dev); |
325 | if (retval) | 318 | if (retval) |
326 | goto exit_free_device; | 319 | goto exit_free_device; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.h b/drivers/net/wireless/rt2x00/rt2x00pci.h index d4f9449ab0a4..8149ff68410a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.h +++ b/drivers/net/wireless/rt2x00/rt2x00pci.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #define RT2X00PCI_H | 27 | #define RT2X00PCI_H |
28 | 28 | ||
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/pci.h> | ||
30 | 31 | ||
31 | /* | 32 | /* |
32 | * This variable should be used with the | 33 | * This variable should be used with the |
diff --git a/drivers/net/wireless/rt2x00/rt2x00soc.c b/drivers/net/wireless/rt2x00/rt2x00soc.c index 19e684f8ffa1..4efdc96010f6 100644 --- a/drivers/net/wireless/rt2x00/rt2x00soc.c +++ b/drivers/net/wireless/rt2x00/rt2x00soc.c | |||
@@ -71,9 +71,7 @@ exit: | |||
71 | return -ENOMEM; | 71 | return -ENOMEM; |
72 | } | 72 | } |
73 | 73 | ||
74 | int rt2x00soc_probe(struct platform_device *pdev, | 74 | int rt2x00soc_probe(struct platform_device *pdev, const struct rt2x00_ops *ops) |
75 | const unsigned short chipset, | ||
76 | const struct rt2x00_ops *ops) | ||
77 | { | 75 | { |
78 | struct ieee80211_hw *hw; | 76 | struct ieee80211_hw *hw; |
79 | struct rt2x00_dev *rt2x00dev; | 77 | struct rt2x00_dev *rt2x00dev; |
@@ -94,12 +92,7 @@ int rt2x00soc_probe(struct platform_device *pdev, | |||
94 | rt2x00dev->irq = platform_get_irq(pdev, 0); | 92 | rt2x00dev->irq = platform_get_irq(pdev, 0); |
95 | rt2x00dev->name = pdev->dev.driver->name; | 93 | rt2x00dev->name = pdev->dev.driver->name; |
96 | 94 | ||
97 | /* | 95 | rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC); |
98 | * SoC devices mimic PCI behavior. | ||
99 | */ | ||
100 | rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI); | ||
101 | |||
102 | rt2x00_set_chip_rt(rt2x00dev, chipset); | ||
103 | 96 | ||
104 | retval = rt2x00soc_alloc_reg(rt2x00dev); | 97 | retval = rt2x00soc_alloc_reg(rt2x00dev); |
105 | if (retval) | 98 | if (retval) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00soc.h b/drivers/net/wireless/rt2x00/rt2x00soc.h index 8a3416624af5..4739edfe2f00 100644 --- a/drivers/net/wireless/rt2x00/rt2x00soc.h +++ b/drivers/net/wireless/rt2x00/rt2x00soc.h | |||
@@ -28,18 +28,10 @@ | |||
28 | 28 | ||
29 | #define KSEG1ADDR(__ptr) __ptr | 29 | #define KSEG1ADDR(__ptr) __ptr |
30 | 30 | ||
31 | #define __rt2x00soc_probe(__chipset, __ops) \ | ||
32 | static int __rt2x00soc_probe(struct platform_device *pdev) \ | ||
33 | { \ | ||
34 | return rt2x00soc_probe(pdev, (__chipset), (__ops)); \ | ||
35 | } | ||
36 | |||
37 | /* | 31 | /* |
38 | * SoC driver handlers. | 32 | * SoC driver handlers. |
39 | */ | 33 | */ |
40 | int rt2x00soc_probe(struct platform_device *pdev, | 34 | int rt2x00soc_probe(struct platform_device *pdev, const struct rt2x00_ops *ops); |
41 | const unsigned short chipset, | ||
42 | const struct rt2x00_ops *ops); | ||
43 | int rt2x00soc_remove(struct platform_device *pdev); | 35 | int rt2x00soc_remove(struct platform_device *pdev); |
44 | #ifdef CONFIG_PM | 36 | #ifdef CONFIG_PM |
45 | int rt2x00soc_suspend(struct platform_device *pdev, pm_message_t state); | 37 | int rt2x00soc_suspend(struct platform_device *pdev, pm_message_t state); |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 74de53e68b4e..e2da928dd9f0 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -1131,16 +1131,18 @@ dynamic_cca_tune: | |||
1131 | */ | 1131 | */ |
1132 | static char *rt61pci_get_firmware_name(struct rt2x00_dev *rt2x00dev) | 1132 | static char *rt61pci_get_firmware_name(struct rt2x00_dev *rt2x00dev) |
1133 | { | 1133 | { |
1134 | u16 chip; | ||
1134 | char *fw_name; | 1135 | char *fw_name; |
1135 | 1136 | ||
1136 | switch (rt2x00dev->chip.rt) { | 1137 | pci_read_config_word(to_pci_dev(rt2x00dev->dev), PCI_DEVICE_ID, &chip); |
1137 | case RT2561: | 1138 | switch (chip) { |
1139 | case RT2561_PCI_ID: | ||
1138 | fw_name = FIRMWARE_RT2561; | 1140 | fw_name = FIRMWARE_RT2561; |
1139 | break; | 1141 | break; |
1140 | case RT2561s: | 1142 | case RT2561s_PCI_ID: |
1141 | fw_name = FIRMWARE_RT2561s; | 1143 | fw_name = FIRMWARE_RT2561s; |
1142 | break; | 1144 | break; |
1143 | case RT2661: | 1145 | case RT2661_PCI_ID: |
1144 | fw_name = FIRMWARE_RT2661; | 1146 | fw_name = FIRMWARE_RT2661; |
1145 | break; | 1147 | break; |
1146 | default: | 1148 | default: |
@@ -2295,8 +2297,8 @@ static int rt61pci_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
2295 | */ | 2297 | */ |
2296 | value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); | 2298 | value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); |
2297 | rt2x00pci_register_read(rt2x00dev, MAC_CSR0, ®); | 2299 | rt2x00pci_register_read(rt2x00dev, MAC_CSR0, ®); |
2298 | rt2x00_set_chip_rf(rt2x00dev, value, reg); | 2300 | rt2x00_set_chip(rt2x00dev, rt2x00_get_field32(reg, MAC_CSR0_CHIPSET), |
2299 | rt2x00_print_chip(rt2x00dev); | 2301 | value, rt2x00_get_field32(reg, MAC_CSR0_REVISION)); |
2300 | 2302 | ||
2301 | if (!rt2x00_rf(rt2x00dev, RF5225) && | 2303 | if (!rt2x00_rf(rt2x00dev, RF5225) && |
2302 | !rt2x00_rf(rt2x00dev, RF5325) && | 2304 | !rt2x00_rf(rt2x00dev, RF5325) && |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.h b/drivers/net/wireless/rt2x00/rt61pci.h index 8f13810622bd..df80f1af22a4 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.h +++ b/drivers/net/wireless/rt2x00/rt61pci.h | |||
@@ -28,6 +28,13 @@ | |||
28 | #define RT61PCI_H | 28 | #define RT61PCI_H |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * RT chip PCI IDs. | ||
32 | */ | ||
33 | #define RT2561s_PCI_ID 0x0301 | ||
34 | #define RT2561_PCI_ID 0x0302 | ||
35 | #define RT2661_PCI_ID 0x0401 | ||
36 | |||
37 | /* | ||
31 | * RF chip defines. | 38 | * RF chip defines. |
32 | */ | 39 | */ |
33 | #define RF5225 0x0001 | 40 | #define RF5225 0x0001 |
@@ -225,6 +232,8 @@ struct hw_pairwise_ta_entry { | |||
225 | * MAC_CSR0: ASIC revision number. | 232 | * MAC_CSR0: ASIC revision number. |
226 | */ | 233 | */ |
227 | #define MAC_CSR0 0x3000 | 234 | #define MAC_CSR0 0x3000 |
235 | #define MAC_CSR0_REVISION FIELD32(0x0000000f) | ||
236 | #define MAC_CSR0_CHIPSET FIELD32(0x000ffff0) | ||
228 | 237 | ||
229 | /* | 238 | /* |
230 | * MAC_CSR1: System control register. | 239 | * MAC_CSR1: System control register. |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 3781eb7b4aa0..f39a8ed17841 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1820,11 +1820,10 @@ static int rt73usb_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1820 | */ | 1820 | */ |
1821 | value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); | 1821 | value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); |
1822 | rt2x00usb_register_read(rt2x00dev, MAC_CSR0, ®); | 1822 | rt2x00usb_register_read(rt2x00dev, MAC_CSR0, ®); |
1823 | rt2x00_set_chip(rt2x00dev, RT2571, value, reg); | 1823 | rt2x00_set_chip(rt2x00dev, rt2x00_get_field32(reg, MAC_CSR0_CHIPSET), |
1824 | rt2x00_print_chip(rt2x00dev); | 1824 | value, rt2x00_get_field32(reg, MAC_CSR0_REVISION)); |
1825 | 1825 | ||
1826 | if (!rt2x00_check_rev(rt2x00dev, 0x000ffff0, 0x25730) || | 1826 | if (!rt2x00_rt(rt2x00dev, RT2573) || (rt2x00_rev(rt2x00dev) == 0)) { |
1827 | rt2x00_check_rev(rt2x00dev, 0x0000000f, 0)) { | ||
1828 | ERROR(rt2x00dev, "Invalid RT chipset detected.\n"); | 1827 | ERROR(rt2x00dev, "Invalid RT chipset detected.\n"); |
1829 | return -ENODEV; | 1828 | return -ENODEV; |
1830 | } | 1829 | } |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.h b/drivers/net/wireless/rt2x00/rt73usb.h index 7942f810e928..7abe7eb14555 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.h +++ b/drivers/net/wireless/rt2x00/rt73usb.h | |||
@@ -142,6 +142,8 @@ struct hw_pairwise_ta_entry { | |||
142 | * MAC_CSR0: ASIC revision number. | 142 | * MAC_CSR0: ASIC revision number. |
143 | */ | 143 | */ |
144 | #define MAC_CSR0 0x3000 | 144 | #define MAC_CSR0 0x3000 |
145 | #define MAC_CSR0_REVISION FIELD32(0x0000000f) | ||
146 | #define MAC_CSR0_CHIPSET FIELD32(0x000ffff0) | ||
145 | 147 | ||
146 | /* | 148 | /* |
147 | * MAC_CSR1: System control register. | 149 | * MAC_CSR1: System control register. |