aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800pci.c49
1 files changed, 23 insertions, 26 deletions
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 */
1193static DEFINE_PCI_DEVICE_TABLE(rt2800pci_device_table) = { 1187static 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);
1225MODULE_LICENSE("GPL"); 1223MODULE_LICENSE("GPL");
1226 1224
1227#ifdef CONFIG_RT2800PCI_SOC 1225#ifdef CONFIG_RT2800PCI_SOC
1228#if defined(CONFIG_RALINK_RT288X) 1226static 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
1234static struct platform_driver rt2800soc_driver = { 1231static 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,