diff mbox

[wireless-next] mac80211: fix double flush workqueue

Message ID 1431671210-6761-1-git-send-email-varkab@cdac.in (mailing list archive)
State Rejected
Delegated to: Johannes Berg
Headers show

Commit Message

Varka Bhadram May 15, 2015, 6:26 a.m. UTC
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 <varkab@cdac.in>
---
 net/mac80211/pm.c |    2 --
 1 file changed, 2 deletions(-)

Comments

Johannes Berg May 19, 2015, 7:26 a.m. UTC | #1
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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Varka Bhadram May 25, 2015, 4:02 a.m. UTC | #2
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.

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Johannes Berg May 26, 2015, 1:16 p.m. UTC | #3
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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);