Skip to contentSkip to conversation

mac80211: Run deferred scan if last roc_list item is not started

PATCH Applied Jouni Malinen 2 participants 2 messages Sep 30, 2013 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: Run deferred scan if last roc_list item is not started

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.

---
 net/mac80211/offchannel.c |    2 ++
 1 file changed, 2 insertions(+)
net/mac80211/offchannel.c +2 -0
index acd1f71..0c2a294 100644
@@ -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:
Signature · 5 lines
1.7.9.5


-- 
Jouni Malinen                                            PGP id EFC895FA
maintainer Applied
#1 lore raw
Quoted 11 lines · Jouni Malinen

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.

Applied.

johannes