diff options
Diffstat (limited to 'net/mac80211/scan.c')
| -rw-r--r-- | net/mac80211/scan.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index ae842678b629..05f0d711b6d8 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
| @@ -416,7 +416,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local, | |||
| 416 | ieee80211_offchannel_stop_vifs(local); | 416 | ieee80211_offchannel_stop_vifs(local); |
| 417 | 417 | ||
| 418 | /* ensure nullfunc is transmitted before leaving operating channel */ | 418 | /* ensure nullfunc is transmitted before leaving operating channel */ |
| 419 | ieee80211_flush_queues(local, NULL); | 419 | ieee80211_flush_queues(local, NULL, false); |
| 420 | 420 | ||
| 421 | ieee80211_configure_filter(local); | 421 | ieee80211_configure_filter(local); |
| 422 | 422 | ||
| @@ -432,7 +432,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local, | |||
| 432 | static bool ieee80211_can_scan(struct ieee80211_local *local, | 432 | static bool ieee80211_can_scan(struct ieee80211_local *local, |
| 433 | struct ieee80211_sub_if_data *sdata) | 433 | struct ieee80211_sub_if_data *sdata) |
| 434 | { | 434 | { |
| 435 | if (local->radar_detect_enabled) | 435 | if (ieee80211_is_radar_required(local)) |
| 436 | return false; | 436 | return false; |
| 437 | 437 | ||
| 438 | if (!list_empty(&local->roc_list)) | 438 | if (!list_empty(&local->roc_list)) |
| @@ -505,7 +505,7 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, | |||
| 505 | 505 | ||
| 506 | lockdep_assert_held(&local->mtx); | 506 | lockdep_assert_held(&local->mtx); |
| 507 | 507 | ||
| 508 | if (local->scan_req) | 508 | if (local->scan_req || ieee80211_is_radar_required(local)) |
| 509 | return -EBUSY; | 509 | return -EBUSY; |
| 510 | 510 | ||
| 511 | if (!ieee80211_can_scan(local, sdata)) { | 511 | if (!ieee80211_can_scan(local, sdata)) { |
| @@ -805,7 +805,7 @@ static void ieee80211_scan_state_resume(struct ieee80211_local *local, | |||
| 805 | ieee80211_offchannel_stop_vifs(local); | 805 | ieee80211_offchannel_stop_vifs(local); |
| 806 | 806 | ||
| 807 | if (local->ops->flush) { | 807 | if (local->ops->flush) { |
| 808 | ieee80211_flush_queues(local, NULL); | 808 | ieee80211_flush_queues(local, NULL, false); |
| 809 | *next_delay = 0; | 809 | *next_delay = 0; |
| 810 | } else | 810 | } else |
| 811 | *next_delay = HZ / 10; | 811 | *next_delay = HZ / 10; |
| @@ -828,6 +828,11 @@ void ieee80211_scan_work(struct work_struct *work) | |||
| 828 | 828 | ||
| 829 | mutex_lock(&local->mtx); | 829 | mutex_lock(&local->mtx); |
| 830 | 830 | ||
| 831 | if (!ieee80211_can_run_worker(local)) { | ||
| 832 | aborted = true; | ||
| 833 | goto out_complete; | ||
| 834 | } | ||
| 835 | |||
| 831 | sdata = rcu_dereference_protected(local->scan_sdata, | 836 | sdata = rcu_dereference_protected(local->scan_sdata, |
| 832 | lockdep_is_held(&local->mtx)); | 837 | lockdep_is_held(&local->mtx)); |
| 833 | scan_req = rcu_dereference_protected(local->scan_req, | 838 | scan_req = rcu_dereference_protected(local->scan_req, |
