aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/main.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2007-09-20 22:11:02 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:25 -0400
commit42a9174f541d2338d35b91869415d9ae9312ca0d (patch)
tree34e35b54b63764a39c7e087d184b1e0fca1a9c5f /drivers/net/wireless/b43legacy/main.c
parentfda9abcf1a5b6b78a4ead25729583541af9876b5 (diff)
[B43LEGACY]: Support for turning the radio off from software.
This adds support for turning the radio off in software. That's useful in environments, where you don't want the RF to radiate any signals, but don't want to bring the interface down. This patch is based on a similar patch of b43 by Michael Buesch. Signed-off-by: Larry Finger <larry.finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/b43legacy/main.c')
-rw-r--r--drivers/net/wireless/b43legacy/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 61b94218094b..3e935d0d4b80 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2660,6 +2660,22 @@ static int b43legacy_dev_config(struct ieee80211_hw *hw,
2660 b43legacy_set_beacon_int(dev, conf->beacon_int); 2660 b43legacy_set_beacon_int(dev, conf->beacon_int);
2661 2661
2662 2662
2663 if (!!conf->radio_enabled != phy->radio_on) {
2664 if (conf->radio_enabled) {
2665 b43legacy_radio_turn_on(dev);
2666 b43legacyinfo(dev->wl, "Radio turned on by software\n");
2667 if (!dev->radio_hw_enable)
2668 b43legacyinfo(dev->wl, "The hardware RF-kill"
2669 " button still turns the radio"
2670 " physically off. Press the"
2671 " button to turn it on.\n");
2672 } else {
2673 b43legacy_radio_turn_off(dev);
2674 b43legacyinfo(dev->wl, "Radio turned off by"
2675 " software\n");
2676 }
2677 }
2678
2663 spin_lock_irqsave(&wl->irq_lock, flags); 2679 spin_lock_irqsave(&wl->irq_lock, flags);
2664 b43legacy_interrupt_enable(dev, savedirqs); 2680 b43legacy_interrupt_enable(dev, savedirqs);
2665 mmiowb(); 2681 mmiowb();