diff options
Diffstat (limited to 'drivers/net/wireless/b43/phy.c')
-rw-r--r-- | drivers/net/wireless/b43/phy.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43/phy.c b/drivers/net/wireless/b43/phy.c index 354d18238752..5f7ffa0a76c0 100644 --- a/drivers/net/wireless/b43/phy.c +++ b/drivers/net/wireless/b43/phy.c | |||
@@ -4349,10 +4349,13 @@ void b43_radio_turn_on(struct b43_wldev *dev) | |||
4349 | phy->radio_on = 1; | 4349 | phy->radio_on = 1; |
4350 | } | 4350 | } |
4351 | 4351 | ||
4352 | void b43_radio_turn_off(struct b43_wldev *dev) | 4352 | void b43_radio_turn_off(struct b43_wldev *dev, bool force) |
4353 | { | 4353 | { |
4354 | struct b43_phy *phy = &dev->phy; | 4354 | struct b43_phy *phy = &dev->phy; |
4355 | 4355 | ||
4356 | if (!phy->radio_on && !force) | ||
4357 | return; | ||
4358 | |||
4356 | if (phy->type == B43_PHYTYPE_A) { | 4359 | if (phy->type == B43_PHYTYPE_A) { |
4357 | b43_radio_write16(dev, 0x0004, 0x00FF); | 4360 | b43_radio_write16(dev, 0x0004, 0x00FF); |
4358 | b43_radio_write16(dev, 0x0005, 0x00FB); | 4361 | b43_radio_write16(dev, 0x0005, 0x00FB); |
@@ -4364,9 +4367,11 @@ void b43_radio_turn_off(struct b43_wldev *dev) | |||
4364 | 4367 | ||
4365 | rfover = b43_phy_read(dev, B43_PHY_RFOVER); | 4368 | rfover = b43_phy_read(dev, B43_PHY_RFOVER); |
4366 | rfoverval = b43_phy_read(dev, B43_PHY_RFOVERVAL); | 4369 | rfoverval = b43_phy_read(dev, B43_PHY_RFOVERVAL); |
4367 | phy->radio_off_context.rfover = rfover; | 4370 | if (!force) { |
4368 | phy->radio_off_context.rfoverval = rfoverval; | 4371 | phy->radio_off_context.rfover = rfover; |
4369 | phy->radio_off_context.valid = 1; | 4372 | phy->radio_off_context.rfoverval = rfoverval; |
4373 | phy->radio_off_context.valid = 1; | ||
4374 | } | ||
4370 | b43_phy_write(dev, B43_PHY_RFOVER, rfover | 0x008C); | 4375 | b43_phy_write(dev, B43_PHY_RFOVER, rfover | 0x008C); |
4371 | b43_phy_write(dev, B43_PHY_RFOVERVAL, rfoverval & 0xFF73); | 4376 | b43_phy_write(dev, B43_PHY_RFOVERVAL, rfoverval & 0xFF73); |
4372 | } else | 4377 | } else |