[B43]: RF-kill support

This adds full support for the RFKILL button and
the RFKILL LED trigger.

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>
This commit is contained in:
Michael Buesch
2007-09-27 21:35:34 +02:00
committed by David S. Miller
parent 21954c367e
commit 8e9f7529fd
9 changed files with 245 additions and 15 deletions

View File

@ -4349,10 +4349,13 @@ void b43_radio_turn_on(struct b43_wldev *dev)
phy->radio_on = 1;
}
void b43_radio_turn_off(struct b43_wldev *dev)
void b43_radio_turn_off(struct b43_wldev *dev, bool force)
{
struct b43_phy *phy = &dev->phy;
if (!phy->radio_on && !force)
return;
if (phy->type == B43_PHYTYPE_A) {
b43_radio_write16(dev, 0x0004, 0x00FF);
b43_radio_write16(dev, 0x0005, 0x00FB);
@ -4364,9 +4367,11 @@ void b43_radio_turn_off(struct b43_wldev *dev)
rfover = b43_phy_read(dev, B43_PHY_RFOVER);
rfoverval = b43_phy_read(dev, B43_PHY_RFOVERVAL);
phy->radio_off_context.rfover = rfover;
phy->radio_off_context.rfoverval = rfoverval;
phy->radio_off_context.valid = 1;
if (!force) {
phy->radio_off_context.rfover = rfover;
phy->radio_off_context.rfoverval = rfoverval;
phy->radio_off_context.valid = 1;
}
b43_phy_write(dev, B43_PHY_RFOVER, rfover | 0x008C);
b43_phy_write(dev, B43_PHY_RFOVERVAL, rfoverval & 0xFF73);
} else