diff options
Diffstat (limited to 'drivers/net/wireless/b43legacy/radio.c')
-rw-r--r-- | drivers/net/wireless/b43legacy/radio.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43legacy/radio.c b/drivers/net/wireless/b43legacy/radio.c index 34cb0d801ce1..1dc351ca883c 100644 --- a/drivers/net/wireless/b43legacy/radio.c +++ b/drivers/net/wireless/b43legacy/radio.c | |||
@@ -2115,18 +2115,23 @@ void b43legacy_radio_turn_on(struct b43legacy_wldev *dev) | |||
2115 | phy->radio_on = 1; | 2115 | phy->radio_on = 1; |
2116 | } | 2116 | } |
2117 | 2117 | ||
2118 | void b43legacy_radio_turn_off(struct b43legacy_wldev *dev) | 2118 | void b43legacy_radio_turn_off(struct b43legacy_wldev *dev, bool force) |
2119 | { | 2119 | { |
2120 | struct b43legacy_phy *phy = &dev->phy; | 2120 | struct b43legacy_phy *phy = &dev->phy; |
2121 | 2121 | ||
2122 | if (!phy->radio_on && !force) | ||
2123 | return; | ||
2124 | |||
2122 | if (phy->type == B43legacy_PHYTYPE_G && dev->dev->id.revision >= 5) { | 2125 | if (phy->type == B43legacy_PHYTYPE_G && dev->dev->id.revision >= 5) { |
2123 | u16 rfover, rfoverval; | 2126 | u16 rfover, rfoverval; |
2124 | 2127 | ||
2125 | rfover = b43legacy_phy_read(dev, B43legacy_PHY_RFOVER); | 2128 | rfover = b43legacy_phy_read(dev, B43legacy_PHY_RFOVER); |
2126 | rfoverval = b43legacy_phy_read(dev, B43legacy_PHY_RFOVERVAL); | 2129 | rfoverval = b43legacy_phy_read(dev, B43legacy_PHY_RFOVERVAL); |
2127 | phy->radio_off_context.rfover = rfover; | 2130 | if (!force) { |
2128 | phy->radio_off_context.rfoverval = rfoverval; | 2131 | phy->radio_off_context.rfover = rfover; |
2129 | phy->radio_off_context.valid = 1; | 2132 | phy->radio_off_context.rfoverval = rfoverval; |
2133 | phy->radio_off_context.valid = 1; | ||
2134 | } | ||
2130 | b43legacy_phy_write(dev, B43legacy_PHY_RFOVER, rfover | 0x008C); | 2135 | b43legacy_phy_write(dev, B43legacy_PHY_RFOVER, rfover | 0x008C); |
2131 | b43legacy_phy_write(dev, B43legacy_PHY_RFOVERVAL, | 2136 | b43legacy_phy_write(dev, B43legacy_PHY_RFOVERVAL, |
2132 | rfoverval & 0xFF73); | 2137 | rfoverval & 0xFF73); |