* [PATCH] mac80211: Only flush workqueue when last interface was removed
@ 2008-07-03 17:02 Ivo van Doorn
2008-07-03 17:08 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Ivo van Doorn @ 2008-07-03 17:02 UTC (permalink / raw)
To: John Linville, Johannes Berg, linux-wireless
Currently the ieee80211_hw->workqueue is flushed each time
an interface is being removed. However most scheduled work
is not interface specific but device specific, for example things like
periodic work for link tuners.
This patch will move the flush_workqueue() call to directly behind
the call to ops->stop() to make sure the workqueue is only flushed
when all interfaces are gone and there really shouldn't be any scheduled
work in the drivers left.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 074f71a..577845e 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -533,8 +533,6 @@ static int ieee80211_stop(struct net_device *dev)
local->sta_hw_scanning = 0;
}
- flush_workqueue(local->hw.workqueue);
-
sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED;
kfree(sdata->u.sta.extra_ie);
sdata->u.sta.extra_ie = NULL;
@@ -558,6 +556,8 @@ static int ieee80211_stop(struct net_device *dev)
ieee80211_led_radio(local, 0);
+ flush_workqueue(local->hw.workqueue);
+
tasklet_disable(&local->tx_pending_tasklet);
tasklet_disable(&local->tasklet);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211: Only flush workqueue when last interface was removed
2008-07-03 17:02 [PATCH] mac80211: Only flush workqueue when last interface was removed Ivo van Doorn
@ 2008-07-03 17:08 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2008-07-03 17:08 UTC (permalink / raw)
To: Ivo van Doorn; +Cc: John Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]
On Thu, 2008-07-03 at 19:02 +0200, Ivo van Doorn wrote:
> Currently the ieee80211_hw->workqueue is flushed each time
> an interface is being removed. However most scheduled work
> is not interface specific but device specific, for example things like
> periodic work for link tuners.
>
> This patch will move the flush_workqueue() call to directly behind
> the call to ops->stop() to make sure the workqueue is only flushed
> when all interfaces are gone and there really shouldn't be any scheduled
> work in the drivers left.
Yeah I think that's what we always wanted.
> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> diff --git a/net/mac80211/main.c b/net/mac80211/main.c
> index 074f71a..577845e 100644
> --- a/net/mac80211/main.c
> +++ b/net/mac80211/main.c
> @@ -533,8 +533,6 @@ static int ieee80211_stop(struct net_device *dev)
> local->sta_hw_scanning = 0;
> }
>
> - flush_workqueue(local->hw.workqueue);
> -
> sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED;
> kfree(sdata->u.sta.extra_ie);
> sdata->u.sta.extra_ie = NULL;
> @@ -558,6 +556,8 @@ static int ieee80211_stop(struct net_device *dev)
>
> ieee80211_led_radio(local, 0);
>
> + flush_workqueue(local->hw.workqueue);
> +
> tasklet_disable(&local->tx_pending_tasklet);
> tasklet_disable(&local->tasklet);
> }
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-03 17:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-03 17:02 [PATCH] mac80211: Only flush workqueue when last interface was removed Ivo van Doorn
2008-07-03 17:08 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).