diff options
author | Vivek Natarajan <vivek.natraj@gmail.com> | 2008-12-23 18:28:34 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:58:48 -0500 |
commit | 869717fbe43eb831cbebd03a9a66a4a4c3b406a9 (patch) | |
tree | 606022280750e9427784a5fcb246ff7ea1e37f24 /net/mac80211/wext.c | |
parent | d063ed0f0cd623b45edc6f4781dda6478c56bb4f (diff) |
mac80211: A couple of fixes to dynamic power save.
a) hw_config() should not be called from siwpower() for the drivers which do not support
dynamic powersave.
b) IEEE80211_HW_NO_STACK_DYNAMIC_PS needs to be verified in set_associated() also before
enabling the power save timers.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r-- | net/mac80211/wext.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 011592fd4528..8568f1e7266f 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c @@ -865,9 +865,9 @@ set: local->powersave = ps; local->dynamic_ps_timeout = timeout; - if (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED) { - if (!(local->hw.flags & IEEE80211_HW_NO_STACK_DYNAMIC_PS) && - local->dynamic_ps_timeout > 0) + if (!(local->hw.flags & IEEE80211_HW_NO_STACK_DYNAMIC_PS) && + (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED)) { + if (local->dynamic_ps_timeout > 0) mod_timer(&local->dynamic_ps_timer, jiffies + msecs_to_jiffies(local->dynamic_ps_timeout)); else { @@ -875,8 +875,9 @@ set: conf->flags |= IEEE80211_CONF_PS; else conf->flags &= ~IEEE80211_CONF_PS; + ret = ieee80211_hw_config(local, + IEEE80211_CONF_CHANGE_PS); } - ret = ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); } return ret; |