diff options
Diffstat (limited to 'drivers/net')
-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, | |||
182 | mode = BCM43xx_INITIAL_IWMODE; | 182 | mode = BCM43xx_INITIAL_IWMODE; |
183 | 183 | ||
184 | bcm43xx_lock_mmio(bcm, flags); | 184 | bcm43xx_lock_mmio(bcm, flags); |
185 | if (bcm->ieee->iw_mode != mode) | 185 | if (bcm->initialized) { |
186 | bcm43xx_set_iwmode(bcm, mode); | 186 | if (bcm->ieee->iw_mode != mode) |
187 | bcm43xx_set_iwmode(bcm, mode); | ||
188 | } else | ||
189 | bcm->ieee->iw_mode = mode; | ||
187 | bcm43xx_unlock_mmio(bcm, flags); | 190 | bcm43xx_unlock_mmio(bcm, flags); |
188 | 191 | ||
189 | return 0; | 192 | return 0; |