diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2007-10-10 23:44:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:03:27 -0500 |
commit | 93bb7f3a7bb5c95da10242d9763994a466c90b1d (patch) | |
tree | 8c248e88ea2be5ae791003050bda848b4a72dd36 /drivers/net/wireless/b43legacy/radio.c | |
parent | ba48f7bb8062982ec916868cc8c90360aad82e53 (diff) |
b43legacy: RF-kill support
This adds full support for the RFKILL button and the RFKILL LED trigger.
This is a port to b43legacy of a patch by Michael Buesch <mb@bu3sch.de>
for b43.
Signed-off-by: Larry Finger<Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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); |