diff options
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index b45eecc53c4a..1c93b4f4bfe3 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -2163,7 +2163,6 @@ static void b43_mgmtframe_txantenna(struct b43_wldev *dev, int antenna) | |||
2163 | static void b43_chip_exit(struct b43_wldev *dev) | 2163 | static void b43_chip_exit(struct b43_wldev *dev) |
2164 | { | 2164 | { |
2165 | b43_radio_turn_off(dev, 1); | 2165 | b43_radio_turn_off(dev, 1); |
2166 | b43_leds_exit(dev); | ||
2167 | b43_gpio_cleanup(dev); | 2166 | b43_gpio_cleanup(dev); |
2168 | /* firmware is released later */ | 2167 | /* firmware is released later */ |
2169 | } | 2168 | } |
@@ -2191,11 +2190,10 @@ static int b43_chip_init(struct b43_wldev *dev) | |||
2191 | err = b43_gpio_init(dev); | 2190 | err = b43_gpio_init(dev); |
2192 | if (err) | 2191 | if (err) |
2193 | goto out; /* firmware is released later */ | 2192 | goto out; /* firmware is released later */ |
2194 | b43_leds_init(dev); | ||
2195 | 2193 | ||
2196 | err = b43_upload_initvals(dev); | 2194 | err = b43_upload_initvals(dev); |
2197 | if (err) | 2195 | if (err) |
2198 | goto err_leds_exit; | 2196 | goto err_gpio_clean; |
2199 | b43_radio_turn_on(dev); | 2197 | b43_radio_turn_on(dev); |
2200 | 2198 | ||
2201 | b43_write16(dev, 0x03E6, 0x0000); | 2199 | b43_write16(dev, 0x03E6, 0x0000); |
@@ -2271,8 +2269,7 @@ out: | |||
2271 | 2269 | ||
2272 | err_radio_off: | 2270 | err_radio_off: |
2273 | b43_radio_turn_off(dev, 1); | 2271 | b43_radio_turn_off(dev, 1); |
2274 | err_leds_exit: | 2272 | err_gpio_clean: |
2275 | b43_leds_exit(dev); | ||
2276 | b43_gpio_cleanup(dev); | 2273 | b43_gpio_cleanup(dev); |
2277 | return err; | 2274 | return err; |
2278 | } | 2275 | } |
@@ -3273,10 +3270,7 @@ static void b43_wireless_core_exit(struct b43_wldev *dev) | |||
3273 | return; | 3270 | return; |
3274 | b43_set_status(dev, B43_STAT_UNINIT); | 3271 | b43_set_status(dev, B43_STAT_UNINIT); |
3275 | 3272 | ||
3276 | mutex_unlock(&dev->wl->mutex); | 3273 | b43_leds_exit(dev); |
3277 | b43_rfkill_exit(dev); | ||
3278 | mutex_lock(&dev->wl->mutex); | ||
3279 | |||
3280 | b43_rng_exit(dev->wl); | 3274 | b43_rng_exit(dev->wl); |
3281 | b43_pio_free(dev); | 3275 | b43_pio_free(dev); |
3282 | b43_dma_free(dev); | 3276 | b43_dma_free(dev); |
@@ -3405,12 +3399,12 @@ static int b43_wireless_core_init(struct b43_wldev *dev) | |||
3405 | memset(wl->mac_addr, 0, ETH_ALEN); | 3399 | memset(wl->mac_addr, 0, ETH_ALEN); |
3406 | b43_upload_card_macaddress(dev); | 3400 | b43_upload_card_macaddress(dev); |
3407 | b43_security_init(dev); | 3401 | b43_security_init(dev); |
3408 | b43_rfkill_init(dev); | ||
3409 | b43_rng_init(wl); | 3402 | b43_rng_init(wl); |
3410 | 3403 | ||
3411 | b43_set_status(dev, B43_STAT_INITIALIZED); | 3404 | b43_set_status(dev, B43_STAT_INITIALIZED); |
3412 | 3405 | ||
3413 | out: | 3406 | b43_leds_init(dev); |
3407 | out: | ||
3414 | return err; | 3408 | return err; |
3415 | 3409 | ||
3416 | err_chip_exit: | 3410 | err_chip_exit: |
@@ -3499,6 +3493,10 @@ static int b43_start(struct ieee80211_hw *hw) | |||
3499 | int did_init = 0; | 3493 | int did_init = 0; |
3500 | int err = 0; | 3494 | int err = 0; |
3501 | 3495 | ||
3496 | /* First register RFkill. | ||
3497 | * LEDs that are registered later depend on it. */ | ||
3498 | b43_rfkill_init(dev); | ||
3499 | |||
3502 | mutex_lock(&wl->mutex); | 3500 | mutex_lock(&wl->mutex); |
3503 | 3501 | ||
3504 | if (b43_status(dev) < B43_STAT_INITIALIZED) { | 3502 | if (b43_status(dev) < B43_STAT_INITIALIZED) { |
@@ -3528,6 +3526,8 @@ static void b43_stop(struct ieee80211_hw *hw) | |||
3528 | struct b43_wl *wl = hw_to_b43_wl(hw); | 3526 | struct b43_wl *wl = hw_to_b43_wl(hw); |
3529 | struct b43_wldev *dev = wl->current_dev; | 3527 | struct b43_wldev *dev = wl->current_dev; |
3530 | 3528 | ||
3529 | b43_rfkill_exit(dev); | ||
3530 | |||
3531 | mutex_lock(&wl->mutex); | 3531 | mutex_lock(&wl->mutex); |
3532 | if (b43_status(dev) >= B43_STAT_STARTED) | 3532 | if (b43_status(dev) >= B43_STAT_STARTED) |
3533 | b43_wireless_core_stop(dev); | 3533 | b43_wireless_core_stop(dev); |