mac80211: add some ibss related fixes from linux-wireless@
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 302-mac80211_pwr_mgmt_fix.patch
1 --- a/net/mac80211/cfg.c
2 +++ b/net/mac80211/cfg.c
3 @@ -1384,6 +1384,9 @@ static int ieee80211_set_power_mgmt(stru
4 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
5 struct ieee80211_conf *conf = &local->hw.conf;
6
7 + if (sdata->vif.type != NL80211_IFTYPE_STATION)
8 + return 0;
9 +
10 if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS))
11 return -EOPNOTSUPP;
12