aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2007-09-27 15:35:34 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:54:12 -0400
commit8e9f7529fdfe34ed519f048682eb404fbd8004e8 (patch)
treec0ca2c07e9f4124be2bc46c35823f4fb79e99d9d /drivers/net/wireless/b43/phy.c
parent21954c367e4088c491122edd263964345bc1d3bf (diff)
[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>
Diffstat (limited to 'drivers/net/wireless/b43/phy.c')
-rw-r--r--drivers/net/wireless/b43/phy.c13
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
4352void b43_radio_turn_off(struct b43_wldev *dev) 4352void 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