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.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index 458378c4e500..b93eabb4fbe1 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -48,14 +48,6 @@
48#include "rt2800.h" 48#include "rt2800.h"
49#include "rt2800pci.h" 49#include "rt2800pci.h"
50 50
51#ifdef CONFIG_RT2800PCI_PCI_MODULE
52#define CONFIG_RT2800PCI_PCI
53#endif
54
55#ifdef CONFIG_RT2800PCI_WISOC_MODULE
56#define CONFIG_RT2800PCI_WISOC
57#endif
58
59/* 51/*
60 * Allow hardware encryption to be disabled. 52 * Allow hardware encryption to be disabled.
61 */ 53 */
@@ -87,7 +79,7 @@ static void rt2800pci_mcu_status(struct rt2x00_dev *rt2x00dev, const u8 token)
87 rt2800_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0); 79 rt2800_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
88} 80}
89 81
90#ifdef CONFIG_RT2800PCI_WISOC 82#ifdef CONFIG_RT2800PCI_SOC
91static void rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev) 83static void rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
92{ 84{
93 u32 *base_addr = (u32 *) KSEG1ADDR(0x1F040000); /* XXX for RT3052 */ 85 u32 *base_addr = (u32 *) KSEG1ADDR(0x1F040000); /* XXX for RT3052 */
@@ -98,7 +90,7 @@ static void rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
98static inline void rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev) 90static inline void rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
99{ 91{
100} 92}
101#endif /* CONFIG_RT2800PCI_WISOC */ 93#endif /* CONFIG_RT2800PCI_SOC */
102 94
103#ifdef CONFIG_RT2800PCI_PCI 95#ifdef CONFIG_RT2800PCI_PCI
104static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom) 96static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom)
@@ -1129,8 +1121,7 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev)
1129 /* 1121 /*
1130 * This device requires firmware. 1122 * This device requires firmware.
1131 */ 1123 */
1132 if (!rt2x00_rt(&rt2x00dev->chip, RT2880) && 1124 if (!rt2x00_rt(rt2x00dev, RT2880) && !rt2x00_rt(rt2x00dev, RT3052))
1133 !rt2x00_rt(&rt2x00dev->chip, RT3052))
1134 __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags); 1125 __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
1135 __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags); 1126 __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags);
1136 __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); 1127 __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags);
@@ -1251,7 +1242,7 @@ MODULE_DEVICE_TABLE(pci, rt2800pci_device_table);
1251#endif /* CONFIG_RT2800PCI_PCI */ 1242#endif /* CONFIG_RT2800PCI_PCI */
1252MODULE_LICENSE("GPL"); 1243MODULE_LICENSE("GPL");
1253 1244
1254#ifdef CONFIG_RT2800PCI_WISOC 1245#ifdef CONFIG_RT2800PCI_SOC
1255#if defined(CONFIG_RALINK_RT288X) 1246#if defined(CONFIG_RALINK_RT288X)
1256__rt2x00soc_probe(RT2880, &rt2800pci_ops); 1247__rt2x00soc_probe(RT2880, &rt2800pci_ops);
1257#elif defined(CONFIG_RALINK_RT305X) 1248#elif defined(CONFIG_RALINK_RT305X)
@@ -1269,7 +1260,7 @@ static struct platform_driver rt2800soc_driver = {
1269 .suspend = rt2x00soc_suspend, 1260 .suspend = rt2x00soc_suspend,
1270 .resume = rt2x00soc_resume, 1261 .resume = rt2x00soc_resume,
1271}; 1262};
1272#endif /* CONFIG_RT2800PCI_WISOC */ 1263#endif /* CONFIG_RT2800PCI_SOC */
1273 1264
1274#ifdef CONFIG_RT2800PCI_PCI 1265#ifdef CONFIG_RT2800PCI_PCI
1275static struct pci_driver rt2800pci_driver = { 1266static struct pci_driver rt2800pci_driver = {
@@ -1286,7 +1277,7 @@ static int __init rt2800pci_init(void)
1286{ 1277{
1287 int ret = 0; 1278 int ret = 0;
1288 1279
1289#ifdef CONFIG_RT2800PCI_WISOC 1280#ifdef CONFIG_RT2800PCI_SOC
1290 ret = platform_driver_register(&rt2800soc_driver); 1281 ret = platform_driver_register(&rt2800soc_driver);
1291 if (ret) 1282 if (ret)
1292 return ret; 1283 return ret;
@@ -1294,7 +1285,7 @@ static int __init rt2800pci_init(void)
1294#ifdef CONFIG_RT2800PCI_PCI 1285#ifdef CONFIG_RT2800PCI_PCI
1295 ret = pci_register_driver(&rt2800pci_driver); 1286 ret = pci_register_driver(&rt2800pci_driver);
1296 if (ret) { 1287 if (ret) {
1297#ifdef CONFIG_RT2800PCI_WISOC 1288#ifdef CONFIG_RT2800PCI_SOC
1298 platform_driver_unregister(&rt2800soc_driver); 1289 platform_driver_unregister(&rt2800soc_driver);
1299#endif 1290#endif
1300 return ret; 1291 return ret;
@@ -1309,7 +1300,7 @@ static void __exit rt2800pci_exit(void)
1309#ifdef CONFIG_RT2800PCI_PCI 1300#ifdef CONFIG_RT2800PCI_PCI
1310 pci_unregister_driver(&rt2800pci_driver); 1301 pci_unregister_driver(&rt2800pci_driver);
1311#endif 1302#endif
1312#ifdef CONFIG_RT2800PCI_WISOC 1303#ifdef CONFIG_RT2800PCI_SOC
1313 platform_driver_unregister(&rt2800soc_driver); 1304 platform_driver_unregister(&rt2800soc_driver);
1314#endif 1305#endif
1315} 1306}