2015-05-15 06:27:25

by Varka Bhadram

[permalink] [raw]
Subject: [PATCH wireless-next] mac80211: fix double flush workqueue

In suspend functionality flushing of the workqueue is done
with ieee80211_stop_device(). This patch avoid flushing
the workqueue for two times.

Signed-off-by: Varka Bhadram <[email protected]>
---
net/mac80211/pm.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index ac6ad62..e433d6e 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -47,8 +47,6 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
/* make quiescing visible to timers everywhere */
mb();

- flush_workqueue(local->workqueue);
-
/* Don't try to run timers while suspended. */
del_timer_sync(&local->sta_cleanup);

--
1.7.9.5



2015-05-26 13:16:44

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH wireless-next] mac80211: fix double flush workqueue

On Mon, 2015-05-25 at 09:32 +0530, Varka Bhadram wrote:

> Initially flushing of workqueue is done at [1], and also flushing of the same workqueue
> has done with ieee80211_stop_device() at [2].
>
> [1]:https://git.kernel.org/cgit/linux/kernel/git/jberg/mac80211-next.git/tree/net/mac80211/pm.c#n50
> [2]:https://git.kernel.org/cgit/linux/kernel/git/jberg/mac80211-next.git/tree/net/mac80211/pm.c#n154

I *know*, I wrote much of this code. But there are so many things
between these two points that you'll have to try FAR harder to convince
me that removing any one these calls is actually a good idea.

johannes


2015-05-25 04:02:41

by Varka Bhadram

[permalink] [raw]
Subject: Re: [PATCH wireless-next] mac80211: fix double flush workqueue

Hi Johannes Berg,

On 05/19/2015 12:56 PM, Johannes Berg wrote:

> On Fri, 2015-05-15 at 11:56 +0530, Varka Bhadram wrote:
>> In suspend functionality flushing of the workqueue is done
>> with ieee80211_stop_device(). This patch avoid flushing
>> the workqueue for two times.
> Why do you think this makes sense?
>
> This is done in entirely different places in the code.

Initially flushing of workqueue is done at [1], and also flushing of the same workqueue
has done with ieee80211_stop_device() at [2].

[1]:https://git.kernel.org/cgit/linux/kernel/git/jberg/mac80211-next.git/tree/net/mac80211/pm.c#n50
[2]:https://git.kernel.org/cgit/linux/kernel/git/jberg/mac80211-next.git/tree/net/mac80211/pm.c#n154

--
Thanks,
Varka Bhadram.


2015-05-19 07:26:33

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH wireless-next] mac80211: fix double flush workqueue

On Fri, 2015-05-15 at 11:56 +0530, Varka Bhadram wrote:
> In suspend functionality flushing of the workqueue is done
> with ieee80211_stop_device(). This patch avoid flushing
> the workqueue for two times.

Why do you think this makes sense?

This is done in entirely different places in the code.

johannes