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>
This commit is contained in:
Johannes Berg
2009-06-07 12:30:34 -05:00
committed by John W. Linville
parent e6a3b61681
commit f41f3f373d
15 changed files with 68 additions and 343 deletions

View File

@@ -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: