Skip to content

Commit

Permalink
[PATCH] bcm43xx: don't set the channel on a device, which is down.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Buesch authored and John W. Linville committed Mar 27, 2006
1 parent adc40e9 commit ec48378
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions drivers/net/wireless/bcm43xx/bcm43xx_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3530,12 +3530,18 @@ static void bcm43xx_ieee80211_set_chan(struct net_device *net_dev,
u8 channel)
{
struct bcm43xx_private *bcm = bcm43xx_priv(net_dev);
struct bcm43xx_radioinfo *radio;
unsigned long flags;

bcm43xx_lock_mmio(bcm, flags);
bcm43xx_mac_suspend(bcm);
bcm43xx_radio_selectchannel(bcm, channel, 0);
bcm43xx_mac_enable(bcm);
if (bcm->initialized) {
bcm43xx_mac_suspend(bcm);
bcm43xx_radio_selectchannel(bcm, channel, 0);
bcm43xx_mac_enable(bcm);
} else {
radio = bcm43xx_current_radio(bcm);
radio->initial_channel = channel;
}
bcm43xx_unlock_mmio(bcm, flags);
}

Expand Down

0 comments on commit ec48378

Please sign in to comment.