aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rt2x00/Kconfig45
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c8
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c8
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c8
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c12
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c8
6 files changed, 26 insertions, 63 deletions
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig
index c896c9903879..b686dc45483e 100644
--- a/drivers/net/wireless/rt2x00/Kconfig
+++ b/drivers/net/wireless/rt2x00/Kconfig
@@ -45,7 +45,10 @@ config RT2X00_LIB_RFKILL
45 45
46config RT2X00_LIB_LEDS 46config RT2X00_LIB_LEDS
47 boolean 47 boolean
48 depends on RT2X00_LIB && NEW_LEDS 48 depends on RT2X00_LIB
49 depends on NEW_LEDS
50 depends on LEDS_CLASS
51 default y
49 52
50config RT2400PCI 53config RT2400PCI
51 tristate "Ralink rt2400 (PCI/PCMCIA) support" 54 tristate "Ralink rt2400 (PCI/PCMCIA) support"
@@ -58,14 +61,6 @@ config RT2400PCI
58 61
59 When compiled as a module, this driver will be called "rt2400pci.ko". 62 When compiled as a module, this driver will be called "rt2400pci.ko".
60 63
61config RT2400PCI_LEDS
62 bool "Ralink rt2400 leds support"
63 depends on RT2400PCI && NEW_LEDS
64 select LEDS_CLASS
65 select RT2X00_LIB_LEDS
66 ---help---
67 This adds support for led triggers provided my mac80211.
68
69config RT2500PCI 64config RT2500PCI
70 tristate "Ralink rt2500 (PCI/PCMCIA) support" 65 tristate "Ralink rt2500 (PCI/PCMCIA) support"
71 depends on PCI 66 depends on PCI
@@ -77,14 +72,6 @@ config RT2500PCI
77 72
78 When compiled as a module, this driver will be called "rt2500pci.ko". 73 When compiled as a module, this driver will be called "rt2500pci.ko".
79 74
80config RT2500PCI_LEDS
81 bool "Ralink rt2500 leds support"
82 depends on RT2500PCI && NEW_LEDS
83 select LEDS_CLASS
84 select RT2X00_LIB_LEDS
85 ---help---
86 This adds support for led triggers provided my mac80211.
87
88config RT61PCI 75config RT61PCI
89 tristate "Ralink rt2501/rt61 (PCI/PCMCIA) support" 76 tristate "Ralink rt2501/rt61 (PCI/PCMCIA) support"
90 depends on PCI 77 depends on PCI
@@ -99,14 +86,6 @@ config RT61PCI
99 86
100 When compiled as a module, this driver will be called "rt61pci.ko". 87 When compiled as a module, this driver will be called "rt61pci.ko".
101 88
102config RT61PCI_LEDS
103 bool "Ralink rt2501/rt61 leds support"
104 depends on RT61PCI && NEW_LEDS
105 select LEDS_CLASS
106 select RT2X00_LIB_LEDS
107 ---help---
108 This adds support for led triggers provided my mac80211.
109
110config RT2500USB 89config RT2500USB
111 tristate "Ralink rt2500 (USB) support" 90 tristate "Ralink rt2500 (USB) support"
112 depends on USB 91 depends on USB
@@ -117,14 +96,6 @@ config RT2500USB
117 96
118 When compiled as a module, this driver will be called "rt2500usb.ko". 97 When compiled as a module, this driver will be called "rt2500usb.ko".
119 98
120config RT2500USB_LEDS
121 bool "Ralink rt2500 leds support"
122 depends on RT2500USB && NEW_LEDS
123 select LEDS_CLASS
124 select RT2X00_LIB_LEDS
125 ---help---
126 This adds support for led triggers provided my mac80211.
127
128config RT73USB 99config RT73USB
129 tristate "Ralink rt2501/rt73 (USB) support" 100 tristate "Ralink rt2501/rt73 (USB) support"
130 depends on USB 101 depends on USB
@@ -138,14 +109,6 @@ config RT73USB
138 109
139 When compiled as a module, this driver will be called "rt73usb.ko". 110 When compiled as a module, this driver will be called "rt73usb.ko".
140 111
141config RT73USB_LEDS
142 bool "Ralink rt2501/rt73 leds support"
143 depends on RT73USB && NEW_LEDS
144 select LEDS_CLASS
145 select RT2X00_LIB_LEDS
146 ---help---
147 This adds support for led triggers provided my mac80211.
148
149config RT2X00_LIB_DEBUGFS 112config RT2X00_LIB_DEBUGFS
150 bool "Ralink debugfs support" 113 bool "Ralink debugfs support"
151 depends on RT2X00_LIB && MAC80211_DEBUGFS 114 depends on RT2X00_LIB && MAC80211_DEBUGFS
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 0083e7e7dfcc..08cb9eec16a6 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -243,7 +243,7 @@ static int rt2400pci_rfkill_poll(struct rt2x00_dev *rt2x00dev)
243#define rt2400pci_rfkill_poll NULL 243#define rt2400pci_rfkill_poll NULL
244#endif /* CONFIG_RT2X00_LIB_RFKILL */ 244#endif /* CONFIG_RT2X00_LIB_RFKILL */
245 245
246#ifdef CONFIG_RT2400PCI_LEDS 246#ifdef CONFIG_RT2X00_LIB_LEDS
247static void rt2400pci_brightness_set(struct led_classdev *led_cdev, 247static void rt2400pci_brightness_set(struct led_classdev *led_cdev,
248 enum led_brightness brightness) 248 enum led_brightness brightness)
249{ 249{
@@ -288,7 +288,7 @@ static void rt2400pci_init_led(struct rt2x00_dev *rt2x00dev,
288 led->led_dev.blink_set = rt2400pci_blink_set; 288 led->led_dev.blink_set = rt2400pci_blink_set;
289 led->flags = LED_INITIALIZED; 289 led->flags = LED_INITIALIZED;
290} 290}
291#endif /* CONFIG_RT2400PCI_LEDS */ 291#endif /* CONFIG_RT2X00_LIB_LEDS */
292 292
293/* 293/*
294 * Configuration handlers. 294 * Configuration handlers.
@@ -1374,14 +1374,14 @@ static int rt2400pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
1374 /* 1374 /*
1375 * Store led mode, for correct led behaviour. 1375 * Store led mode, for correct led behaviour.
1376 */ 1376 */
1377#ifdef CONFIG_RT2400PCI_LEDS 1377#ifdef CONFIG_RT2X00_LIB_LEDS
1378 value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_LED_MODE); 1378 value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_LED_MODE);
1379 1379
1380 rt2400pci_init_led(rt2x00dev, &rt2x00dev->led_radio, LED_TYPE_RADIO); 1380 rt2400pci_init_led(rt2x00dev, &rt2x00dev->led_radio, LED_TYPE_RADIO);
1381 if (value == LED_MODE_TXRX_ACTIVITY) 1381 if (value == LED_MODE_TXRX_ACTIVITY)
1382 rt2400pci_init_led(rt2x00dev, &rt2x00dev->led_qual, 1382 rt2400pci_init_led(rt2x00dev, &rt2x00dev->led_qual,
1383 LED_TYPE_ACTIVITY); 1383 LED_TYPE_ACTIVITY);
1384#endif /* CONFIG_RT2400PCI_LEDS */ 1384#endif /* CONFIG_RT2X00_LIB_LEDS */
1385 1385
1386 /* 1386 /*
1387 * Detect if this device has an hardware controlled radio. 1387 * Detect if this device has an hardware controlled radio.
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index d8c9d67b8c84..ef42cc04a2d7 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -243,7 +243,7 @@ static int rt2500pci_rfkill_poll(struct rt2x00_dev *rt2x00dev)
243#define rt2500pci_rfkill_poll NULL 243#define rt2500pci_rfkill_poll NULL
244#endif /* CONFIG_RT2X00_LIB_RFKILL */ 244#endif /* CONFIG_RT2X00_LIB_RFKILL */
245 245
246#ifdef CONFIG_RT2500PCI_LEDS 246#ifdef CONFIG_RT2X00_LIB_LEDS
247static void rt2500pci_brightness_set(struct led_classdev *led_cdev, 247static void rt2500pci_brightness_set(struct led_classdev *led_cdev,
248 enum led_brightness brightness) 248 enum led_brightness brightness)
249{ 249{
@@ -288,7 +288,7 @@ static void rt2500pci_init_led(struct rt2x00_dev *rt2x00dev,
288 led->led_dev.blink_set = rt2500pci_blink_set; 288 led->led_dev.blink_set = rt2500pci_blink_set;
289 led->flags = LED_INITIALIZED; 289 led->flags = LED_INITIALIZED;
290} 290}
291#endif /* CONFIG_RT2500PCI_LEDS */ 291#endif /* CONFIG_RT2X00_LIB_LEDS */
292 292
293/* 293/*
294 * Configuration handlers. 294 * Configuration handlers.
@@ -1533,14 +1533,14 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
1533 /* 1533 /*
1534 * Store led mode, for correct led behaviour. 1534 * Store led mode, for correct led behaviour.
1535 */ 1535 */
1536#ifdef CONFIG_RT2500PCI_LEDS 1536#ifdef CONFIG_RT2X00_LIB_LEDS
1537 value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_LED_MODE); 1537 value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_LED_MODE);
1538 1538
1539 rt2500pci_init_led(rt2x00dev, &rt2x00dev->led_radio, LED_TYPE_RADIO); 1539 rt2500pci_init_led(rt2x00dev, &rt2x00dev->led_radio, LED_TYPE_RADIO);
1540 if (value == LED_MODE_TXRX_ACTIVITY) 1540 if (value == LED_MODE_TXRX_ACTIVITY)
1541 rt2500pci_init_led(rt2x00dev, &rt2x00dev->led_qual, 1541 rt2500pci_init_led(rt2x00dev, &rt2x00dev->led_qual,
1542 LED_TYPE_ACTIVITY); 1542 LED_TYPE_ACTIVITY);
1543#endif /* CONFIG_RT2500PCI_LEDS */ 1543#endif /* CONFIG_RT2X00_LIB_LEDS */
1544 1544
1545 /* 1545 /*
1546 * Detect if this device has an hardware controlled radio. 1546 * Detect if this device has an hardware controlled radio.
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 1cfda456b0ea..cb5f2d01a9c3 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -288,7 +288,7 @@ static const struct rt2x00debug rt2500usb_rt2x00debug = {
288}; 288};
289#endif /* CONFIG_RT2X00_LIB_DEBUGFS */ 289#endif /* CONFIG_RT2X00_LIB_DEBUGFS */
290 290
291#ifdef CONFIG_RT2500USB_LEDS 291#ifdef CONFIG_RT2X00_LIB_LEDS
292static void rt2500usb_brightness_set(struct led_classdev *led_cdev, 292static void rt2500usb_brightness_set(struct led_classdev *led_cdev,
293 enum led_brightness brightness) 293 enum led_brightness brightness)
294{ 294{
@@ -333,7 +333,7 @@ static void rt2500usb_init_led(struct rt2x00_dev *rt2x00dev,
333 led->led_dev.blink_set = rt2500usb_blink_set; 333 led->led_dev.blink_set = rt2500usb_blink_set;
334 led->flags = LED_INITIALIZED; 334 led->flags = LED_INITIALIZED;
335} 335}
336#endif /* CONFIG_RT2500USB_LEDS */ 336#endif /* CONFIG_RT2X00_LIB_LEDS */
337 337
338/* 338/*
339 * Configuration handlers. 339 * Configuration handlers.
@@ -1473,14 +1473,14 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
1473 /* 1473 /*
1474 * Store led mode, for correct led behaviour. 1474 * Store led mode, for correct led behaviour.
1475 */ 1475 */
1476#ifdef CONFIG_RT2500USB_LEDS 1476#ifdef CONFIG_RT2X00_LIB_LEDS
1477 value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_LED_MODE); 1477 value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_LED_MODE);
1478 1478
1479 rt2500usb_init_led(rt2x00dev, &rt2x00dev->led_radio, LED_TYPE_RADIO); 1479 rt2500usb_init_led(rt2x00dev, &rt2x00dev->led_radio, LED_TYPE_RADIO);
1480 if (value == LED_MODE_TXRX_ACTIVITY) 1480 if (value == LED_MODE_TXRX_ACTIVITY)
1481 rt2500usb_init_led(rt2x00dev, &rt2x00dev->led_qual, 1481 rt2500usb_init_led(rt2x00dev, &rt2x00dev->led_qual,
1482 LED_TYPE_ACTIVITY); 1482 LED_TYPE_ACTIVITY);
1483#endif /* CONFIG_RT2500USB_LEDS */ 1483#endif /* CONFIG_RT2X00_LIB_LEDS */
1484 1484
1485 /* 1485 /*
1486 * Check if the BBP tuning should be disabled. 1486 * Check if the BBP tuning should be disabled.
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index a5c93520c372..2c36b91ff4c7 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -163,7 +163,7 @@ rf_write:
163 rt2x00_rf_write(rt2x00dev, word, value); 163 rt2x00_rf_write(rt2x00dev, word, value);
164} 164}
165 165
166#ifdef CONFIG_RT61PCI_LEDS 166#ifdef CONFIG_RT2X00_LIB_LEDS
167/* 167/*
168 * This function is only called from rt61pci_led_brightness() 168 * This function is only called from rt61pci_led_brightness()
169 * make gcc happy by placing this function inside the 169 * make gcc happy by placing this function inside the
@@ -195,7 +195,7 @@ static void rt61pci_mcu_request(struct rt2x00_dev *rt2x00dev,
195 rt2x00_set_field32(&reg, HOST_CMD_CSR_INTERRUPT_MCU, 1); 195 rt2x00_set_field32(&reg, HOST_CMD_CSR_INTERRUPT_MCU, 1);
196 rt2x00pci_register_write(rt2x00dev, HOST_CMD_CSR, reg); 196 rt2x00pci_register_write(rt2x00dev, HOST_CMD_CSR, reg);
197} 197}
198#endif /* CONFIG_RT61PCI_LEDS */ 198#endif /* CONFIG_RT2X00_LIB_LEDS */
199 199
200static void rt61pci_eepromregister_read(struct eeprom_93cx6 *eeprom) 200static void rt61pci_eepromregister_read(struct eeprom_93cx6 *eeprom)
201{ 201{
@@ -283,7 +283,7 @@ static int rt61pci_rfkill_poll(struct rt2x00_dev *rt2x00dev)
283#define rt61pci_rfkill_poll NULL 283#define rt61pci_rfkill_poll NULL
284#endif /* CONFIG_RT2X00_LIB_RFKILL */ 284#endif /* CONFIG_RT2X00_LIB_RFKILL */
285 285
286#ifdef CONFIG_RT61PCI_LEDS 286#ifdef CONFIG_RT2X00_LIB_LEDS
287static void rt61pci_brightness_set(struct led_classdev *led_cdev, 287static void rt61pci_brightness_set(struct led_classdev *led_cdev,
288 enum led_brightness brightness) 288 enum led_brightness brightness)
289{ 289{
@@ -348,7 +348,7 @@ static void rt61pci_init_led(struct rt2x00_dev *rt2x00dev,
348 led->led_dev.blink_set = rt61pci_blink_set; 348 led->led_dev.blink_set = rt61pci_blink_set;
349 led->flags = LED_INITIALIZED; 349 led->flags = LED_INITIALIZED;
350} 350}
351#endif /* CONFIG_RT61PCI_LEDS */ 351#endif /* CONFIG_RT2X00_LIB_LEDS */
352 352
353/* 353/*
354 * Configuration handlers. 354 * Configuration handlers.
@@ -2374,7 +2374,7 @@ static int rt61pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
2374 * If the eeprom value is invalid, 2374 * If the eeprom value is invalid,
2375 * switch to default led mode. 2375 * switch to default led mode.
2376 */ 2376 */
2377#ifdef CONFIG_RT61PCI_LEDS 2377#ifdef CONFIG_RT2X00_LIB_LEDS
2378 rt2x00_eeprom_read(rt2x00dev, EEPROM_LED, &eeprom); 2378 rt2x00_eeprom_read(rt2x00dev, EEPROM_LED, &eeprom);
2379 value = rt2x00_get_field16(eeprom, EEPROM_LED_LED_MODE); 2379 value = rt2x00_get_field16(eeprom, EEPROM_LED_LED_MODE);
2380 2380
@@ -2408,7 +2408,7 @@ static int rt61pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
2408 rt2x00_set_field16(&rt2x00dev->led_mcu_reg, MCU_LEDCS_POLARITY_READY_A, 2408 rt2x00_set_field16(&rt2x00dev->led_mcu_reg, MCU_LEDCS_POLARITY_READY_A,
2409 rt2x00_get_field16(eeprom, 2409 rt2x00_get_field16(eeprom,
2410 EEPROM_LED_POLARITY_RDY_A)); 2410 EEPROM_LED_POLARITY_RDY_A));
2411#endif /* CONFIG_RT61PCI_LEDS */ 2411#endif /* CONFIG_RT2X00_LIB_LEDS */
2412 2412
2413 return 0; 2413 return 0;
2414} 2414}
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index d9ef34c6670c..27dde3e34603 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -292,7 +292,7 @@ static const struct rt2x00debug rt73usb_rt2x00debug = {
292}; 292};
293#endif /* CONFIG_RT2X00_LIB_DEBUGFS */ 293#endif /* CONFIG_RT2X00_LIB_DEBUGFS */
294 294
295#ifdef CONFIG_RT73USB_LEDS 295#ifdef CONFIG_RT2X00_LIB_LEDS
296static void rt73usb_brightness_set(struct led_classdev *led_cdev, 296static void rt73usb_brightness_set(struct led_classdev *led_cdev,
297 enum led_brightness brightness) 297 enum led_brightness brightness)
298{ 298{
@@ -359,7 +359,7 @@ static void rt73usb_init_led(struct rt2x00_dev *rt2x00dev,
359 led->led_dev.blink_set = rt73usb_blink_set; 359 led->led_dev.blink_set = rt73usb_blink_set;
360 led->flags = LED_INITIALIZED; 360 led->flags = LED_INITIALIZED;
361} 361}
362#endif /* CONFIG_RT73USB_LEDS */ 362#endif /* CONFIG_RT2X00_LIB_LEDS */
363 363
364/* 364/*
365 * Configuration handlers. 365 * Configuration handlers.
@@ -1932,7 +1932,7 @@ static int rt73usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
1932 /* 1932 /*
1933 * Store led settings, for correct led behaviour. 1933 * Store led settings, for correct led behaviour.
1934 */ 1934 */
1935#ifdef CONFIG_RT73USB_LEDS 1935#ifdef CONFIG_RT2X00_LIB_LEDS
1936 rt2x00_eeprom_read(rt2x00dev, EEPROM_LED, &eeprom); 1936 rt2x00_eeprom_read(rt2x00dev, EEPROM_LED, &eeprom);
1937 1937
1938 rt73usb_init_led(rt2x00dev, &rt2x00dev->led_radio, LED_TYPE_RADIO); 1938 rt73usb_init_led(rt2x00dev, &rt2x00dev->led_radio, LED_TYPE_RADIO);
@@ -1965,7 +1965,7 @@ static int rt73usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
1965 rt2x00_set_field16(&rt2x00dev->led_mcu_reg, MCU_LEDCS_POLARITY_READY_A, 1965 rt2x00_set_field16(&rt2x00dev->led_mcu_reg, MCU_LEDCS_POLARITY_READY_A,
1966 rt2x00_get_field16(eeprom, 1966 rt2x00_get_field16(eeprom,
1967 EEPROM_LED_POLARITY_RDY_A)); 1967 EEPROM_LED_POLARITY_RDY_A));
1968#endif /* CONFIG_RT73USB_LEDS */ 1968#endif /* CONFIG_RT2X00_LIB_LEDS */
1969 1969
1970 return 0; 1970 return 0;
1971} 1971}