summaryrefslogtreecommitdiff
path: root/net/mac80211/wext.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r--net/mac80211/wext.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 011592f..8568f1e 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;