aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ieee80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-04-16 07:17:25 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:57:16 -0400
commit10f644a47b76d3e61b98f2d02ce9690b94c51ee5 (patch)
treefc344d0f888ea0b97608cd53eec1d2dc17672087 /include/linux/ieee80211.h
parent965bedadc01d34027455d5d5b67063ef0209c955 (diff)
mac80211: disable powersave if pm_qos asks for low latency
When an application asks for a latency lower than the beacon interval there's nothing we can do -- we need to stay awake and not have the AP buffer frames for us. Add code to automatically calculate this constraint in mac80211 so drivers need not concern themselves with it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/ieee80211.h')
-rw-r--r--include/linux/ieee80211.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 4b501b48ce86..53563d53b5ad 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1383,4 +1383,13 @@ static inline int ieee80211_freq_to_ofdm_chan(int s_freq, int freq)
1383 return -1; 1383 return -1;
1384} 1384}
1385 1385
1386/**
1387 * ieee80211_tu_to_usec - convert time units (TU) to microseconds
1388 * @tu: the TUs
1389 */
1390static inline unsigned long ieee80211_tu_to_usec(unsigned long tu)
1391{
1392 return 1024 * tu;
1393}
1394
1386#endif /* LINUX_IEEE80211_H */ 1395#endif /* LINUX_IEEE80211_H */