diff options
Diffstat (limited to 'drivers/net/wireless/b43legacy/leds.c')
-rw-r--r-- | drivers/net/wireless/b43legacy/leds.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43legacy/leds.c b/drivers/net/wireless/b43legacy/leds.c index 3ea55b18c700..37e9be893560 100644 --- a/drivers/net/wireless/b43legacy/leds.c +++ b/drivers/net/wireless/b43legacy/leds.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include "b43legacy.h" | 29 | #include "b43legacy.h" |
30 | #include "leds.h" | 30 | #include "leds.h" |
31 | #include "rfkill.h" | ||
31 | 32 | ||
32 | 33 | ||
33 | static void b43legacy_led_turn_on(struct b43legacy_wldev *dev, u8 led_index, | 34 | static void b43legacy_led_turn_on(struct b43legacy_wldev *dev, u8 led_index, |
@@ -86,7 +87,8 @@ static void b43legacy_led_brightness_set(struct led_classdev *led_dev, | |||
86 | 87 | ||
87 | static int b43legacy_register_led(struct b43legacy_wldev *dev, | 88 | static int b43legacy_register_led(struct b43legacy_wldev *dev, |
88 | struct b43legacy_led *led, | 89 | struct b43legacy_led *led, |
89 | const char *name, char *default_trigger, | 90 | const char *name, |
91 | const char *default_trigger, | ||
90 | u8 led_index, bool activelow) | 92 | u8 led_index, bool activelow) |
91 | { | 93 | { |
92 | int err; | 94 | int err; |
@@ -163,10 +165,10 @@ static void b43legacy_map_led(struct b43legacy_wldev *dev, | |||
163 | snprintf(name, sizeof(name), | 165 | snprintf(name, sizeof(name), |
164 | "b43legacy-%s::radio", wiphy_name(hw->wiphy)); | 166 | "b43legacy-%s::radio", wiphy_name(hw->wiphy)); |
165 | b43legacy_register_led(dev, &dev->led_radio, name, | 167 | b43legacy_register_led(dev, &dev->led_radio, name, |
166 | b43legacy_rfkill_led_name(dev), | 168 | ieee80211_get_radio_led_name(hw), |
167 | led_index, activelow); | 169 | led_index, activelow); |
168 | /* Sync the RF-kill LED state with the switch state. */ | 170 | /* Sync the RF-kill LED state with radio and switch states. */ |
169 | if (dev->radio_hw_enable) | 171 | if (dev->phy.radio_on && b43legacy_is_hw_radio_enabled(dev)) |
170 | b43legacy_led_turn_on(dev, led_index, activelow); | 172 | b43legacy_led_turn_on(dev, led_index, activelow); |
171 | break; | 173 | break; |
172 | case B43legacy_LED_WEIRD: | 174 | case B43legacy_LED_WEIRD: |