aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r--drivers/net/wireless/b43/main.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 2b81bd6165d..a9f7148493f 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2161,7 +2161,7 @@ static bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
2161/* This is the opposite of b43_chip_init() */ 2161/* This is the opposite of b43_chip_init() */
2162static void b43_chip_exit(struct b43_wldev *dev) 2162static void b43_chip_exit(struct b43_wldev *dev)
2163{ 2163{
2164 b43_radio_turn_off(dev); 2164 b43_radio_turn_off(dev, 1);
2165 b43_leds_exit(dev); 2165 b43_leds_exit(dev);
2166 b43_gpio_cleanup(dev); 2166 b43_gpio_cleanup(dev);
2167 /* firmware is released later */ 2167 /* firmware is released later */
@@ -2269,7 +2269,7 @@ out:
2269 return err; 2269 return err;
2270 2270
2271err_radio_off: 2271err_radio_off:
2272 b43_radio_turn_off(dev); 2272 b43_radio_turn_off(dev, 1);
2273err_leds_exit: 2273err_leds_exit:
2274 b43_leds_exit(dev); 2274 b43_leds_exit(dev);
2275 b43_gpio_cleanup(dev); 2275 b43_gpio_cleanup(dev);
@@ -2358,8 +2358,7 @@ static void b43_periodic_every1sec(struct b43_wldev *dev)
2358 radio_hw_enable = b43_is_hw_radio_enabled(dev); 2358 radio_hw_enable = b43_is_hw_radio_enabled(dev);
2359 if (unlikely(dev->radio_hw_enable != radio_hw_enable)) { 2359 if (unlikely(dev->radio_hw_enable != radio_hw_enable)) {
2360 dev->radio_hw_enable = radio_hw_enable; 2360 dev->radio_hw_enable = radio_hw_enable;
2361 b43info(dev->wl, "Radio hardware status changed to %s\n", 2361 b43_rfkill_toggled(dev, radio_hw_enable);
2362 radio_hw_enable ? "ENABLED" : "DISABLED");
2363 } 2362 }
2364} 2363}
2365 2364
@@ -2850,7 +2849,7 @@ static int b43_dev_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
2850 "Press the button to turn it on.\n"); 2849 "Press the button to turn it on.\n");
2851 } 2850 }
2852 } else { 2851 } else {
2853 b43_radio_turn_off(dev); 2852 b43_radio_turn_off(dev, 0);
2854 b43info(dev->wl, "Radio turned off by software\n"); 2853 b43info(dev->wl, "Radio turned off by software\n");
2855 } 2854 }
2856 } 2855 }
@@ -3330,11 +3329,15 @@ static void b43_wireless_core_exit(struct b43_wldev *dev)
3330 return; 3329 return;
3331 b43_set_status(dev, B43_STAT_UNINIT); 3330 b43_set_status(dev, B43_STAT_UNINIT);
3332 3331
3332 mutex_unlock(&dev->wl->mutex);
3333 b43_rfkill_exit(dev);
3334 mutex_lock(&dev->wl->mutex);
3335
3333 b43_rng_exit(dev->wl); 3336 b43_rng_exit(dev->wl);
3334 b43_pio_free(dev); 3337 b43_pio_free(dev);
3335 b43_dma_free(dev); 3338 b43_dma_free(dev);
3336 b43_chip_exit(dev); 3339 b43_chip_exit(dev);
3337 b43_radio_turn_off(dev); 3340 b43_radio_turn_off(dev, 1);
3338 b43_switch_analog(dev, 0); 3341 b43_switch_analog(dev, 0);
3339 if (phy->dyn_tssi_tbl) 3342 if (phy->dyn_tssi_tbl)
3340 kfree(phy->tssi2dbm); 3343 kfree(phy->tssi2dbm);
@@ -3458,6 +3461,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
3458 memset(wl->mac_addr, 0, ETH_ALEN); 3461 memset(wl->mac_addr, 0, ETH_ALEN);
3459 b43_upload_card_macaddress(dev); 3462 b43_upload_card_macaddress(dev);
3460 b43_security_init(dev); 3463 b43_security_init(dev);
3464 b43_rfkill_init(dev);
3461 b43_rng_init(wl); 3465 b43_rng_init(wl);
3462 3466
3463 b43_set_status(dev, B43_STAT_INITIALIZED); 3467 b43_set_status(dev, B43_STAT_INITIALIZED);
@@ -3802,7 +3806,7 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
3802 wl->current_dev = dev; 3806 wl->current_dev = dev;
3803 INIT_WORK(&dev->restart_work, b43_chip_reset); 3807 INIT_WORK(&dev->restart_work, b43_chip_reset);
3804 3808
3805 b43_radio_turn_off(dev); 3809 b43_radio_turn_off(dev, 1);
3806 b43_switch_analog(dev, 0); 3810 b43_switch_analog(dev, 0);
3807 ssb_device_disable(dev->dev, 0); 3811 ssb_device_disable(dev->dev, 0);
3808 ssb_bus_may_powerdown(bus); 3812 ssb_bus_may_powerdown(bus);