提交 5b4b9775 编写于 作者: M Michael Buesch 提交者: John W. Linville

[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: NMichael Buesch <mb@bu3sch.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 d57336e3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册