Skip to content

Commit 349b196

Browse files
egrumbachjmberg-intel
authored andcommitted
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>
1 parent 3c2723f commit 349b196

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎net/mac80211/ht.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,9 @@ void ieee80211_request_smps(struct ieee80211_vif *vif,
479479
vif->type != NL80211_IFTYPE_AP))
480480
return;
481481

482-
if (WARN_ON(smps_mode == IEEE80211_SMPS_OFF))
483-
smps_mode = IEEE80211_SMPS_AUTOMATIC;
484-
485482
if (vif->type == NL80211_IFTYPE_STATION) {
483+
if (WARN_ON(smps_mode == IEEE80211_SMPS_OFF))
484+
smps_mode = IEEE80211_SMPS_AUTOMATIC;
486485
if (sdata->u.mgd.driver_smps_mode == smps_mode)
487486
return;
488487
sdata->u.mgd.driver_smps_mode = smps_mode;

0 commit comments

Comments
 (0)