Skip to contentSkip to conversation

mac80211: Cancel the power save timer in ieee80211_stop.

PATCH New Vivek Natarajan 1 participant 1 message Dec 23, 2008 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 net/mac80211/iface.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
net/mac80211/iface.c +2 -0
index 5abbc3f..cf45314 100644
@@ -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) {
Signature · 1 line
1.6.0.1