Skip to contentSkip to conversation

mac80211: Cancel the dynamic ps timer in ioctl_siwpower.

PATCH In review Vivek Natarajan 3 participants 3 messages Jan 27, 2009 – Jan 29, 2009 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: Cancel the dynamic ps timer in ioctl_siwpower.

If the dynamic power save timer has been started before the power save is disabled using iwconfig, we fail to cancel the timer. Hence cancel it while disabling power save.

---
 net/mac80211/wext.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
net/mac80211/wext.c +2 -0
index 70a29b6..5c88b82 100644
@@ -906,6 +906,8 @@ static int ieee80211_ioctl_siwpower(struct net_device *dev,
 					IEEE80211_CONF_CHANGE_PS);
 			if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)
 				ieee80211_send_nullfunc(local, sdata, 0);
+			del_timer_sync(&local->dynamic_ps_timer);
+			cancel_work_sync(&local->dynamic_ps_enable_work);
 		}
 	}
 
Signature · 1 line
1.6.0.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Vivek Natarajan

If the dynamic power save timer has been started before the power save is disabled using iwconfig, we fail to cancel the timer. Hence cancel it while disabling power save.

Even though John already applied this:

Signature · 1 line
Kalle Valo
#2 lore raw
Quoted 11 lines · Kalle Valo
Quoted 5 lines · Vivek Natarajan

If the dynamic power save timer has been started before the power save is disabled using iwconfig, we fail to cancel the timer. Hence cancel it while disabling power save.

Even though John already applied this:

Always good to speak-up, since sometimes (as in this case) it might not have been sent upstream yet! :-)

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.