aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-14 09:21:17 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-27 05:56:19 -0500
commit339afbf4819e5c7c0a0422af43b8c2eccd059abf (patch)
treec919c1b3606cc75c15260029fa0379abc33d3ebf /net/mac80211
parent53cabad70ecf0c245b41285de64a74a6c3ee9933 (diff)
mac80211: support P2P GO powersave configuration
If the low-level driver wants to support P2P GO powersave configuration, it must set the cfg80211 flags and mac80211 will pass the parameters to it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c16
-rw-r--r--net/mac80211/util.c2
2 files changed, 16 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 5d30e5f57ff0..97cf615eb36a 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -893,7 +893,8 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
893 u32 changed = BSS_CHANGED_BEACON_INT | 893 u32 changed = BSS_CHANGED_BEACON_INT |
894 BSS_CHANGED_BEACON_ENABLED | 894 BSS_CHANGED_BEACON_ENABLED |
895 BSS_CHANGED_BEACON | 895 BSS_CHANGED_BEACON |
896 BSS_CHANGED_SSID; 896 BSS_CHANGED_SSID |
897 BSS_CHANGED_P2P_PS;
897 int err; 898 int err;
898 899
899 old = rtnl_dereference(sdata->u.ap.beacon); 900 old = rtnl_dereference(sdata->u.ap.beacon);
@@ -932,6 +933,9 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
932 sdata->vif.bss_conf.hidden_ssid = 933 sdata->vif.bss_conf.hidden_ssid =
933 (params->hidden_ssid != NL80211_HIDDEN_SSID_NOT_IN_USE); 934 (params->hidden_ssid != NL80211_HIDDEN_SSID_NOT_IN_USE);
934 935
936 sdata->vif.bss_conf.p2p_ctwindow = params->p2p_ctwindow;
937 sdata->vif.bss_conf.p2p_oppps = params->p2p_opp_ps;
938
935 err = ieee80211_assign_beacon(sdata, &params->beacon); 939 err = ieee80211_assign_beacon(sdata, &params->beacon);
936 if (err < 0) 940 if (err < 0)
937 return err; 941 return err;
@@ -1807,6 +1811,16 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
1807 changed |= BSS_CHANGED_HT; 1811 changed |= BSS_CHANGED_HT;
1808 } 1812 }
1809 1813
1814 if (params->p2p_ctwindow >= 0) {
1815 sdata->vif.bss_conf.p2p_ctwindow = params->p2p_ctwindow;
1816 changed |= BSS_CHANGED_P2P_PS;
1817 }
1818
1819 if (params->p2p_opp_ps >= 0) {
1820 sdata->vif.bss_conf.p2p_oppps = params->p2p_opp_ps;
1821 changed |= BSS_CHANGED_P2P_PS;
1822 }
1823
1810 ieee80211_bss_info_change_notify(sdata, changed); 1824 ieee80211_bss_info_change_notify(sdata, changed);
1811 1825
1812 return 0; 1826 return 0;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index dc7f6b264593..6e4c8bd5bfee 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1527,7 +1527,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1527 changed |= BSS_CHANGED_IBSS; 1527 changed |= BSS_CHANGED_IBSS;
1528 /* fall through */ 1528 /* fall through */
1529 case NL80211_IFTYPE_AP: 1529 case NL80211_IFTYPE_AP:
1530 changed |= BSS_CHANGED_SSID; 1530 changed |= BSS_CHANGED_SSID | BSS_CHANGED_P2P_PS;
1531 1531
1532 if (sdata->vif.type == NL80211_IFTYPE_AP) { 1532 if (sdata->vif.type == NL80211_IFTYPE_AP) {
1533 changed |= BSS_CHANGED_AP_PROBE_RESP; 1533 changed |= BSS_CHANGED_AP_PROBE_RESP;