Skip to content

Commit

Permalink
mac80211: Only flush workqueue when last interface was removed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ivo van Doorn authored and John W. Linville committed Jul 7, 2008
1 parent 8db9369 commit ea0c925
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,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;
Expand All @@ -555,6 +553,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);
}
Expand Down

0 comments on commit ea0c925

Please sign in to comment.