aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2009-07-23 06:13:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-27 15:24:16 -0400
commitf502d09b750437a4ec9c63333acf1070fe7958af (patch)
treea15742067ed116f4404982159e3a05dc7899c28f
parent7d3be3cc489176bc7bd23e673b0b4aef597af2b3 (diff)
mac80211: advance the state machine immediately if no delay is needed
Instead of queueing the scan work again without delay just process the next state immediately. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/scan.c24
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);