diff options
author | Michael Buesch <mb@bu3sch.de> | 2007-09-19 13:10:08 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:52:21 -0400 |
commit | 05155c83d13b983ac2c5691575fd471543df31fe (patch) | |
tree | e5bd845ab62aef2cdb9fcbf84b25718d455f17b4 /drivers/net/wireless/b43/leds.c | |
parent | 6b9bafec6608539d07f7ccdeefe121dabe06604f (diff) |
[B43]: Change loglevel of radio-enable message.
Also cleanup the code a bit and remove the inline.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/b43/leds.c')
-rw-r--r-- | drivers/net/wireless/b43/leds.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c index 85d965de5791..0f155b4f34eb 100644 --- a/drivers/net/wireless/b43/leds.c +++ b/drivers/net/wireless/b43/leds.c | |||
@@ -176,6 +176,7 @@ void b43_leds_update(struct b43_wldev *dev, int activity) | |||
176 | unsigned long interval = 0; | 176 | unsigned long interval = 0; |
177 | u16 ledctl; | 177 | u16 ledctl; |
178 | unsigned long flags; | 178 | unsigned long flags; |
179 | bool radio_enabled = (phy->radio_on && dev->radio_hw_enable); | ||
179 | 180 | ||
180 | spin_lock_irqsave(&dev->wl->leds_lock, flags); | 181 | spin_lock_irqsave(&dev->wl->leds_lock, flags); |
181 | ledctl = b43_read16(dev, B43_MMIO_GPIO_CONTROL); | 182 | ledctl = b43_read16(dev, B43_MMIO_GPIO_CONTROL); |
@@ -195,21 +196,19 @@ void b43_leds_update(struct b43_wldev *dev, int activity) | |||
195 | turn_on = activity; | 196 | turn_on = activity; |
196 | break; | 197 | break; |
197 | case B43_LED_RADIO_ALL: | 198 | case B43_LED_RADIO_ALL: |
198 | turn_on = phy->radio_on && b43_is_hw_radio_enabled(dev); | 199 | turn_on = radio_enabled; |
199 | break; | 200 | break; |
200 | case B43_LED_RADIO_A: | 201 | case B43_LED_RADIO_A: |
201 | turn_on = (phy->radio_on && b43_is_hw_radio_enabled(dev) | 202 | turn_on = (radio_enabled && phy->type == B43_PHYTYPE_A); |
202 | && phy->type == B43_PHYTYPE_A); | ||
203 | break; | 203 | break; |
204 | case B43_LED_RADIO_B: | 204 | case B43_LED_RADIO_B: |
205 | turn_on = (phy->radio_on && b43_is_hw_radio_enabled(dev) | 205 | turn_on = (radio_enabled && |
206 | && (phy->type == B43_PHYTYPE_B | 206 | (phy->type == B43_PHYTYPE_B |
207 | || phy->type == B43_PHYTYPE_G)); | 207 | || phy->type == B43_PHYTYPE_G)); |
208 | break; | 208 | break; |
209 | case B43_LED_MODE_BG: | 209 | case B43_LED_MODE_BG: |
210 | if (phy->type == B43_PHYTYPE_G | 210 | if (phy->type == B43_PHYTYPE_G |
211 | && b43_is_hw_radio_enabled(dev) | 211 | && radio_enabled) |
212 | && 1 /*FIXME: using G rates. */ ) | ||
213 | turn_on = 1; | 212 | turn_on = 1; |
214 | break; | 213 | break; |
215 | case B43_LED_TRANSFER: | 214 | case B43_LED_TRANSFER: |