Commit f502d09b authored by Helmut Schaa's avatar Helmut Schaa Committed by John W. Linville

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: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7d3be3cc
...@@ -587,15 +587,21 @@ void ieee80211_scan_work(struct work_struct *work) ...@@ -587,15 +587,21 @@ void ieee80211_scan_work(struct work_struct *work)
return; return;
} }
switch (local->scan_state) { /*
case SCAN_SET_CHANNEL: * as long as no delay is required advance immediately
if (ieee80211_scan_state_set_channel(local, &next_delay)) * without scheduling a new work
return; */
break; do {
case SCAN_SEND_PROBE: switch (local->scan_state) {
ieee80211_scan_state_send_probe(local, &next_delay); case SCAN_SET_CHANNEL:
break; if (ieee80211_scan_state_set_channel(local, &next_delay))
} return;
break;
case SCAN_SEND_PROBE:
ieee80211_scan_state_send_probe(local, &next_delay);
break;
}
} while (next_delay == 0);
queue_delayed_work(local->hw.workqueue, &local->scan_work, queue_delayed_work(local->hw.workqueue, &local->scan_work,
next_delay); next_delay);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment