summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-01-07 13:11:41 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-01-07 16:25:49 +0100
commit349b196044d38a3bf5be2b4dd2fe28ca2f12a258 (patch)
treea9477627bb14b8762df2e9e83cc4879ecd4ae2a5
parent3c2723f503e8decc420b377a3215089a7980cf08 (diff)
downloadlinux-349b196044d38a3bf5be2b4dd2fe28ca2f12a258.tar.bz2
mac80211: allow to set smps mode to OFF in AP mode
In managed mode, we should not ask for OFF mode because the power settings may still require DYNAMIC. In AP mode, this should be allowed since the default settings is OFF and AUTOMATIC is not allowed. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/ht.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 9a8be8f69224..fab7b91923e0 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -479,10 +479,9 @@ void ieee80211_request_smps(struct ieee80211_vif *vif,
vif->type != NL80211_IFTYPE_AP))
return;
- if (WARN_ON(smps_mode == IEEE80211_SMPS_OFF))
- smps_mode = IEEE80211_SMPS_AUTOMATIC;
-
if (vif->type == NL80211_IFTYPE_STATION) {
+ if (WARN_ON(smps_mode == IEEE80211_SMPS_OFF))
+ smps_mode = IEEE80211_SMPS_AUTOMATIC;
if (sdata->u.mgd.driver_smps_mode == smps_mode)
return;
sdata->u.mgd.driver_smps_mode = smps_mode;