summaryrefslogtreecommitdiff
path: root/package/mac80211/patches/008-led_default.patch
blob: cdfe19b60acac8915acb2644268894934d4ac871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
--- a/config.mk
+++ b/config.mk
@@ -132,7 +132,7 @@ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstr
 CONFIG_MAC80211_RC_PID=y
 CONFIG_MAC80211_RC_MINSTREL=y
 CONFIG_MAC80211_RC_MINSTREL_HT=y
-CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_LEDS=y
 
 # enable mesh networking too
 CONFIG_MAC80211_MESH=y
@@ -240,7 +240,7 @@ CONFIG_B43_PCI_AUTOSELECT=y
 ifdef CONFIG_PCMCIA
 CONFIG_B43_PCMCIA=y
 endif #CONFIG_PCMCIA
-CONFIG_B43_LEDS=y
+# CONFIG_B43_LEDS=y
 CONFIG_B43_PHY_LP=y
 CONFIG_B43_NPHY=y
 # CONFIG_B43_FORCE_PIO=y
@@ -249,7 +249,7 @@ CONFIG_B43_NPHY=y
 CONFIG_B43LEGACY=m
 CONFIG_B43LEGACY_HWRNG=y
 CONFIG_B43LEGACY_PCI_AUTOSELECT=y
-CONFIG_B43LEGACY_LEDS=y
+# CONFIG_B43LEGACY_LEDS=y
 # CONFIG_B43LEGACY_DEBUG=y
 CONFIG_B43LEGACY_DMA=y
 CONFIG_B43LEGACY_PIO=y
@@ -544,7 +544,7 @@ endif
 
 # p54
 CONFIG_P54_COMMON=m
-CONFIG_P54_LEDS=y
+# CONFIG_P54_LEDS=y
 
 # Atheros
 CONFIG_ATH_COMMON=m
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -54,6 +54,7 @@ static void ath_led_blink_work(struct wo
 		sc->sc_flags |= SC_OP_LED_ON;
 }
 
+#ifdef CONFIG_LEDS_CLASS
 static void ath_led_brightness(struct led_classdev *led_cdev,
 			       enum led_brightness brightness)
 {
@@ -90,10 +91,12 @@ static void ath_led_brightness(struct le
 		break;
 	}
 }
+#endif
 
 static int ath_register_led(struct ath_softc *sc, struct ath_led *led,
 			    char *trigger)
 {
+#ifdef CONFIG_LEDS_CLASS
 	int ret;
 
 	led->sc = sc;
@@ -108,14 +111,19 @@ static int ath_register_led(struct ath_s
 	else
 		led->registered = 1;
 	return ret;
+#else
+	return 0;
+#endif
 }
 
 static void ath_unregister_led(struct ath_led *led)
 {
+#ifdef CONFIG_LEDS_CLASS
 	if (led->registered) {
 		led_classdev_unregister(&led->led_cdev);
 		led->registered = 0;
 	}
+#endif
 }
 
 void ath_deinit_leds(struct ath_softc *sc)
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -822,6 +822,7 @@ static void ath9k_led_brightness_work(st
 	}
 }
 
+#ifdef CONFIG_LEDS_CLASS
 static void ath9k_led_brightness(struct led_classdev *led_cdev,
 				 enum led_brightness brightness)
 {
@@ -833,6 +834,7 @@ static void ath9k_led_brightness(struct 
 		ieee80211_queue_delayed_work(priv->hw,
 					     &led->brightness_work, 0);
 }
+#endif
 
 static void ath9k_led_stop_brightness(struct ath9k_htc_priv *priv)
 {
@@ -845,6 +847,7 @@ static void ath9k_led_stop_brightness(st
 static int ath9k_register_led(struct ath9k_htc_priv *priv, struct ath_led *led,
 			      char *trigger)
 {
+#ifdef CONFIG_LEDS_CLASS
 	int ret;
 
 	led->priv = priv;
@@ -862,14 +865,19 @@ static int ath9k_register_led(struct ath
 	INIT_DELAYED_WORK(&led->brightness_work, ath9k_led_brightness_work);
 
 	return ret;
+#else
+	return 0;
+#endif
 }
 
 static void ath9k_unregister_led(struct ath_led *led)
 {
+#ifdef CONFIG_LEDS_CLASS
 	if (led->registered) {
 		led_classdev_unregister(&led->led_cdev);
 		led->registered = 0;
 	}
+#endif
 }
 
 void ath9k_deinit_leds(struct ath9k_htc_priv *priv)