aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@nokia.com>2008-12-18 16:35:27 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-19 15:24:00 -0500
commit520eb82076993b7f55ef9b80771d264272e5127b (patch)
treef98b74dbe404d4c3a55b5f649c25ca24958e62ba /include/net/mac80211.h
parentce7c9111a97492d04c504f40736a669c235d664a (diff)
mac80211: implement dynamic power save
This patch implements dynamic power save for mac80211. Basically it means enabling power save mode after an idle period. Implementing it dynamically gives a good compromise of low power consumption and low latency. Some hardware have support for this in firmware, but some require the host to do it. The dynamic power save is implemented by adding an timeout to ieee80211_subif_start_xmit(). The timeout can be enabled from userspace with Wireless Extensions. For example, the command below enables the dynamic power save and sets the time timeout to 500 ms: iwconfig wlan0 power timeout 500m Power save now only works with devices which handle power save in firmware. It's also disabled by default and the heuristics when and how to enable is considered as a policy decision and will be left for the userspace to handle. In case the firmware has support for this, drivers can disable this feature with IEEE80211_HW_NO_STACK_DYNAMIC_PS. Big thanks to Johannes Berg for the help with the design and code. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Acked-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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 9428d3e2f113..b3bd00a9d992 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -854,6 +854,11 @@ enum ieee80211_tkip_key_type {
854 * 854 *
855 * @IEEE80211_HW_AMPDU_AGGREGATION: 855 * @IEEE80211_HW_AMPDU_AGGREGATION:
856 * Hardware supports 11n A-MPDU aggregation. 856 * Hardware supports 11n A-MPDU aggregation.
857 *
858 * @IEEE80211_HW_NO_STACK_DYNAMIC_PS:
859 * Hardware which has dynamic power save support, meaning
860 * that power save is enabled in idle periods, and don't need support
861 * from stack.
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,6 +871,7 @@ 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,
874 IEEE80211_HW_NO_STACK_DYNAMIC_PS = 1<<11,
869}; 875};
870 876
871/** 877/**