diff options
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 88d2c15d3fbe..64c154d080d8 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -3532,8 +3532,6 @@ static int b43_wireless_core_init(struct b43_wldev *dev) | |||
3532 | b43_bluetooth_coext_enable(dev); | 3532 | b43_bluetooth_coext_enable(dev); |
3533 | 3533 | ||
3534 | ssb_bus_powerup(bus, 1); /* Enable dynamic PCTL */ | 3534 | ssb_bus_powerup(bus, 1); /* Enable dynamic PCTL */ |
3535 | memset(wl->bssid, 0, ETH_ALEN); | ||
3536 | memset(wl->mac_addr, 0, ETH_ALEN); | ||
3537 | b43_upload_card_macaddress(dev); | 3535 | b43_upload_card_macaddress(dev); |
3538 | b43_security_init(dev); | 3536 | b43_security_init(dev); |
3539 | b43_rng_init(wl); | 3537 | b43_rng_init(wl); |
@@ -3630,6 +3628,15 @@ static int b43_op_start(struct ieee80211_hw *hw) | |||
3630 | struct b43_wldev *dev = wl->current_dev; | 3628 | struct b43_wldev *dev = wl->current_dev; |
3631 | int did_init = 0; | 3629 | int did_init = 0; |
3632 | int err = 0; | 3630 | int err = 0; |
3631 | bool do_rfkill_exit = 0; | ||
3632 | |||
3633 | /* Kill all old instance specific information to make sure | ||
3634 | * the card won't use it in the short timeframe between start | ||
3635 | * and mac80211 reconfiguring it. */ | ||
3636 | memset(wl->bssid, 0, ETH_ALEN); | ||
3637 | memset(wl->mac_addr, 0, ETH_ALEN); | ||
3638 | wl->filter_flags = 0; | ||
3639 | wl->radiotap_enabled = 0; | ||
3633 | 3640 | ||
3634 | /* First register RFkill. | 3641 | /* First register RFkill. |
3635 | * LEDs that are registered later depend on it. */ | 3642 | * LEDs that are registered later depend on it. */ |
@@ -3639,8 +3646,10 @@ static int b43_op_start(struct ieee80211_hw *hw) | |||
3639 | 3646 | ||
3640 | if (b43_status(dev) < B43_STAT_INITIALIZED) { | 3647 | if (b43_status(dev) < B43_STAT_INITIALIZED) { |
3641 | err = b43_wireless_core_init(dev); | 3648 | err = b43_wireless_core_init(dev); |
3642 | if (err) | 3649 | if (err) { |
3650 | do_rfkill_exit = 1; | ||
3643 | goto out_mutex_unlock; | 3651 | goto out_mutex_unlock; |
3652 | } | ||
3644 | did_init = 1; | 3653 | did_init = 1; |
3645 | } | 3654 | } |
3646 | 3655 | ||
@@ -3649,6 +3658,7 @@ static int b43_op_start(struct ieee80211_hw *hw) | |||
3649 | if (err) { | 3658 | if (err) { |
3650 | if (did_init) | 3659 | if (did_init) |
3651 | b43_wireless_core_exit(dev); | 3660 | b43_wireless_core_exit(dev); |
3661 | do_rfkill_exit = 1; | ||
3652 | goto out_mutex_unlock; | 3662 | goto out_mutex_unlock; |
3653 | } | 3663 | } |
3654 | } | 3664 | } |
@@ -3656,6 +3666,9 @@ static int b43_op_start(struct ieee80211_hw *hw) | |||
3656 | out_mutex_unlock: | 3666 | out_mutex_unlock: |
3657 | mutex_unlock(&wl->mutex); | 3667 | mutex_unlock(&wl->mutex); |
3658 | 3668 | ||
3669 | if (do_rfkill_exit) | ||
3670 | b43_rfkill_exit(dev); | ||
3671 | |||
3659 | return err; | 3672 | return err; |
3660 | } | 3673 | } |
3661 | 3674 | ||