From 7cbf0ba5193d1f3bb3caaa06668e22bc86776e41 Mon Sep 17 00:00:00 2001 From: Vivek Natarajan Date: Wed, 24 Dec 2008 00:34:37 -0800 Subject: [PATCH] mac80211: Cancel the power save timer in ieee80211_stop. Since the station info is flushed before calling set_disassoc in ieee80211_stop, the power save timer is never cancelled when the driver is unloaded. Hence the timer cancellation has to be done in ieee80211_stop itself. Signed-off-by: Vivek Natarajan Signed-off-by: John W. Linville --- net/mac80211/iface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 1eefc5df4954..8e0e3303ca8c 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -383,6 +383,8 @@ static int ieee80211_stop(struct net_device *dev) atomic_dec(&local->iff_promiscs); dev_mc_unsync(local->mdev, dev); + del_timer_sync(&local->dynamic_ps_timer); + cancel_work_sync(&local->dynamic_ps_enable_work); /* APs need special treatment */ if (sdata->vif.type == NL80211_IFTYPE_AP) { -- 2.11.0