aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorMichael Buesch <mbuesch@freenet.de>2006-03-27 04:49:51 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-03-27 11:19:47 -0500
commitec483781fe98bba92e00f4428f8d69dd5e071246 (patch)
treeb5d60f8b3a0f9723170bd3bd02a4a5b3f854016d /drivers/net
parentadc40e9796d03d56e99bdac62492492a1098124b (diff)
[PATCH] bcm43xx: don't set the channel on a device, which is down.
Initial patch by David Woodhouse and Michael Marineau. Locking fix by me. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_main.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
index 2b7ef9b46ccd..c37371fc9e01 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -3530,12 +3530,18 @@ static void bcm43xx_ieee80211_set_chan(struct net_device *net_dev,
3530 u8 channel) 3530 u8 channel)
3531{ 3531{
3532 struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); 3532 struct bcm43xx_private *bcm = bcm43xx_priv(net_dev);
3533 struct bcm43xx_radioinfo *radio;
3533 unsigned long flags; 3534 unsigned long flags;
3534 3535
3535 bcm43xx_lock_mmio(bcm, flags); 3536 bcm43xx_lock_mmio(bcm, flags);
3536 bcm43xx_mac_suspend(bcm); 3537 if (bcm->initialized) {
3537 bcm43xx_radio_selectchannel(bcm, channel, 0); 3538 bcm43xx_mac_suspend(bcm);
3538 bcm43xx_mac_enable(bcm); 3539 bcm43xx_radio_selectchannel(bcm, channel, 0);
3540 bcm43xx_mac_enable(bcm);
3541 } else {
3542 radio = bcm43xx_current_radio(bcm);
3543 radio->initial_channel = channel;
3544 }
3539 bcm43xx_unlock_mmio(bcm, flags); 3545 bcm43xx_unlock_mmio(bcm, flags);
3540} 3546}
3541 3547