diff options
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index f9163b12c7f1..7aa85591dbe7 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -391,6 +391,9 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
391 | u32 hw_reconf_flags = 0; | 391 | u32 hw_reconf_flags = 0; |
392 | int i; | 392 | int i; |
393 | 393 | ||
394 | if (local->scan_sdata == sdata) | ||
395 | ieee80211_scan_cancel(local); | ||
396 | |||
394 | clear_bit(SDATA_STATE_RUNNING, &sdata->state); | 397 | clear_bit(SDATA_STATE_RUNNING, &sdata->state); |
395 | 398 | ||
396 | /* | 399 | /* |
@@ -523,9 +526,6 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
523 | synchronize_rcu(); | 526 | synchronize_rcu(); |
524 | skb_queue_purge(&sdata->skb_queue); | 527 | skb_queue_purge(&sdata->skb_queue); |
525 | 528 | ||
526 | if (local->scan_sdata == sdata) | ||
527 | ieee80211_scan_cancel(local); | ||
528 | |||
529 | /* | 529 | /* |
530 | * Disable beaconing here for mesh only, AP and IBSS | 530 | * Disable beaconing here for mesh only, AP and IBSS |
531 | * are already taken care of. | 531 | * are already taken care of. |