diff options
-rw-r--r-- | net/mac80211/scan.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 71500f1dddbc..db122e4e60e5 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -587,15 +587,21 @@ void ieee80211_scan_work(struct work_struct *work) | |||
587 | return; | 587 | return; |
588 | } | 588 | } |
589 | 589 | ||
590 | switch (local->scan_state) { | 590 | /* |
591 | case SCAN_SET_CHANNEL: | 591 | * as long as no delay is required advance immediately |
592 | if (ieee80211_scan_state_set_channel(local, &next_delay)) | 592 | * without scheduling a new work |
593 | return; | 593 | */ |
594 | break; | 594 | do { |
595 | case SCAN_SEND_PROBE: | 595 | switch (local->scan_state) { |
596 | ieee80211_scan_state_send_probe(local, &next_delay); | 596 | case SCAN_SET_CHANNEL: |
597 | break; | 597 | if (ieee80211_scan_state_set_channel(local, &next_delay)) |
598 | } | 598 | return; |
599 | break; | ||
600 | case SCAN_SEND_PROBE: | ||
601 | ieee80211_scan_state_send_probe(local, &next_delay); | ||
602 | break; | ||
603 | } | ||
604 | } while (next_delay == 0); | ||
599 | 605 | ||
600 | queue_delayed_work(local->hw.workqueue, &local->scan_work, | 606 | queue_delayed_work(local->hw.workqueue, &local->scan_work, |
601 | next_delay); | 607 | next_delay); |