Skip to content

Commit

Permalink
mac80211: Run deferred scan if last roc_list item is not started
Browse files Browse the repository at this point in the history
mac80211 scan processing could get stuck if roc work for pending, but
not started when a scan request was deferred due to such roc item.
Normally the deferred scan would be started from
ieee80211_start_next_roc(), but ieee80211_sw_roc_work() calls that only
if the finished ROC was started. Fix this by calling
ieee80211_run_deferred_scan() in the case the last ROC was not actually
started.

This issue was hit relatively easily in P2P find operations where Listen
state (remain-on-channel) and Search state (scan) are repeated in a
loop.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Jouni Malinen authored and Johannes Berg committed Sep 30, 2013
1 parent 0c5b932 commit 22c4cee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/mac80211/offchannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ void ieee80211_sw_roc_work(struct work_struct *work)

if (started)
ieee80211_start_next_roc(local);
else if (list_empty(&local->roc_list))
ieee80211_run_deferred_scan(local);
}

out_unlock:
Expand Down

0 comments on commit 22c4cee

Please sign in to comment.