aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-01-07 12:28:20 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:58 -0500
commit4be8c3873e0b88397866d3ede578503e188f9ad2 (patch)
tree1ccf8a0c204bb01aca08d90c2d8c37b5e0439bd3 /include/net/mac80211.h
parentacbaf32e94cb70218792cac68e5149e482e77441 (diff)
mac80211: extend/document powersave API
This modifies hardware flags for powersave to support three different flags: * IEEE80211_HW_SUPPORTS_PS - indicates general PS support * IEEE80211_HW_PS_NULLFUNC_STACK - indicates nullfunc sending in software * IEEE80211_HW_SUPPORTS_DYNAMIC_PS - indicates dynamic PS on the device It also adds documentation for all this which explains how to set the various flags. Additionally, it fixes a few things: * a spot where && was used to test flags * enable CONF_PS only when associated again Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h53
1 files changed, 48 insertions, 5 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 83ee8a212296..8a305bfdb87b 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -850,10 +850,15 @@ enum ieee80211_tkip_key_type {
850 * @IEEE80211_HW_AMPDU_AGGREGATION: 850 * @IEEE80211_HW_AMPDU_AGGREGATION:
851 * Hardware supports 11n A-MPDU aggregation. 851 * Hardware supports 11n A-MPDU aggregation.
852 * 852 *
853 * @IEEE80211_HW_NO_STACK_DYNAMIC_PS: 853 * @IEEE80211_HW_SUPPORTS_PS:
854 * Hardware which has dynamic power save support, meaning 854 * Hardware has power save support (i.e. can go to sleep).
855 * that power save is enabled in idle periods, and don't need support 855 *
856 * from stack. 856 * @IEEE80211_HW_PS_NULLFUNC_STACK:
857 * Hardware requires nullfunc frame handling in stack, implies
858 * stack support for dynamic PS.
859 *
860 * @IEEE80211_HW_SUPPORTS_DYNAMIC_PS:
861 * Hardware has support for dynamic PS.
857 */ 862 */
858enum ieee80211_hw_flags { 863enum ieee80211_hw_flags {
859 IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, 864 IEEE80211_HW_RX_INCLUDES_FCS = 1<<1,
@@ -866,7 +871,9 @@ enum ieee80211_hw_flags {
866 IEEE80211_HW_NOISE_DBM = 1<<8, 871 IEEE80211_HW_NOISE_DBM = 1<<8,
867 IEEE80211_HW_SPECTRUM_MGMT = 1<<9, 872 IEEE80211_HW_SPECTRUM_MGMT = 1<<9,
868 IEEE80211_HW_AMPDU_AGGREGATION = 1<<10, 873 IEEE80211_HW_AMPDU_AGGREGATION = 1<<10,
869 IEEE80211_HW_NO_STACK_DYNAMIC_PS = 1<<11, 874 IEEE80211_HW_SUPPORTS_PS = 1<<11,
875 IEEE80211_HW_PS_NULLFUNC_STACK = 1<<12,
876 IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<13,
870}; 877};
871 878
872/** 879/**
@@ -1053,6 +1060,42 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
1053 */ 1060 */
1054 1061
1055/** 1062/**
1063 * DOC: Powersave support
1064 *
1065 * mac80211 has support for various powersave implementations.
1066 *
1067 * First, it can support hardware that handles all powersaving by
1068 * itself, such hardware should simply set the %IEEE80211_HW_SUPPORTS_PS
1069 * hardware flag. In that case, it will be told about the desired
1070 * powersave mode depending on the association status, and the driver
1071 * must take care of sending nullfunc frames when necessary, i.e. when
1072 * entering and leaving powersave mode. The driver is required to look at
1073 * the AID in beacons and signal to the AP that it woke up when it finds
1074 * traffic directed to it. This mode supports dynamic PS by simply
1075 * enabling/disabling PS.
1076 *
1077 * Additionally, such hardware may set the %IEEE80211_HW_SUPPORTS_DYNAMIC_PS
1078 * flag to indicate that it can support dynamic PS mode itself (see below).
1079 *
1080 * Other hardware designs cannot send nullfunc frames by themselves and also
1081 * need software support for parsing the TIM bitmap. This is also supported
1082 * by mac80211 by combining the %IEEE80211_HW_SUPPORTS_PS and
1083 * %IEEE80211_HW_PS_NULLFUNC_STACK flags. The hardware is of course still
1084 * required to pass up beacons. Additionally, in this case, mac80211 will
1085 * wake up the hardware when multicast traffic is announced in the beacon.
1086 *
1087 * FIXME: I don't think we can be fast enough in software when we want to
1088 * receive multicast traffic?
1089 *
1090 * Dynamic powersave mode is an extension to normal powersave mode in which
1091 * the hardware stays awake for a user-specified period of time after sending
1092 * a frame so that reply frames need not be buffered and therefore delayed
1093 * to the next wakeup. This can either be supported by hardware, in which case
1094 * the driver needs to look at the @dynamic_ps_timeout hardware configuration
1095 * value, or by the stack if all nullfunc handling is in the stack.
1096 */
1097
1098/**
1056 * DOC: Frame filtering 1099 * DOC: Frame filtering
1057 * 1100 *
1058 * mac80211 requires to see many management frames for proper 1101 * mac80211 requires to see many management frames for proper