3 @@ -115,7 +115,7 @@ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstr
4 # CONFIG_MAC80211_RC_PID=y
5 CONFIG_MAC80211_RC_MINSTREL=y
6 CONFIG_MAC80211_RC_MINSTREL_HT=y
7 -CONFIG_MAC80211_LEDS=y
8 +# CONFIG_MAC80211_LEDS=y
10 # enable mesh networking too
11 CONFIG_MAC80211_MESH=y
12 @@ -194,7 +194,7 @@ CONFIG_B43_PCI_AUTOSELECT=y
13 ifneq ($(CONFIG_PCMCIA),)
19 # CONFIG_B43_NPHY is not set
20 # CONFIG_B43_FORCE_PIO=y
21 @@ -203,7 +203,7 @@ CONFIG_B43_PHY_LP=y
23 CONFIG_B43LEGACY_HWRNG=y
24 CONFIG_B43LEGACY_PCI_AUTOSELECT=y
25 -CONFIG_B43LEGACY_LEDS=y
26 +# CONFIG_B43LEGACY_LEDS=y
27 # CONFIG_B43LEGACY_DEBUG=y
28 CONFIG_B43LEGACY_DMA=y
29 CONFIG_B43LEGACY_PIO=y
30 @@ -336,13 +336,13 @@ endif
34 -CONFIG_RTL8187_LEDS=y
35 +# CONFIG_RTL8187_LEDS=y
39 ifndef CONFIG_COMPAT_KERNEL_28
42 +# CONFIG_AR9170_LEDS=y
46 @@ -426,7 +426,7 @@ CONFIG_RT2800_LIB=m
47 CONFIG_RT2X00_LIB_HT=y
48 CONFIG_RT2X00_LIB_FIRMWARE=y
49 CONFIG_RT2X00_LIB_CRYPTO=y
50 -CONFIG_RT2X00_LIB_LEDS=y
51 +# CONFIG_RT2X00_LIB_LEDS=y
52 # CONFIG_RT2X00_DEBUG=y
53 # CONFIG_RT2X00_LIB_DEBUGFS
55 @@ -437,7 +437,7 @@ endif
64 --- a/include/linux/compat-2.6.25.h
65 +++ b/include/linux/compat-2.6.25.h
66 @@ -146,10 +146,12 @@ static inline void __hwrng_unregister(st
67 hwrng_unregister(rng);
70 +#ifdef CONFIG_MAC80211_LEDS
71 static inline void led_classdev_unregister_suspended(struct led_classdev *lcd)
73 led_classdev_unregister(lcd);
78 * The following things are out of ./include/linux/kernel.h
79 --- a/drivers/net/wireless/ath/ath9k/gpio.c
80 +++ b/drivers/net/wireless/ath/ath9k/gpio.c
83 /********************************/
85 +#ifdef CONFIG_MAC80211_LEDS
86 static void ath_led_blink_work(struct work_struct *work)
88 struct ath_softc *sc = container_of(work, struct ath_softc,
89 @@ -194,6 +195,7 @@ fail:
90 cancel_delayed_work_sync(&sc->ath_led_blink_work);
97 --- a/drivers/net/wireless/ath/ath9k/pci.c
98 +++ b/drivers/net/wireless/ath/ath9k/pci.c
99 @@ -273,7 +273,9 @@ static int ath_pci_suspend(struct pci_de
100 struct ath_wiphy *aphy = hw->priv;
101 struct ath_softc *sc = aphy->sc;
103 +#ifdef CONFIG_MAC80211_LEDS
104 ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1);
107 pci_save_state(pdev);
108 pci_disable_device(pdev);
109 @@ -305,10 +307,12 @@ static int ath_pci_resume(struct pci_dev
110 if ((val & 0x0000ff00) != 0)
111 pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
113 +#ifdef CONFIG_MAC80211_LEDS
115 ath9k_hw_cfg_output(sc->sc_ah, sc->sc_ah->led_pin,
116 AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
117 ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1);
122 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
123 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
124 @@ -465,6 +465,7 @@ void ath9k_btcoex_timer_pause(struct ath
125 /********************/
127 /********************/
128 +#ifdef CONFIG_MAC80211_LEDS
130 #define ATH_LED_PIN_DEF 1
131 #define ATH_LED_PIN_9287 8
132 @@ -489,6 +490,7 @@ struct ath_led {
134 void ath_init_leds(struct ath_softc *sc);
135 void ath_deinit_leds(struct ath_softc *sc);
138 /********************/
139 /* Main driver core */
140 @@ -586,6 +588,7 @@ struct ath_softc {
141 enum wireless_mode cur_rate_mode;
142 struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
144 +#ifdef CONFIG_MAC80211_LEDS
145 struct ath_led radio_led;
146 struct ath_led assoc_led;
147 struct ath_led tx_led;
148 @@ -595,6 +598,7 @@ struct ath_softc {
149 int led_off_duration;
156 --- a/drivers/net/wireless/ath/ath9k/init.c
157 +++ b/drivers/net/wireless/ath/ath9k/init.c
158 @@ -34,9 +34,11 @@ int modparam_nohwcrypt;
159 module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
160 MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
162 +#ifdef CONFIG_MAC80211_LEDS
164 module_param_named(blink, led_blink, int, 0444);
165 MODULE_PARM_DESC(blink, "Enable LED blink on activity");
168 /* We use the hw_value as an index into our private channel structure */
170 @@ -757,7 +759,9 @@ int ath9k_init_device(u16 devid, struct
171 INIT_DELAYED_WORK(&sc->wiphy_work, ath9k_wiphy_work);
172 sc->wiphy_scheduler_int = msecs_to_jiffies(500);
174 +#ifdef CONFIG_MAC80211_LEDS
177 ath_start_rfkill_poll(sc);
180 @@ -810,7 +814,9 @@ void ath9k_deinit_device(struct ath_soft
183 wiphy_rfkill_stop_polling(sc->hw->wiphy);
184 +#ifdef CONFIG_MAC80211_LEDS
188 for (i = 0; i < sc->num_sec_wiphy; i++) {
189 struct ath_wiphy *aphy = sc->sec_wiphy[i];
190 --- a/drivers/net/wireless/ath/ath9k/main.c
191 +++ b/drivers/net/wireless/ath/ath9k/main.c
192 @@ -868,9 +868,11 @@ void ath_radio_enable(struct ath_softc *
193 ath9k_hw_set_interrupts(ah, ah->imask);
196 +#ifdef CONFIG_MAC80211_LEDS
197 ath9k_hw_cfg_output(ah, ah->led_pin,
198 AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
199 ath9k_hw_set_gpio(ah, ah->led_pin, 0);
202 ieee80211_wake_queues(hw);
203 ath9k_ps_restore(sc);
204 @@ -889,10 +891,12 @@ void ath_radio_disable(struct ath_softc
205 * Keep the LED on when the radio is disabled
206 * during idle unassociated state.
208 +#ifdef CONFIG_MAC80211_LEDS
210 ath9k_hw_set_gpio(ah, ah->led_pin, 1);
211 ath9k_hw_cfg_gpio_input(ah, ah->led_pin);
215 /* Disable interrupts */
216 ath9k_hw_set_interrupts(ah, 0);
217 @@ -1303,8 +1307,10 @@ static void ath9k_stop(struct ieee80211_
219 aphy->state = ATH_WIPHY_INACTIVE;
221 +#ifdef CONFIG_MAC80211_LEDS
223 cancel_delayed_work_sync(&sc->ath_led_blink_work);
226 cancel_delayed_work_sync(&sc->tx_complete_work);
227 cancel_work_sync(&sc->paprd_work);
228 --- a/net/mac80211/iface.c
229 +++ b/net/mac80211/iface.c
231 #include "sta_info.h"
232 #include "debugfs_netdev.h"
234 +#ifdef CONFIG_MAC80211_LEDS
237 #include "driver-ops.h"
240 @@ -189,7 +191,9 @@ static int ieee80211_open(struct net_dev
242 /* we're brought up, everything changes */
243 hw_reconf_flags = ~0;
244 +#ifdef CONFIG_MAC80211_LEDS
245 ieee80211_led_radio(local, true);
250 --- a/net/mac80211/main.c
251 +++ b/net/mac80211/main.c
256 +#ifdef CONFIG_MAC80211_LEDS
262 @@ -674,7 +676,9 @@ int ieee80211_register_hw(struct ieee802
266 +#ifdef CONFIG_MAC80211_LEDS
267 ieee80211_led_init(local);
270 local->network_latency_notifier.notifier_call =
271 ieee80211_max_network_latency;
272 @@ -699,7 +703,9 @@ int ieee80211_register_hw(struct ieee802
273 &local->network_latency_notifier);
276 +#ifdef CONFIG_MAC80211_LEDS
277 ieee80211_led_exit(local);
279 ieee80211_remove_interfaces(local);
282 @@ -755,7 +761,9 @@ void ieee80211_unregister_hw(struct ieee
283 destroy_workqueue(local->workqueue);
284 wiphy_unregister(local->hw.wiphy);
285 ieee80211_wep_free(local);
286 +#ifdef CONFIG_MAC80211_LEDS
287 ieee80211_led_exit(local);
289 kfree(local->int_scan_req);
291 EXPORT_SYMBOL(ieee80211_unregister_hw);
292 --- a/net/mac80211/mlme.c
293 +++ b/net/mac80211/mlme.c
295 #include "ieee80211_i.h"
296 #include "driver-ops.h"
298 +#ifdef CONFIG_MAC80211_LEDS
302 #define IEEE80211_MAX_PROBE_TRIES 5
304 @@ -872,7 +874,9 @@ static void ieee80211_set_associated(str
306 sdata->u.mgd.wmm_last_param_set = -1;
308 +#ifdef CONFIG_MAC80211_LEDS
309 ieee80211_led_assoc(local, 1);
312 if (local->hw.flags & IEEE80211_HW_NEED_DTIM_PERIOD)
313 bss_conf->dtim_period = bss->dtim_period;
314 @@ -958,7 +962,9 @@ static void ieee80211_set_disassoc(struc
316 changed |= ieee80211_reset_erp_info(sdata);
318 +#ifdef CONFIG_MAC80211_LEDS
319 ieee80211_led_assoc(local, 0);
321 changed |= BSS_CHANGED_ASSOC;
322 sdata->vif.bss_conf.assoc = false;
324 --- a/net/mac80211/pm.c
325 +++ b/net/mac80211/pm.c
327 #include "ieee80211_i.h"
329 #include "driver-ops.h"
330 +#ifdef CONFIG_MAC80211_LEDS
334 int __ieee80211_suspend(struct ieee80211_hw *hw)
336 --- a/net/mac80211/rx.c
337 +++ b/net/mac80211/rx.c
340 #include "ieee80211_i.h"
341 #include "driver-ops.h"
342 +#ifdef CONFIG_MAC80211_LEDS
348 @@ -1343,7 +1345,9 @@ ieee80211_rx_h_defragment(struct ieee802
349 if (is_multicast_ether_addr(hdr->addr1))
350 rx->local->dot11MulticastReceivedFrameCount++;
352 +#ifdef CONFIG_MAC80211_LEDS
353 ieee80211_led_rx(rx->local);
358 --- a/net/mac80211/status.c
359 +++ b/net/mac80211/status.c
361 #include "ieee80211_i.h"
364 +#ifdef CONFIG_MAC80211_LEDS
369 void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
370 @@ -247,7 +249,9 @@ void ieee80211_tx_status(struct ieee8021
374 +#ifdef CONFIG_MAC80211_LEDS
375 ieee80211_led_tx(local, 0);
379 * Fragments are passed to low-level drivers as separate skbs, so these
380 --- a/net/mac80211/tx.c
381 +++ b/net/mac80211/tx.c
384 #include "ieee80211_i.h"
385 #include "driver-ops.h"
386 +#ifdef CONFIG_MAC80211_LEDS
392 @@ -1312,7 +1314,9 @@ static int __ieee80211_tx(struct ieee802
396 +#ifdef CONFIG_MAC80211_LEDS
397 ieee80211_led_tx(local, 1);
402 --- a/net/mac80211/util.c
403 +++ b/net/mac80211/util.c
408 +#ifdef CONFIG_MAC80211_LEDS
413 /* privid for wiphys to determine whether they belong to us or not */
414 @@ -1107,7 +1109,9 @@ u32 ieee80211_sta_get_rates(struct ieee8
416 void ieee80211_stop_device(struct ieee80211_local *local)
418 +#ifdef CONFIG_MAC80211_LEDS
419 ieee80211_led_radio(local, false);
422 cancel_work_sync(&local->reconfig_filter);
424 @@ -1141,7 +1145,9 @@ int ieee80211_reconfig(struct ieee80211_
428 +#ifdef CONFIG_MAC80211_LEDS
429 ieee80211_led_radio(local, true);