Skip to content

Commit

Permalink
[PATCH] bcm43xx: fix iwmode crash when down
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Buesch authored and John W. Linville committed May 5, 2006
1 parent d57336e commit 5b4b977
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/wireless/bcm43xx/bcm43xx_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5b4b977

Please sign in to comment.