diff options
Diffstat (limited to 'drivers/net/wireless/b43legacy/main.c')
-rw-r--r-- | drivers/net/wireless/b43legacy/main.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index f6f3fbf0a2f4..e5136fb65ddd 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -3431,11 +3431,6 @@ static int b43legacy_op_start(struct ieee80211_hw *hw) | |||
3431 | struct b43legacy_wldev *dev = wl->current_dev; | 3431 | struct b43legacy_wldev *dev = wl->current_dev; |
3432 | int did_init = 0; | 3432 | int did_init = 0; |
3433 | int err = 0; | 3433 | int err = 0; |
3434 | bool do_rfkill_exit = 0; | ||
3435 | |||
3436 | /* First register RFkill. | ||
3437 | * LEDs that are registered later depend on it. */ | ||
3438 | b43legacy_rfkill_init(dev); | ||
3439 | 3434 | ||
3440 | /* Kill all old instance specific information to make sure | 3435 | /* Kill all old instance specific information to make sure |
3441 | * the card won't use it in the short timeframe between start | 3436 | * the card won't use it in the short timeframe between start |
@@ -3451,10 +3446,8 @@ static int b43legacy_op_start(struct ieee80211_hw *hw) | |||
3451 | 3446 | ||
3452 | if (b43legacy_status(dev) < B43legacy_STAT_INITIALIZED) { | 3447 | if (b43legacy_status(dev) < B43legacy_STAT_INITIALIZED) { |
3453 | err = b43legacy_wireless_core_init(dev); | 3448 | err = b43legacy_wireless_core_init(dev); |
3454 | if (err) { | 3449 | if (err) |
3455 | do_rfkill_exit = 1; | ||
3456 | goto out_mutex_unlock; | 3450 | goto out_mutex_unlock; |
3457 | } | ||
3458 | did_init = 1; | 3451 | did_init = 1; |
3459 | } | 3452 | } |
3460 | 3453 | ||
@@ -3463,17 +3456,15 @@ static int b43legacy_op_start(struct ieee80211_hw *hw) | |||
3463 | if (err) { | 3456 | if (err) { |
3464 | if (did_init) | 3457 | if (did_init) |
3465 | b43legacy_wireless_core_exit(dev); | 3458 | b43legacy_wireless_core_exit(dev); |
3466 | do_rfkill_exit = 1; | ||
3467 | goto out_mutex_unlock; | 3459 | goto out_mutex_unlock; |
3468 | } | 3460 | } |
3469 | } | 3461 | } |
3470 | 3462 | ||
3463 | wiphy_rfkill_start_polling(hw->wiphy); | ||
3464 | |||
3471 | out_mutex_unlock: | 3465 | out_mutex_unlock: |
3472 | mutex_unlock(&wl->mutex); | 3466 | mutex_unlock(&wl->mutex); |
3473 | 3467 | ||
3474 | if (do_rfkill_exit) | ||
3475 | b43legacy_rfkill_exit(dev); | ||
3476 | |||
3477 | return err; | 3468 | return err; |
3478 | } | 3469 | } |
3479 | 3470 | ||
@@ -3482,7 +3473,6 @@ static void b43legacy_op_stop(struct ieee80211_hw *hw) | |||
3482 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); | 3473 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); |
3483 | struct b43legacy_wldev *dev = wl->current_dev; | 3474 | struct b43legacy_wldev *dev = wl->current_dev; |
3484 | 3475 | ||
3485 | b43legacy_rfkill_exit(dev); | ||
3486 | cancel_work_sync(&(wl->beacon_update_trigger)); | 3476 | cancel_work_sync(&(wl->beacon_update_trigger)); |
3487 | 3477 | ||
3488 | mutex_lock(&wl->mutex); | 3478 | mutex_lock(&wl->mutex); |
@@ -3518,6 +3508,7 @@ static const struct ieee80211_ops b43legacy_hw_ops = { | |||
3518 | .start = b43legacy_op_start, | 3508 | .start = b43legacy_op_start, |
3519 | .stop = b43legacy_op_stop, | 3509 | .stop = b43legacy_op_stop, |
3520 | .set_tim = b43legacy_op_beacon_set_tim, | 3510 | .set_tim = b43legacy_op_beacon_set_tim, |
3511 | .rfkill_poll = b43legacy_rfkill_poll, | ||
3521 | }; | 3512 | }; |
3522 | 3513 | ||
3523 | /* Hard-reset the chip. Do not call this directly. | 3514 | /* Hard-reset the chip. Do not call this directly. |