diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2010-01-14 06:09:21 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-14 18:16:56 -0500 |
commit | c99445b14054e0c4ed4715df1dad1fc608cbab46 (patch) | |
tree | 88b3e4bfde3abca9d6f57e2ae35458bb33eda4df /include/net/mac80211.h | |
parent | 9d173fc5dfa8c1b4578b331ac7ff3ce8af27006e (diff) |
mac80211: improve powersave documentation
There has been some confusion how drivers should implement powersave
support. Improve the documentation a bit to make it more clear what
drivers need to do. Also mention about U-APSD.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 75 |
1 files changed, 54 insertions, 21 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index bbfa4750092e..c90047de4428 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -569,7 +569,13 @@ struct ieee80211_rx_status { | |||
569 | * @IEEE80211_CONF_MONITOR: there's a monitor interface present -- use this | 569 | * @IEEE80211_CONF_MONITOR: there's a monitor interface present -- use this |
570 | * to determine for example whether to calculate timestamps for packets | 570 | * to determine for example whether to calculate timestamps for packets |
571 | * or not, do not use instead of filter flags! | 571 | * or not, do not use instead of filter flags! |
572 | * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only) | 572 | * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only). |
573 | * This is the power save mode defined by IEEE 802.11-2007 section 11.2, | ||
574 | * meaning that the hardware still wakes up for beacons, is able to | ||
575 | * transmit frames and receive the possible acknowledgment frames. | ||
576 | * Not to be confused with hardware specific wakeup/sleep states, | ||
577 | * driver is responsible for that. See the section "Powersave support" | ||
578 | * for more. | ||
573 | * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set | 579 | * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set |
574 | * the driver should be prepared to handle configuration requests but | 580 | * the driver should be prepared to handle configuration requests but |
575 | * may turn the device off as much as possible. Typically, this flag will | 581 | * may turn the device off as much as possible. Typically, this flag will |
@@ -1138,18 +1144,24 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1138 | * | 1144 | * |
1139 | * mac80211 has support for various powersave implementations. | 1145 | * mac80211 has support for various powersave implementations. |
1140 | * | 1146 | * |
1141 | * First, it can support hardware that handles all powersaving by | 1147 | * First, it can support hardware that handles all powersaving by itself, |
1142 | * itself, such hardware should simply set the %IEEE80211_HW_SUPPORTS_PS | 1148 | * such hardware should simply set the %IEEE80211_HW_SUPPORTS_PS hardware |
1143 | * hardware flag. In that case, it will be told about the desired | 1149 | * flag. In that case, it will be told about the desired powersave mode |
1144 | * powersave mode depending on the association status, and the driver | 1150 | * with the %IEEE80211_CONF_PS flag depending on the association status. |
1145 | * must take care of sending nullfunc frames when necessary, i.e. when | 1151 | * The hardware must take care of sending nullfunc frames when necessary, |
1146 | * entering and leaving powersave mode. The driver is required to look at | 1152 | * i.e. when entering and leaving powersave mode. The hardware is required |
1147 | * the AID in beacons and signal to the AP that it woke up when it finds | 1153 | * to look at the AID in beacons and signal to the AP that it woke up when |
1148 | * traffic directed to it. This mode supports dynamic PS by simply | 1154 | * it finds traffic directed to it. |
1149 | * enabling/disabling PS. | 1155 | * |
1150 | * | 1156 | * %IEEE80211_CONF_PS flag enabled means that the powersave mode defined in |
1151 | * Additionally, such hardware may set the %IEEE80211_HW_SUPPORTS_DYNAMIC_PS | 1157 | * IEEE 802.11-2007 section 11.2 is enabled. This is not to be confused |
1152 | * flag to indicate that it can support dynamic PS mode itself (see below). | 1158 | * with hardware wakeup and sleep states. Driver is responsible for waking |
1159 | * up the hardware before issueing commands to the hardware and putting it | ||
1160 | * back to sleep at approriate times. | ||
1161 | * | ||
1162 | * When PS is enabled, hardware needs to wakeup for beacons and receive the | ||
1163 | * buffered multicast/broadcast frames after the beacon. Also it must be | ||
1164 | * possible to send frames and receive the acknowledment frame. | ||
1153 | * | 1165 | * |
1154 | * Other hardware designs cannot send nullfunc frames by themselves and also | 1166 | * Other hardware designs cannot send nullfunc frames by themselves and also |
1155 | * need software support for parsing the TIM bitmap. This is also supported | 1167 | * need software support for parsing the TIM bitmap. This is also supported |
@@ -1157,14 +1169,35 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1157 | * %IEEE80211_HW_PS_NULLFUNC_STACK flags. The hardware is of course still | 1169 | * %IEEE80211_HW_PS_NULLFUNC_STACK flags. The hardware is of course still |
1158 | * required to pass up beacons. The hardware is still required to handle | 1170 | * required to pass up beacons. The hardware is still required to handle |
1159 | * waking up for multicast traffic; if it cannot the driver must handle that | 1171 | * waking up for multicast traffic; if it cannot the driver must handle that |
1160 | * as best as it can, mac80211 is too slow. | 1172 | * as best as it can, mac80211 is too slow to do that. |
1161 | * | 1173 | * |
1162 | * Dynamic powersave mode is an extension to normal powersave mode in which | 1174 | * Dynamic powersave is an extension to normal powersave in which the |
1163 | * the hardware stays awake for a user-specified period of time after sending | 1175 | * hardware stays awake for a user-specified period of time after sending a |
1164 | * a frame so that reply frames need not be buffered and therefore delayed | 1176 | * frame so that reply frames need not be buffered and therefore delayed to |
1165 | * to the next wakeup. This can either be supported by hardware, in which case | 1177 | * the next wakeup. It's compromise of getting good enough latency when |
1166 | * the driver needs to look at the @dynamic_ps_timeout hardware configuration | 1178 | * there's data traffic and still saving significantly power in idle |
1167 | * value, or by the stack if all nullfunc handling is in the stack. | 1179 | * periods. |
1180 | * | ||
1181 | * Dynamic powersave is supported by simply mac80211 enabling and disabling | ||
1182 | * PS based on traffic. Driver needs to only set %IEEE80211_HW_SUPPORTS_PS | ||
1183 | * flag and mac80211 will handle everything automatically. Additionally, | ||
1184 | * hardware having support for the dynamic PS feature may set the | ||
1185 | * %IEEE80211_HW_SUPPORTS_DYNAMIC_PS flag to indicate that it can support | ||
1186 | * dynamic PS mode itself. The driver needs to look at the | ||
1187 | * @dynamic_ps_timeout hardware configuration value and use it that value | ||
1188 | * whenever %IEEE80211_CONF_PS is set. In this case mac80211 will disable | ||
1189 | * dynamic PS feature in stack and will just keep %IEEE80211_CONF_PS | ||
1190 | * enabled whenever user has enabled powersave. | ||
1191 | * | ||
1192 | * Driver informs U-APSD client support by enabling | ||
1193 | * %IEEE80211_HW_SUPPORTS_UAPSD flag. The mode is configured through the | ||
1194 | * uapsd paramater in conf_tx() operation. Hardware needs to send the QoS | ||
1195 | * Nullfunc frames and stay awake until the service period has ended. To | ||
1196 | * utilize U-APSD, dynamic powersave is disabled for voip AC and all frames | ||
1197 | * from that AC are transmitted with powersave enabled. | ||
1198 | * | ||
1199 | * Note: U-APSD client mode is not yet supported with | ||
1200 | * %IEEE80211_HW_PS_NULLFUNC_STACK. | ||
1168 | */ | 1201 | */ |
1169 | 1202 | ||
1170 | /** | 1203 | /** |