diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-06-07 17:30:34 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-06-10 17:27:54 (GMT) |
commit | f41f3f373dd72344c65d801d6381fe83ef3a2c54 (patch) | |
tree | fd5a9da51f07d2128fa741032d9f09ce1fa96cfb /drivers/net/wireless/b43legacy/leds.c | |
parent | e6a3b61681dcb963e6465ffbc4330b44824f35e3 (diff) | |
download | linux-f41f3f373dd72344c65d801d6381fe83ef3a2c54.tar.xz |
b43/legacy: port to cfg80211 rfkill
This ports the b43/legacy rfkill code to the new API offered
by cfg80211 and thus removes a lot of useless stuff.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Michael Buesch <mb@bu3sch.de>
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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/b43legacy/leds.c b/drivers/net/wireless/b43legacy/leds.c index 538d311..37e9be8 100644 --- a/drivers/net/wireless/b43legacy/leds.c +++ b/drivers/net/wireless/b43legacy/leds.c @@ -28,6 +28,7 @@ #include "b43legacy.h" #include "leds.h" +#include "rfkill.h" static void b43legacy_led_turn_on(struct b43legacy_wldev *dev, u8 led_index, @@ -164,10 +165,10 @@ static void b43legacy_map_led(struct b43legacy_wldev *dev, snprintf(name, sizeof(name), "b43legacy-%s::radio", wiphy_name(hw->wiphy)); b43legacy_register_led(dev, &dev->led_radio, name, - b43legacy_rfkill_led_name(dev), + ieee80211_get_radio_led_name(hw), led_index, activelow); - /* Sync the RF-kill LED state with the switch state. */ - if (dev->radio_hw_enable) + /* Sync the RF-kill LED state with radio and switch states. */ + if (dev->phy.radio_on && b43legacy_is_hw_radio_enabled(dev)) b43legacy_led_turn_on(dev, led_index, activelow); break; case B43legacy_LED_WEIRD: |