diff options
author | Michael Buesch <mb@bu3sch.de> | 2007-09-20 16:14:18 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:52:24 -0400 |
commit | fda9abcf1a5b6b78a4ead25729583541af9876b5 (patch) | |
tree | ad8029180557a5c4dce3f0a4e7c118bffca25eef /drivers/net/wireless/b43/main.c | |
parent | 6a724d68a38c33ba4c7f7b5f008301ac12c9ced1 (diff) |
[B43]: 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.
Cc: Larry Finger <larry.finger@lwfinger.net>
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/main.c')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index cc5285407e88..b44c9f928848 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -2874,6 +2874,21 @@ static int b43_dev_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf) | |||
2874 | if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP)) | 2874 | if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP)) |
2875 | b43_set_beacon_int(dev, conf->beacon_int); | 2875 | b43_set_beacon_int(dev, conf->beacon_int); |
2876 | 2876 | ||
2877 | if (!!conf->radio_enabled != phy->radio_on) { | ||
2878 | if (conf->radio_enabled) { | ||
2879 | b43_radio_turn_on(dev); | ||
2880 | b43info(dev->wl, "Radio turned on by software\n"); | ||
2881 | if (!dev->radio_hw_enable) { | ||
2882 | b43info(dev->wl, "The hardware RF-kill button " | ||
2883 | "still turns the radio physically off. " | ||
2884 | "Press the button to turn it on.\n"); | ||
2885 | } | ||
2886 | } else { | ||
2887 | b43_radio_turn_off(dev); | ||
2888 | b43info(dev->wl, "Radio turned off by software\n"); | ||
2889 | } | ||
2890 | } | ||
2891 | |||
2877 | spin_lock_irqsave(&wl->irq_lock, flags); | 2892 | spin_lock_irqsave(&wl->irq_lock, flags); |
2878 | b43_interrupt_enable(dev, savedirqs); | 2893 | b43_interrupt_enable(dev, savedirqs); |
2879 | mmiowb(); | 2894 | mmiowb(); |
@@ -3218,6 +3233,8 @@ static void setup_struct_phy_for_init(struct b43_wldev *dev, | |||
3218 | phy->aci_wlan_automatic = 0; | 3233 | phy->aci_wlan_automatic = 0; |
3219 | phy->aci_hw_rssi = 0; | 3234 | phy->aci_hw_rssi = 0; |
3220 | 3235 | ||
3236 | phy->radio_off_context.valid = 0; | ||
3237 | |||
3221 | lo = phy->lo_control; | 3238 | lo = phy->lo_control; |
3222 | if (lo) { | 3239 | if (lo) { |
3223 | memset(lo, 0, sizeof(*(phy->lo_control))); | 3240 | memset(lo, 0, sizeof(*(phy->lo_control))); |