Commit 2d3db210 authored by Bob Copeland's avatar Bob Copeland Committed by Johannes Berg

Revert "mac80211: allow disable power save in mesh"

This reverts commit ee1f6681.

The aformentioned commit added a check to allow
'iw wlan0 set power_save off' to work for mesh interfaces.

However, this is problematic because it also allows
'iw wlan0 set power_save on', which will crash in short order
because all of the subsequent code manipulates sdata->u.mgd.

The power-saving states for mesh interfaces can be manipulated
through the mesh config, e.g:
'iw wlan0 set mesh_param mesh_power_save=active' (which,
despite the name, actualy disables power saving since the
setting refers to the type of sleep the interface undergoes).

Fixes: ee1f6681 ("mac80211: allow disable power save in mesh")
Signed-off-by: default avatarBob Copeland <>
Signed-off-by: default avatarJohannes Berg <>
parent 91398a09
......@@ -2488,8 +2488,7 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
sdata->vif.type != NL80211_IFTYPE_MESH_POINT)
if (sdata->vif.type != NL80211_IFTYPE_STATION)
if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment