aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/800-nuke_led_code.patch
blob: b55a0501eb52bc6dc00476a8fb3edd04a64c25e7 (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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
--- a/config.mk
+++ b/config.mk
@@ -115,7 +115,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
@@ -194,7 +194,7 @@ CONFIG_B43_PCI_AUTOSELECT=y
 ifneq ($(CONFIG_PCMCIA),)
 # CONFIG_B43_PCMCIA=y
 endif
-CONFIG_B43_LEDS=y
+# CONFIG_B43_LEDS=y
 CONFIG_B43_PHY_LP=y
 # CONFIG_B43_NPHY is not set
 # CONFIG_B43_FORCE_PIO=y
@@ -203,7 +203,7 @@ CONFIG_B43_PHY_LP=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
@@ -336,13 +336,13 @@ endif
 
 CONFIG_P54_USB=m
 CONFIG_RTL8187=m
-CONFIG_RTL8187_LEDS=y
+# CONFIG_RTL8187_LEDS=y
 
 CONFIG_AT76C50X_USB=m
 
 ifndef CONFIG_COMPAT_KERNEL_28
 CONFIG_AR9170_USB=m
-CONFIG_AR9170_LEDS=y
+# CONFIG_AR9170_LEDS=y
 endif
 
 CONFIG_ATH9K_HTC=m
@@ -426,7 +426,7 @@ CONFIG_RT2800_LIB=m
 CONFIG_RT2X00_LIB_HT=y
 CONFIG_RT2X00_LIB_FIRMWARE=y
 CONFIG_RT2X00_LIB_CRYPTO=y
-CONFIG_RT2X00_LIB_LEDS=y
+# CONFIG_RT2X00_LIB_LEDS=y
 # CONFIG_RT2X00_DEBUG=y
 # CONFIG_RT2X00_LIB_DEBUGFS
 endif
@@ -437,7 +437,7 @@ endif
 
 # p54
 CONFIG_P54_COMMON=m
-CONFIG_P54_LEDS=y
+# CONFIG_P54_LEDS=y
 
 # Atheros
 CONFIG_ATH_COMMON=m
--- a/include/linux/compat-2.6.25.h
+++ b/include/linux/compat-2.6.25.h
@@ -146,10 +146,12 @@ static inline void __hwrng_unregister(st
 	hwrng_unregister(rng);
 }
 
+#ifdef CONFIG_MAC80211_LEDS
 static inline void led_classdev_unregister_suspended(struct led_classdev *lcd)
 {
 	led_classdev_unregister(lcd);
 }
+#endif
 
 /**
  * The following things are out of ./include/linux/kernel.h
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -20,6 +20,7 @@
 /*	 LED functions		*/
 /********************************/
 
+#ifdef CONFIG_MAC80211_LEDS
 static void ath_led_blink_work(struct work_struct *work)
 {
 	struct ath_softc *sc = container_of(work, struct ath_softc,
@@ -194,6 +195,7 @@ fail:
 		cancel_delayed_work_sync(&sc->ath_led_blink_work);
 	ath_deinit_leds(sc);
 }
+#endif
 
 /*******************/
 /*	Rfkill	   */
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -273,7 +273,9 @@ static int ath_pci_suspend(struct pci_de
 	struct ath_wiphy *aphy = hw->priv;
 	struct ath_softc *sc = aphy->sc;
 
+#ifdef CONFIG_MAC80211_LEDS
 	ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1);
+#endif
 
 	pci_save_state(pdev);
 	pci_disable_device(pdev);
@@ -305,10 +307,12 @@ static int ath_pci_resume(struct pci_dev
 	if ((val & 0x0000ff00) != 0)
 		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
 
+#ifdef CONFIG_MAC80211_LEDS
 	/* Enable LED */
 	ath9k_hw_cfg_output(sc->sc_ah, sc->sc_ah->led_pin,
 			    AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
 	ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1);
+#endif
 
 	return 0;
 }
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -465,6 +465,7 @@ void ath9k_btcoex_timer_pause(struct ath
 /********************/
 /*   LED Control    */
 /********************/
+#ifdef CONFIG_MAC80211_LEDS
 
 #define ATH_LED_PIN_DEF 		1
 #define ATH_LED_PIN_9287		8
@@ -489,6 +490,7 @@ struct ath_led {
 
 void ath_init_leds(struct ath_softc *sc);
 void ath_deinit_leds(struct ath_softc *sc);
+#endif
 
 /********************/
 /* Main driver core */
@@ -586,6 +588,7 @@ struct ath_softc {
 	enum wireless_mode cur_rate_mode;
 	struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
 
+#ifdef CONFIG_MAC80211_LEDS
 	struct ath_led radio_led;
 	struct ath_led assoc_led;
 	struct ath_led tx_led;
@@ -595,6 +598,7 @@ struct ath_softc {
 	int led_off_duration;
 	int led_on_cnt;
 	int led_off_cnt;
+#endif
 
 	int beacon_interval;

--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -34,9 +34,11 @@ int modparam_nohwcrypt;
 module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
 MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
 
+#ifdef CONFIG_MAC80211_LEDS
 int led_blink = 1;
 module_param_named(blink, led_blink, int, 0444);
 MODULE_PARM_DESC(blink, "Enable LED blink on activity");
+#endif
 
 /* We use the hw_value as an index into our private channel structure */
 
@@ -757,7 +759,9 @@ int ath9k_init_device(u16 devid, struct
 	INIT_DELAYED_WORK(&sc->wiphy_work, ath9k_wiphy_work);
 	sc->wiphy_scheduler_int = msecs_to_jiffies(500);
 
+#ifdef CONFIG_MAC80211_LEDS
 	ath_init_leds(sc);
+#endif
 	ath_start_rfkill_poll(sc);
 
 	return 0;
@@ -810,7 +814,9 @@ void ath9k_deinit_device(struct ath_soft
 	ath9k_ps_wakeup(sc);
 
 	wiphy_rfkill_stop_polling(sc->hw->wiphy);
+#ifdef CONFIG_MAC80211_LEDS
 	ath_deinit_leds(sc);
+#endif
 
 	for (i = 0; i < sc->num_sec_wiphy; i++) {
 		struct ath_wiphy *aphy = sc->sec_wiphy[i];
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -868,9 +868,11 @@ void ath_radio_enable(struct ath_softc *
 	ath9k_hw_set_interrupts(ah, ah->imask);
 
 	/* Enable LED */
+#ifdef CONFIG_MAC80211_LEDS
 	ath9k_hw_cfg_output(ah, ah->led_pin,
 			    AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
 	ath9k_hw_set_gpio(ah, ah->led_pin, 0);
+#endif
 
 	ieee80211_wake_queues(hw);
 	ath9k_ps_restore(sc);
@@ -889,10 +891,12 @@ void ath_radio_disable(struct ath_softc
 	 * Keep the LED on when the radio is disabled
 	 * during idle unassociated state.
 	 */
+#ifdef CONFIG_MAC80211_LEDS
 	if (!sc->ps_idle) {
 		ath9k_hw_set_gpio(ah, ah->led_pin, 1);
 		ath9k_hw_cfg_gpio_input(ah, ah->led_pin);
 	}
+#endif
 
 	/* Disable interrupts */
 	ath9k_hw_set_interrupts(ah, 0);
@@ -1303,8 +1307,10 @@ static void ath9k_stop(struct ieee80211_
 
 	aphy->state = ATH_WIPHY_INACTIVE;
 
+#ifdef CONFIG_MAC80211_LEDS
 	if (led_blink)
 		cancel_delayed_work_sync(&sc->ath_led_blink_work);
+#endif
 
 	cancel_delayed_work_sync(&sc->tx_complete_work);
 	cancel_work_sync(&sc->paprd_work);
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -21,7 +21,9 @@
 #include "sta_info.h"
 #include "debugfs_netdev.h"
 #include "mesh.h"
+#ifdef CONFIG_MAC80211_LEDS
 #include "led.h"
+#endif
 #include "driver-ops.h"
 #include "wme.h"
 
@@ -189,7 +191,9 @@ static int ieee80211_open(struct net_dev
 			goto err_del_bss;
 		/* we're brought up, everything changes */
 		hw_reconf_flags = ~0;
+#ifdef CONFIG_MAC80211_LEDS
 		ieee80211_led_radio(local, true);
+#endif
 	}
 
 	/*
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -29,7 +29,9 @@
 #include "rate.h"
 #include "mesh.h"
 #include "wep.h"
+#ifdef CONFIG_MAC80211_LEDS
 #include "led.h"
+#endif
 #include "cfg.h"
 #include "debugfs.h"
 
@@ -674,7 +676,9 @@ int ieee80211_register_hw(struct ieee802
 
 	rtnl_unlock();
 
+#ifdef CONFIG_MAC80211_LEDS
 	ieee80211_led_init(local);
+#endif
 
 	local->network_latency_notifier.notifier_call =
 		ieee80211_max_network_latency;
@@ -699,7 +703,9 @@ int ieee80211_register_hw(struct ieee802
 			       &local->network_latency_notifier);
 	rtnl_lock();
  fail_pm_qos:
+#ifdef CONFIG_MAC80211_LEDS
 	ieee80211_led_exit(local);
+#endif
 	ieee80211_remove_interfaces(local);
  fail_rate:
 	rtnl_unlock();
@@ -755,7 +761,9 @@ void ieee80211_unregister_hw(struct ieee
 	destroy_workqueue(local->workqueue);
 	wiphy_unregister(local->hw.wiphy);
 	ieee80211_wep_free(local);
+#ifdef CONFIG_MAC80211_LEDS
 	ieee80211_led_exit(local);
+#endif
 	kfree(local->int_scan_req);
 }
 EXPORT_SYMBOL(ieee80211_unregister_hw);
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -26,7 +26,9 @@
 #include "ieee80211_i.h"
 #include "driver-ops.h"
 #include "rate.h"
+#ifdef CONFIG_MAC80211_LEDS
 #include "led.h"
+#endif
 
 #define IEEE80211_MAX_PROBE_TRIES 5
 
@@ -872,7 +874,9 @@ static void ieee80211_set_associated(str
 	 */
 	sdata->u.mgd.wmm_last_param_set = -1;
 
+#ifdef CONFIG_MAC80211_LEDS
 	ieee80211_led_assoc(local, 1);
+#endif
 
 	if (local->hw.flags & IEEE80211_HW_NEED_DTIM_PERIOD)
 		bss_conf->dtim_period = bss->dtim_period;
@@ -958,7 +962,9 @@ static void ieee80211_set_disassoc(struc
 
 	changed |= ieee80211_reset_erp_info(sdata);
 
+#ifdef CONFIG_MAC80211_LEDS
 	ieee80211_led_assoc(local, 0);
+#endif
 	changed |= BSS_CHANGED_ASSOC;
 	sdata->vif.bss_conf.assoc = false;
 
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -4,7 +4,9 @@
 #include "ieee80211_i.h"
 #include "mesh.h"
 #include "driver-ops.h"
+#ifdef CONFIG_MAC80211_LEDS
 #include "led.h"
+#endif
 
 int __ieee80211_suspend(struct ieee80211_hw *hw)
 {
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -21,7 +21,9 @@
 
 #include "ieee80211_i.h"
 #include "driver-ops.h"
+#ifdef CONFIG_MAC80211_LEDS
 #include "led.h"
+#endif
 #include "mesh.h"
 #include "wep.h"
 #include "wpa.h"
@@ -1343,7 +1345,9 @@ ieee80211_rx_h_defragment(struct ieee802
 	if (is_multicast_ether_addr(hdr->addr1))
 		rx->local->dot11MulticastReceivedFrameCount++;
 	else
+#ifdef CONFIG_MAC80211_LEDS
 		ieee80211_led_rx(rx->local);
+#endif
 	return RX_CONTINUE;
 }
 
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -13,7 +13,9 @@
 #include "ieee80211_i.h"
 #include "rate.h"
 #include "mesh.h"
+#ifdef CONFIG_MAC80211_LEDS
 #include "led.h"
+#endif
 
 
 void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
@@ -247,7 +249,9 @@ void ieee80211_tx_status(struct ieee8021
 
 	rcu_read_unlock();
 
+#ifdef CONFIG_MAC80211_LEDS
 	ieee80211_led_tx(local, 0);
+#endif
 
 	/* SNMP counters
 	 * Fragments are passed to low-level drivers as separate skbs, so these
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -26,7 +26,9 @@
 
 #include "ieee80211_i.h"
 #include "driver-ops.h"
+#ifdef CONFIG_MAC80211_LEDS
 #include "led.h"
+#endif
 #include "mesh.h"
 #include "wep.h"
 #include "wpa.h"
@@ -1312,7 +1314,9 @@ static int __ieee80211_tx(struct ieee802
 		}
 
 		*skbp = skb = next;
+#ifdef CONFIG_MAC80211_LEDS
 		ieee80211_led_tx(local, 1);
+#endif
 		fragm = true;
 	}
 
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -29,7 +29,9 @@
 #include "rate.h"
 #include "mesh.h"
 #include "wme.h"
+#ifdef CONFIG_MAC80211_LEDS
 #include "led.h"
+#endif
 #include "wep.h"
 
 /* privid for wiphys to determine whether they belong to us or not */
@@ -1107,7 +1109,9 @@ u32 ieee80211_sta_get_rates(struct ieee8
 
 void ieee80211_stop_device(struct ieee80211_local *local)
 {
+#ifdef CONFIG_MAC80211_LEDS
 	ieee80211_led_radio(local, false);
+#endif
 
 	cancel_work_sync(&local->reconfig_filter);
 
@@ -1141,7 +1145,9 @@ int ieee80211_reconfig(struct ieee80211_
 			return res;
 		}
 
+#ifdef CONFIG_MAC80211_LEDS
 		ieee80211_led_radio(local, true);
+#endif
 	}
 
 	/* add interfaces */