aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/leds.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2007-12-16 13:21:06 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:07:25 -0500
commit4ad36d780caf34630d1a4cc39f9bc11017f5b81d (patch)
treee108911eb96f8bf7379bc220a52723e03d8b41ee /drivers/net/wireless/b43legacy/leds.c
parentb7c5678f0b1e6c385b0b308a9e8298edf3c91a20 (diff)
b43legacy: Fix rfkill radio LED
This fixes Bug #9414 for b43legacy. This patch is the equivalent of one submitted earlier for b43. Since addition of the rfkill callback, the LED associated with the off switch on the radio has not worked for several reasons: (1) Essential data in the rfkill structure were missing. (2) The rfkill structure was initialized after the LED initialization. (3) There was a minor memory leak if the radio LED structure was inited. Once the above problems were fixed, additional difficulties were noted: (4) The radio LED was in the wrong state at startup. (5) The radio switch had to be manipulated twice for each state change. (6) A circular mutex locking situation existed. (7) If rfkill-input is built as a module, it is not automatically loaded. This patch fixes all of the above and removes a couple of sparse warnings. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy/leds.c')
-rw-r--r--drivers/net/wireless/b43legacy/leds.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43legacy/leds.c b/drivers/net/wireless/b43legacy/leds.c
index f0affb781002..cacb786d9713 100644
--- a/drivers/net/wireless/b43legacy/leds.c
+++ b/drivers/net/wireless/b43legacy/leds.c
@@ -165,6 +165,9 @@ static void b43legacy_map_led(struct b43legacy_wldev *dev,
165 b43legacy_register_led(dev, &dev->led_radio, name, 165 b43legacy_register_led(dev, &dev->led_radio, name,
166 b43legacy_rfkill_led_name(dev), 166 b43legacy_rfkill_led_name(dev),
167 led_index, activelow); 167 led_index, activelow);
168 /* Sync the RF-kill LED state with the switch state. */
169 if (dev->radio_hw_enable)
170 b43legacy_led_turn_on(dev, led_index, activelow);
168 break; 171 break;
169 case B43legacy_LED_WEIRD: 172 case B43legacy_LED_WEIRD:
170 case B43legacy_LED_ASSOC: 173 case B43legacy_LED_ASSOC:
@@ -234,4 +237,5 @@ void b43legacy_leds_exit(struct b43legacy_wldev *dev)
234 b43legacy_unregister_led(&dev->led_tx); 237 b43legacy_unregister_led(&dev->led_tx);
235 b43legacy_unregister_led(&dev->led_rx); 238 b43legacy_unregister_led(&dev->led_rx);
236 b43legacy_unregister_led(&dev->led_assoc); 239 b43legacy_unregister_led(&dev->led_assoc);
240 b43legacy_unregister_led(&dev->led_radio);
237} 241}