diff options
author | Michael Buesch <mb@bu3sch.de> | 2006-05-01 22:43:00 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-05-05 16:55:23 -0400 |
commit | 5b4b9775a00c20ade1b1ac8aa25e0e4059d6243e (patch) | |
tree | 43edebf7ae16ec11e6a644a681c21192a0cc8a35 /drivers/net/wireless | |
parent | d57336e3f2dd7c2d1fbe4a8323029869fb6e1f00 (diff) |
[PATCH] bcm43xx: fix iwmode crash when down
This fixes a crash when
iwconfig ethX mode foo
is done before
ifconfig ethX up
or after
ifconfig ethX down
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_wx.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c index 3edbb481a0a0..b45063974ae9 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c @@ -182,8 +182,11 @@ static int bcm43xx_wx_set_mode(struct net_device *net_dev, mode = BCM43xx_INITIAL_IWMODE; bcm43xx_lock_mmio(bcm, flags); - if (bcm->ieee->iw_mode != mode) - bcm43xx_set_iwmode(bcm, mode); + if (bcm->initialized) { + if (bcm->ieee->iw_mode != mode) + bcm43xx_set_iwmode(bcm, mode); + } else + bcm->ieee->iw_mode = mode; bcm43xx_unlock_mmio(bcm, flags); return 0; |