diff options
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r-- | net/mac80211/ieee80211.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 6378850d8580..4f8b6653e364 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -350,11 +350,14 @@ static int ieee80211_stop(struct net_device *dev) | |||
350 | synchronize_rcu(); | 350 | synchronize_rcu(); |
351 | skb_queue_purge(&sdata->u.sta.skb_queue); | 351 | skb_queue_purge(&sdata->u.sta.skb_queue); |
352 | 352 | ||
353 | if (!local->ops->hw_scan && | 353 | if (local->scan_dev == sdata->dev) { |
354 | local->scan_dev == sdata->dev) { | 354 | if (!local->ops->hw_scan) { |
355 | local->sta_scanning = 0; | 355 | local->sta_sw_scanning = 0; |
356 | cancel_delayed_work(&local->scan_work); | 356 | cancel_delayed_work(&local->scan_work); |
357 | } else | ||
358 | local->sta_hw_scanning = 0; | ||
357 | } | 359 | } |
360 | |||
358 | flush_workqueue(local->hw.workqueue); | 361 | flush_workqueue(local->hw.workqueue); |
359 | 362 | ||
360 | sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED; | 363 | sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED; |
@@ -526,7 +529,7 @@ int ieee80211_hw_config(struct ieee80211_local *local) | |||
526 | struct ieee80211_channel *chan; | 529 | struct ieee80211_channel *chan; |
527 | int ret = 0; | 530 | int ret = 0; |
528 | 531 | ||
529 | if (local->sta_scanning) { | 532 | if (local->sta_sw_scanning) { |
530 | chan = local->scan_channel; | 533 | chan = local->scan_channel; |
531 | mode = local->scan_hw_mode; | 534 | mode = local->scan_hw_mode; |
532 | } else { | 535 | } else { |