aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-07-03 13:02:44 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-07-07 15:31:39 -0400
commitea0c925370b33baf168bb33782c613468c1aa119 (patch)
tree3a1c0edb45895a289c5e3e36a85c8fb57439e3ee /net/mac80211
parent8db9369ff92b1cd93566baadd8bd2992f025fdd0 (diff)
mac80211: Only flush workqueue when last interface was removed
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> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 98c0b5e56ecc..df0836ff1a20 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -530,8 +530,6 @@ static int ieee80211_stop(struct net_device *dev)
530 local->sta_hw_scanning = 0; 530 local->sta_hw_scanning = 0;
531 } 531 }
532 532
533 flush_workqueue(local->hw.workqueue);
534
535 sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED; 533 sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED;
536 kfree(sdata->u.sta.extra_ie); 534 kfree(sdata->u.sta.extra_ie);
537 sdata->u.sta.extra_ie = NULL; 535 sdata->u.sta.extra_ie = NULL;
@@ -555,6 +553,8 @@ static int ieee80211_stop(struct net_device *dev)
555 553
556 ieee80211_led_radio(local, 0); 554 ieee80211_led_radio(local, 0);
557 555
556 flush_workqueue(local->hw.workqueue);
557
558 tasklet_disable(&local->tx_pending_tasklet); 558 tasklet_disable(&local->tx_pending_tasklet);
559 tasklet_disable(&local->tasklet); 559 tasklet_disable(&local->tasklet);
560 } 560 }