2 config.mk | 14 +++++++-------
3 drivers/net/wireless/ath/ath9k/ath9k.h | 4 ++++
4 drivers/net/wireless/ath/ath9k/gpio.c | 2 ++
5 drivers/net/wireless/ath/ath9k/init.c | 6 ++++++
6 drivers/net/wireless/ath/ath9k/main.c | 6 ++++++
7 drivers/net/wireless/ath/ath9k/pci.c | 4 ++++
8 include/linux/compat-2.6.25.h | 2 ++
9 net/mac80211/iface.c | 4 ++++
10 net/mac80211/main.c | 8 ++++++++
11 net/mac80211/mlme.c | 6 ++++++
12 net/mac80211/pm.c | 2 ++
13 net/mac80211/rx.c | 4 ++++
14 net/mac80211/status.c | 4 ++++
15 net/mac80211/tx.c | 4 ++++
16 net/mac80211/util.c | 6 ++++++
17 15 files changed, 69 insertions(+), 7 deletions(-)
19 --- compat-wireless-2010-07-29.orig/config.mk
20 +++ compat-wireless-2010-07-29/config.mk
21 @@ -115,7 +115,7 @@ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstr
22 # CONFIG_MAC80211_RC_PID=y
23 CONFIG_MAC80211_RC_MINSTREL=y
24 CONFIG_MAC80211_RC_MINSTREL_HT=y
25 -CONFIG_MAC80211_LEDS=y
26 +# CONFIG_MAC80211_LEDS=y
28 # enable mesh networking too
29 CONFIG_MAC80211_MESH=y
30 @@ -194,7 +194,7 @@ CONFIG_B43_PCI_AUTOSELECT=y
31 ifneq ($(CONFIG_PCMCIA),)
37 # CONFIG_B43_NPHY is not set
38 # CONFIG_B43_FORCE_PIO=y
39 @@ -203,7 +203,7 @@ CONFIG_B43_PHY_LP=y
41 CONFIG_B43LEGACY_HWRNG=y
42 CONFIG_B43LEGACY_PCI_AUTOSELECT=y
43 -CONFIG_B43LEGACY_LEDS=y
44 +# CONFIG_B43LEGACY_LEDS=y
45 # CONFIG_B43LEGACY_DEBUG=y
46 CONFIG_B43LEGACY_DMA=y
47 CONFIG_B43LEGACY_PIO=y
48 @@ -336,13 +336,13 @@ endif
52 -CONFIG_RTL8187_LEDS=y
53 +# CONFIG_RTL8187_LEDS=y
57 ifndef CONFIG_COMPAT_KERNEL_28
60 +# CONFIG_AR9170_LEDS=y
64 @@ -426,7 +426,7 @@ CONFIG_RT2800_LIB=m
65 CONFIG_RT2X00_LIB_HT=y
66 CONFIG_RT2X00_LIB_FIRMWARE=y
67 CONFIG_RT2X00_LIB_CRYPTO=y
68 -CONFIG_RT2X00_LIB_LEDS=y
69 +# CONFIG_RT2X00_LIB_LEDS=y
70 # CONFIG_RT2X00_DEBUG=y
71 # CONFIG_RT2X00_LIB_DEBUGFS
73 @@ -437,7 +437,7 @@ endif
82 --- compat-wireless-2010-07-29.orig/include/linux/compat-2.6.25.h
83 +++ compat-wireless-2010-07-29/include/linux/compat-2.6.25.h
84 @@ -146,10 +146,12 @@ static inline void __hwrng_unregister(st
85 hwrng_unregister(rng);
88 +#ifdef CONFIG_MAC80211_LEDS
89 static inline void led_classdev_unregister_suspended(struct led_classdev *lcd)
91 led_classdev_unregister(lcd);
96 * The following things are out of ./include/linux/kernel.h
97 --- compat-wireless-2010-07-29.orig/drivers/net/wireless/ath/ath9k/gpio.c
98 +++ compat-wireless-2010-07-29/drivers/net/wireless/ath/ath9k/gpio.c
101 /********************************/
103 +#ifdef CONFIG_MAC80211_LEDS
104 static void ath_led_blink_work(struct work_struct *work)
106 struct ath_softc *sc = container_of(work, struct ath_softc,
107 @@ -194,6 +195,7 @@ fail:
108 cancel_delayed_work_sync(&sc->ath_led_blink_work);
113 /*******************/
115 --- compat-wireless-2010-07-29.orig/drivers/net/wireless/ath/ath9k/pci.c
116 +++ compat-wireless-2010-07-29/drivers/net/wireless/ath/ath9k/pci.c
117 @@ -273,7 +273,9 @@ static int ath_pci_suspend(struct pci_de
118 struct ath_wiphy *aphy = hw->priv;
119 struct ath_softc *sc = aphy->sc;
121 +#ifdef CONFIG_MAC80211_LEDS
122 ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1);
125 pci_save_state(pdev);
126 pci_disable_device(pdev);
127 @@ -305,10 +307,12 @@ static int ath_pci_resume(struct pci_dev
128 if ((val & 0x0000ff00) != 0)
129 pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
131 +#ifdef CONFIG_MAC80211_LEDS
133 ath9k_hw_cfg_output(sc->sc_ah, sc->sc_ah->led_pin,
134 AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
135 ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1);
140 --- compat-wireless-2010-07-29.orig/drivers/net/wireless/ath/ath9k/ath9k.h
141 +++ compat-wireless-2010-07-29/drivers/net/wireless/ath/ath9k/ath9k.h
142 @@ -465,6 +465,7 @@ void ath9k_btcoex_timer_pause(struct ath
143 /********************/
145 /********************/
146 +#ifdef CONFIG_MAC80211_LEDS
148 #define ATH_LED_PIN_DEF 1
149 #define ATH_LED_PIN_9287 8
150 @@ -489,6 +490,7 @@ struct ath_led {
152 void ath_init_leds(struct ath_softc *sc);
153 void ath_deinit_leds(struct ath_softc *sc);
156 /********************/
157 /* Main driver core */
158 @@ -586,6 +588,7 @@ struct ath_softc {
159 enum wireless_mode cur_rate_mode;
160 struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
162 +#ifdef CONFIG_MAC80211_LEDS
163 struct ath_led radio_led;
164 struct ath_led assoc_led;
165 struct ath_led tx_led;
166 @@ -595,6 +598,7 @@ struct ath_softc {
167 int led_off_duration;
174 --- compat-wireless-2010-07-29.orig/drivers/net/wireless/ath/ath9k/init.c
175 +++ compat-wireless-2010-07-29/drivers/net/wireless/ath/ath9k/init.c
176 @@ -34,9 +34,11 @@ int modparam_nohwcrypt;
177 module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
178 MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
180 +#ifdef CONFIG_MAC80211_LEDS
182 module_param_named(blink, led_blink, int, 0444);
183 MODULE_PARM_DESC(blink, "Enable LED blink on activity");
186 /* We use the hw_value as an index into our private channel structure */
188 @@ -757,7 +759,9 @@ int ath9k_init_device(u16 devid, struct
189 INIT_DELAYED_WORK(&sc->wiphy_work, ath9k_wiphy_work);
190 sc->wiphy_scheduler_int = msecs_to_jiffies(500);
192 +#ifdef CONFIG_MAC80211_LEDS
195 ath_start_rfkill_poll(sc);
198 @@ -810,7 +814,9 @@ void ath9k_deinit_device(struct ath_soft
201 wiphy_rfkill_stop_polling(sc->hw->wiphy);
202 +#ifdef CONFIG_MAC80211_LEDS
206 for (i = 0; i < sc->num_sec_wiphy; i++) {
207 struct ath_wiphy *aphy = sc->sec_wiphy[i];
208 --- compat-wireless-2010-07-29.orig/drivers/net/wireless/ath/ath9k/main.c
209 +++ compat-wireless-2010-07-29/drivers/net/wireless/ath/ath9k/main.c
210 @@ -868,9 +868,11 @@ void ath_radio_enable(struct ath_softc *
211 ath9k_hw_set_interrupts(ah, ah->imask);
214 +#ifdef CONFIG_MAC80211_LEDS
215 ath9k_hw_cfg_output(ah, ah->led_pin,
216 AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
217 ath9k_hw_set_gpio(ah, ah->led_pin, 0);
220 ieee80211_wake_queues(hw);
221 ath9k_ps_restore(sc);
222 @@ -889,10 +891,12 @@ void ath_radio_disable(struct ath_softc
223 * Keep the LED on when the radio is disabled
224 * during idle unassociated state.
226 +#ifdef CONFIG_MAC80211_LEDS
228 ath9k_hw_set_gpio(ah, ah->led_pin, 1);
229 ath9k_hw_cfg_gpio_input(ah, ah->led_pin);
233 /* Disable interrupts */
234 ath9k_hw_set_interrupts(ah, 0);
235 @@ -1303,8 +1307,10 @@ static void ath9k_stop(struct ieee80211_
237 aphy->state = ATH_WIPHY_INACTIVE;
239 +#ifdef CONFIG_MAC80211_LEDS
241 cancel_delayed_work_sync(&sc->ath_led_blink_work);
244 cancel_delayed_work_sync(&sc->tx_complete_work);
245 cancel_work_sync(&sc->paprd_work);
246 --- compat-wireless-2010-07-29.orig/net/mac80211/iface.c
247 +++ compat-wireless-2010-07-29/net/mac80211/iface.c
249 #include "sta_info.h"
250 #include "debugfs_netdev.h"
252 +#ifdef CONFIG_MAC80211_LEDS
255 #include "driver-ops.h"
258 @@ -189,7 +191,9 @@ static int ieee80211_open(struct net_dev
260 /* we're brought up, everything changes */
261 hw_reconf_flags = ~0;
262 +#ifdef CONFIG_MAC80211_LEDS
263 ieee80211_led_radio(local, true);
268 --- compat-wireless-2010-07-29.orig/net/mac80211/main.c
269 +++ compat-wireless-2010-07-29/net/mac80211/main.c
274 +#ifdef CONFIG_MAC80211_LEDS
280 @@ -674,7 +676,9 @@ int ieee80211_register_hw(struct ieee802
284 +#ifdef CONFIG_MAC80211_LEDS
285 ieee80211_led_init(local);
288 local->network_latency_notifier.notifier_call =
289 ieee80211_max_network_latency;
290 @@ -699,7 +703,9 @@ int ieee80211_register_hw(struct ieee802
291 &local->network_latency_notifier);
294 +#ifdef CONFIG_MAC80211_LEDS
295 ieee80211_led_exit(local);
297 ieee80211_remove_interfaces(local);
300 @@ -755,7 +761,9 @@ void ieee80211_unregister_hw(struct ieee
301 destroy_workqueue(local->workqueue);
302 wiphy_unregister(local->hw.wiphy);
303 ieee80211_wep_free(local);
304 +#ifdef CONFIG_MAC80211_LEDS
305 ieee80211_led_exit(local);
307 kfree(local->int_scan_req);
309 EXPORT_SYMBOL(ieee80211_unregister_hw);
310 --- compat-wireless-2010-07-29.orig/net/mac80211/mlme.c
311 +++ compat-wireless-2010-07-29/net/mac80211/mlme.c
313 #include "ieee80211_i.h"
314 #include "driver-ops.h"
316 +#ifdef CONFIG_MAC80211_LEDS
320 #define IEEE80211_MAX_PROBE_TRIES 5
322 @@ -872,7 +874,9 @@ static void ieee80211_set_associated(str
324 sdata->u.mgd.wmm_last_param_set = -1;
326 +#ifdef CONFIG_MAC80211_LEDS
327 ieee80211_led_assoc(local, 1);
330 if (local->hw.flags & IEEE80211_HW_NEED_DTIM_PERIOD)
331 bss_conf->dtim_period = bss->dtim_period;
332 @@ -958,7 +962,9 @@ static void ieee80211_set_disassoc(struc
334 changed |= ieee80211_reset_erp_info(sdata);
336 +#ifdef CONFIG_MAC80211_LEDS
337 ieee80211_led_assoc(local, 0);
339 changed |= BSS_CHANGED_ASSOC;
340 sdata->vif.bss_conf.assoc = false;
342 --- compat-wireless-2010-07-29.orig/net/mac80211/pm.c
343 +++ compat-wireless-2010-07-29/net/mac80211/pm.c
345 #include "ieee80211_i.h"
347 #include "driver-ops.h"
348 +#ifdef CONFIG_MAC80211_LEDS
352 int __ieee80211_suspend(struct ieee80211_hw *hw)
354 --- compat-wireless-2010-07-29.orig/net/mac80211/rx.c
355 +++ compat-wireless-2010-07-29/net/mac80211/rx.c
358 #include "ieee80211_i.h"
359 #include "driver-ops.h"
360 +#ifdef CONFIG_MAC80211_LEDS
366 @@ -1342,8 +1344,10 @@ ieee80211_rx_h_defragment(struct ieee802
367 rx->sta->rx_packets++;
368 if (is_multicast_ether_addr(hdr->addr1))
369 rx->local->dot11MulticastReceivedFrameCount++;
370 +#ifdef CONFIG_MAC80211_LEDS
372 ieee80211_led_rx(rx->local);
377 --- compat-wireless-2010-07-29.orig/net/mac80211/status.c
378 +++ compat-wireless-2010-07-29/net/mac80211/status.c
380 #include "ieee80211_i.h"
383 +#ifdef CONFIG_MAC80211_LEDS
388 void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
389 @@ -247,7 +249,9 @@ void ieee80211_tx_status(struct ieee8021
393 +#ifdef CONFIG_MAC80211_LEDS
394 ieee80211_led_tx(local, 0);
398 * Fragments are passed to low-level drivers as separate skbs, so these
399 --- compat-wireless-2010-07-29.orig/net/mac80211/tx.c
400 +++ compat-wireless-2010-07-29/net/mac80211/tx.c
403 #include "ieee80211_i.h"
404 #include "driver-ops.h"
405 +#ifdef CONFIG_MAC80211_LEDS
411 @@ -1312,7 +1314,9 @@ static int __ieee80211_tx(struct ieee802
415 +#ifdef CONFIG_MAC80211_LEDS
416 ieee80211_led_tx(local, 1);
421 --- compat-wireless-2010-07-29.orig/net/mac80211/util.c
422 +++ compat-wireless-2010-07-29/net/mac80211/util.c
427 +#ifdef CONFIG_MAC80211_LEDS
432 /* privid for wiphys to determine whether they belong to us or not */
433 @@ -1107,7 +1109,9 @@ u32 ieee80211_sta_get_rates(struct ieee8
435 void ieee80211_stop_device(struct ieee80211_local *local)
437 +#ifdef CONFIG_MAC80211_LEDS
438 ieee80211_led_radio(local, false);
441 cancel_work_sync(&local->reconfig_filter);
443 @@ -1141,7 +1145,9 @@ int ieee80211_reconfig(struct ieee80211_
447 +#ifdef CONFIG_MAC80211_LEDS
448 ieee80211_led_radio(local, true);