aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2012-07-27 05:33:22 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-31 10:11:04 -0400
commitab09587740fddf6b4116be7b6716ab47f34d2634 (patch)
tree18c304410c82725356a3a8d6076b2f9af173b21a /include/net/mac80211.h
parent2b2b64380785bdcaaa9a123e7e5829acc749c4ca (diff)
mac80211: add PS flag to bss_conf
Currently, ps mode is indicated per device (rather than per interface), which doesn't make a lot of sense. Moreover, there are subtle bugs caused by the inability to indicate ps change along with other changes (e.g. when the AP deauth us, we'd like to indicate CHANGED_PS | CHANGED_ASSOC, as changing PS before notifying about disassociation will result in null-packets being sent (if IEEE80211_HW_SUPPORTS_DYNAMIC_PS) while the sta is already disconnected.) Keep the current per-device notifications, and add parallel per-vif notifications. In order to keep it simple, the per-device ps and the per-vif ps are orthogonal - the per-vif ps configuration is determined only by the user configuration (enable/disable) and the connection state, and is not affected by other vifs state and (temporary) dynamic_ps/offchannel operations (unlike per-device ps). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index bb86aa6f98dd..d67d3bbe21c1 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -171,6 +171,7 @@ struct ieee80211_low_level_stats {
171 * @BSS_CHANGED_IDLE: Idle changed for this BSS/interface. 171 * @BSS_CHANGED_IDLE: Idle changed for this BSS/interface.
172 * @BSS_CHANGED_SSID: SSID changed for this BSS (AP mode) 172 * @BSS_CHANGED_SSID: SSID changed for this BSS (AP mode)
173 * @BSS_CHANGED_AP_PROBE_RESP: Probe Response changed for this BSS (AP mode) 173 * @BSS_CHANGED_AP_PROBE_RESP: Probe Response changed for this BSS (AP mode)
174 * @BSS_CHANGED_PS: PS changed for this BSS (STA mode)
174 */ 175 */
175enum ieee80211_bss_change { 176enum ieee80211_bss_change {
176 BSS_CHANGED_ASSOC = 1<<0, 177 BSS_CHANGED_ASSOC = 1<<0,
@@ -190,6 +191,7 @@ enum ieee80211_bss_change {
190 BSS_CHANGED_IDLE = 1<<14, 191 BSS_CHANGED_IDLE = 1<<14,
191 BSS_CHANGED_SSID = 1<<15, 192 BSS_CHANGED_SSID = 1<<15,
192 BSS_CHANGED_AP_PROBE_RESP = 1<<16, 193 BSS_CHANGED_AP_PROBE_RESP = 1<<16,
194 BSS_CHANGED_PS = 1<<17,
193 195
194 /* when adding here, make sure to change ieee80211_reconfig */ 196 /* when adding here, make sure to change ieee80211_reconfig */
195}; 197};
@@ -266,6 +268,8 @@ enum ieee80211_rssi_event {
266 * @idle: This interface is idle. There's also a global idle flag in the 268 * @idle: This interface is idle. There's also a global idle flag in the
267 * hardware config which may be more appropriate depending on what 269 * hardware config which may be more appropriate depending on what
268 * your driver/device needs to do. 270 * your driver/device needs to do.
271 * @ps: power-save mode (STA only). This flag is NOT affected by
272 * offchannel/dynamic_ps operations.
269 * @ssid: The SSID of the current vif. Only valid in AP-mode. 273 * @ssid: The SSID of the current vif. Only valid in AP-mode.
270 * @ssid_len: Length of SSID given in @ssid. 274 * @ssid_len: Length of SSID given in @ssid.
271 * @hidden_ssid: The SSID of the current vif is hidden. Only valid in AP-mode. 275 * @hidden_ssid: The SSID of the current vif is hidden. Only valid in AP-mode.
@@ -296,6 +300,7 @@ struct ieee80211_bss_conf {
296 bool arp_filter_enabled; 300 bool arp_filter_enabled;
297 bool qos; 301 bool qos;
298 bool idle; 302 bool idle;
303 bool ps;
299 u8 ssid[IEEE80211_MAX_SSID_LEN]; 304 u8 ssid[IEEE80211_MAX_SSID_LEN];
300 size_t ssid_len; 305 size_t ssid_len;
301 bool hidden_ssid; 306 bool hidden_ssid;