Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+15 −9
Original line number Diff line number Diff line
@@ -587,6 +587,11 @@ void ieee80211_scan_work(struct work_struct *work)
		return;
	}

	/*
	 * as long as no delay is required advance immediately
	 * without scheduling a new work
	 */
	do {
		switch (local->scan_state) {
		case SCAN_SET_CHANNEL:
			if (ieee80211_scan_state_set_channel(local, &next_delay))
@@ -596,6 +601,7 @@ void ieee80211_scan_work(struct work_struct *work)
			ieee80211_scan_state_send_probe(local, &next_delay);
			break;
		}
	} while (next_delay == 0);

	queue_delayed_work(local->hw.workqueue, &local->scan_work,
			   next_delay);