diff options
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index b161301056df..f6005adcbf90 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -277,11 +277,6 @@ static int ieee80211_open(struct net_device *dev) | |||
277 | } | 277 | } |
278 | } | 278 | } |
279 | 279 | ||
280 | if (local->open_count == 0) { | ||
281 | tasklet_enable(&local->tx_pending_tasklet); | ||
282 | tasklet_enable(&local->tasklet); | ||
283 | } | ||
284 | |||
285 | /* | 280 | /* |
286 | * set_multicast_list will be invoked by the networking core | 281 | * set_multicast_list will be invoked by the networking core |
287 | * which will check whether any increments here were done in | 282 | * which will check whether any increments here were done in |
@@ -502,30 +497,8 @@ static int ieee80211_stop(struct net_device *dev) | |||
502 | } | 497 | } |
503 | /* fall through */ | 498 | /* fall through */ |
504 | default: | 499 | default: |
505 | if (local->scan_sdata == sdata) { | 500 | if (local->scan_sdata == sdata) |
506 | if (!local->ops->hw_scan) | 501 | ieee80211_scan_cancel(local); |
507 | cancel_delayed_work_sync(&local->scan_work); | ||
508 | /* | ||
509 | * The software scan can no longer run now, so we can | ||
510 | * clear out the scan_sdata reference. However, the | ||
511 | * hardware scan may still be running. The complete | ||
512 | * function must be prepared to handle a NULL value. | ||
513 | */ | ||
514 | local->scan_sdata = NULL; | ||
515 | /* | ||
516 | * The memory barrier guarantees that another CPU | ||
517 | * that is hardware-scanning will now see the fact | ||
518 | * that this interface is gone. | ||
519 | */ | ||
520 | smp_mb(); | ||
521 | /* | ||
522 | * If software scanning, complete the scan but since | ||
523 | * the scan_sdata is NULL already don't send out a | ||
524 | * scan event to userspace -- the scan is incomplete. | ||
525 | */ | ||
526 | if (test_bit(SCAN_SW_SCANNING, &local->scanning)) | ||
527 | ieee80211_scan_completed(&local->hw, true); | ||
528 | } | ||
529 | 502 | ||
530 | /* | 503 | /* |
531 | * Disable beaconing for AP and mesh, IBSS can't | 504 | * Disable beaconing for AP and mesh, IBSS can't |
@@ -552,14 +525,8 @@ static int ieee80211_stop(struct net_device *dev) | |||
552 | ieee80211_recalc_ps(local, -1); | 525 | ieee80211_recalc_ps(local, -1); |
553 | 526 | ||
554 | if (local->open_count == 0) { | 527 | if (local->open_count == 0) { |
555 | drv_stop(local); | 528 | ieee80211_clear_tx_pending(local); |
556 | 529 | ieee80211_stop_device(local); | |
557 | ieee80211_led_radio(local, false); | ||
558 | |||
559 | flush_workqueue(local->workqueue); | ||
560 | |||
561 | tasklet_disable(&local->tx_pending_tasklet); | ||
562 | tasklet_disable(&local->tasklet); | ||
563 | 530 | ||
564 | /* no reconfiguring after stop! */ | 531 | /* no reconfiguring after stop! */ |
565 | hw_reconf_flags = 0; | 532 | hw_reconf_flags = 0; |