aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/leds.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43legacy/leds.c')
-rw-r--r--drivers/net/wireless/b43legacy/leds.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43legacy/leds.c b/drivers/net/wireless/b43legacy/leds.c
index 498912ddeddb..a584ea810502 100644
--- a/drivers/net/wireless/b43legacy/leds.c
+++ b/drivers/net/wireless/b43legacy/leds.c
@@ -182,6 +182,7 @@ void b43legacy_leds_update(struct b43legacy_wldev *dev, int activity)
182 unsigned long interval = 0; 182 unsigned long interval = 0;
183 u16 ledctl; 183 u16 ledctl;
184 unsigned long flags; 184 unsigned long flags;
185 bool radio_enabled = (phy->radio_on && dev->radio_hw_enable);
185 186
186 spin_lock_irqsave(&dev->wl->leds_lock, flags); 187 spin_lock_irqsave(&dev->wl->leds_lock, flags);
187 ledctl = b43legacy_read16(dev, B43legacy_MMIO_GPIO_CONTROL); 188 ledctl = b43legacy_read16(dev, B43legacy_MMIO_GPIO_CONTROL);
@@ -201,20 +202,15 @@ void b43legacy_leds_update(struct b43legacy_wldev *dev, int activity)
201 turn_on = activity; 202 turn_on = activity;
202 break; 203 break;
203 case B43legacy_LED_RADIO_ALL: 204 case B43legacy_LED_RADIO_ALL:
204 turn_on = phy->radio_on && 205 turn_on = radio_enabled;
205 b43legacy_is_hw_radio_enabled(dev);
206 break; 206 break;
207 case B43legacy_LED_RADIO_A: 207 case B43legacy_LED_RADIO_A:
208 break; 208 break;
209 case B43legacy_LED_RADIO_B: 209 case B43legacy_LED_RADIO_B:
210 turn_on = (phy->radio_on && 210 turn_on = radio_enabled;
211 b43legacy_is_hw_radio_enabled(dev) &&
212 (phy->type == B43legacy_PHYTYPE_B ||
213 phy->type == B43legacy_PHYTYPE_G));
214 break; 211 break;
215 case B43legacy_LED_MODE_BG: 212 case B43legacy_LED_MODE_BG:
216 if (phy->type == B43legacy_PHYTYPE_G && 213 if (phy->type == B43legacy_PHYTYPE_G && radio_enabled)
217 b43legacy_is_hw_radio_enabled(dev))
218 turn_on = 1; 214 turn_on = 1;
219 break; 215 break;
220 case B43legacy_LED_TRANSFER: 216 case B43legacy_LED_TRANSFER: