* [PATCH] mac80211: Run deferred scan if last roc_list item is not started
@ 2013-09-30 9:36 Jouni Malinen
2013-09-30 10:37 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Jouni Malinen @ 2013-09-30 9:36 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
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>
---
net/mac80211/offchannel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index acd1f71..0c2a294 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -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:
--
1.7.9.5
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211: Run deferred scan if last roc_list item is not started
2013-09-30 9:36 [PATCH] mac80211: Run deferred scan if last roc_list item is not started Jouni Malinen
@ 2013-09-30 10:37 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2013-09-30 10:37 UTC (permalink / raw)
To: Jouni Malinen; +Cc: linux-wireless
On Mon, 2013-09-30 at 12:36 +0300, Jouni Malinen wrote:
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-30 10:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-30 9:36 [PATCH] mac80211: Run deferred scan if last roc_list item is not started Jouni Malinen
2013-09-30 10:37 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox