* [PATCH] mac80211: complete scan work immediately if quiesced or suspended
@ 2015-01-22 21:34 Emmanuel Grumbach
2015-01-23 9:55 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Emmanuel Grumbach @ 2015-01-22 21:34 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, Luciano Coelho
From: Luciano Coelho <luciano.coelho@intel.com>
It is possible that a deferred scan is queued after the queues are
flushed in __ieee80211_suspend(). The deferred scan work may be
scheduled by ROC or ieee80211_stop_poll().
To make sure don't start a new scan while suspending, check whether
we're quiescing or suspended and complete the scan immediately if
that's the case.
Change-Id: I8ec2c8fb4d969833d45c77045b0f5594cc097086
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-on: https://gerrit.rds.intel.com/r/51405
Tested-by: IWL Jenkins
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/scan.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 7807fa4..05f0d71 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -828,6 +828,11 @@ void ieee80211_scan_work(struct work_struct *work)
mutex_lock(&local->mtx);
+ if (!ieee80211_can_run_worker(local)) {
+ aborted = true;
+ goto out_complete;
+ }
+
sdata = rcu_dereference_protected(local->scan_sdata,
lockdep_is_held(&local->mtx));
scan_req = rcu_dereference_protected(local->scan_req,
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211: complete scan work immediately if quiesced or suspended
2015-01-22 21:34 [PATCH] mac80211: complete scan work immediately if quiesced or suspended Emmanuel Grumbach
@ 2015-01-23 9:55 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-01-23 9:55 UTC (permalink / raw)
To: Emmanuel Grumbach; +Cc: linux-wireless, Luciano Coelho
On Thu, 2015-01-22 at 23:34 +0200, Emmanuel Grumbach wrote:
> From: Luciano Coelho <luciano.coelho@intel.com>
>
> It is possible that a deferred scan is queued after the queues are
> flushed in __ieee80211_suspend(). The deferred scan work may be
> scheduled by ROC or ieee80211_stop_poll().
>
> To make sure don't start a new scan while suspending, check whether
> we're quiescing or suspended and complete the scan immediately if
> that's the case.
Applied.
> Change-Id: I8ec2c8fb4d969833d45c77045b0f5594cc097086
> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
> Reviewed-on: https://gerrit.rds.intel.com/r/51405
> Tested-by: IWL Jenkins
> Reviewed-by: Johannes Berg <johannes.berg@intel.com>
With all that fixed :)
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-23 9:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-22 21:34 [PATCH] mac80211: complete scan work immediately if quiesced or suspended Emmanuel Grumbach
2015-01-23 9:55 ` Johannes Berg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.