aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/leds.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2007-12-14 07:59:11 -0500
committerJohn W. Linville <linville@tuxdriver.com>2007-12-17 17:01:40 -0500
commit1a8d122782bdabe4475f29d022c9a0c092ac9878 (patch)
tree573b0ce811f6cc7db621b3f1301ef44caa5f5e62 /drivers/net/wireless/b43/leds.c
parentcb935cb4bd155d50ac98617b580aadd9d7ef3a0f (diff)
b43: Fix rfkill radio LED
This fixes Bug #9414 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. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/leds.c')
-rw-r--r--drivers/net/wireless/b43/leds.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c
index 19e588582c7c..6c0e2b9f7760 100644
--- a/drivers/net/wireless/b43/leds.c
+++ b/drivers/net/wireless/b43/leds.c
@@ -163,6 +163,9 @@ static void b43_map_led(struct b43_wldev *dev,
163 b43_register_led(dev, &dev->led_radio, name, 163 b43_register_led(dev, &dev->led_radio, name,
164 b43_rfkill_led_name(dev), 164 b43_rfkill_led_name(dev),
165 led_index, activelow); 165 led_index, activelow);
166 /* Sync the RF-kill LED state with the switch state. */
167 if (dev->radio_hw_enable)
168 b43_led_turn_on(dev, led_index, activelow);
166 break; 169 break;
167 case B43_LED_WEIRD: 170 case B43_LED_WEIRD:
168 case B43_LED_ASSOC: 171 case B43_LED_ASSOC:
@@ -232,4 +235,5 @@ void b43_leds_exit(struct b43_wldev *dev)
232 b43_unregister_led(&dev->led_tx); 235 b43_unregister_led(&dev->led_tx);
233 b43_unregister_led(&dev->led_rx); 236 b43_unregister_led(&dev->led_rx);
234 b43_unregister_led(&dev->led_assoc); 237 b43_unregister_led(&dev->led_assoc);
238 b43_unregister_led(&dev->led_radio);
235} 239}