mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 21:24:00 +08:00
[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>
This commit is contained in:
parent
adc40e9796
commit
ec483781fe
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user