aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-04-22 12:44:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:57:20 -0400
commit04fe20372e70685d9f15966216cdffd3795fe590 (patch)
tree8de1ed35372e2f2bcfd9f36cb89647ce1507922d /include/net
parent8e30bc55de98c000b0b836cb42525c82f605f191 (diff)
mac80211: calculate maximum sleep interval
The maximum sleep interval, for powersave purposes, is determined by the DTIM period (it may not be larger) and the required networking latency (it must be small enough to fulfil those constraints). This makes mac80211 calculate the maximum sleep interval based on those constraints, and pass it to the driver. Then the driver should instruct the device to sleep at most that long. Note that the device is responsible for aligning the maximum sleep interval between DTIMs, we make sure it's not longer but it needs to make sure it's between them. Also, group some powersave documentation together and make it more explicit that we support managed mode only, and no IBSS powersaving (yet). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/mac80211.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 183956e4930a..446dbf75a1c5 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -517,7 +517,7 @@ struct ieee80211_rx_status {
517 * Flags to define PHY configuration options 517 * Flags to define PHY configuration options
518 * 518 *
519 * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported) 519 * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported)
520 * @IEEE80211_CONF_PS: Enable 802.11 power save mode 520 * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only)
521 */ 521 */
522enum ieee80211_conf_flags { 522enum ieee80211_conf_flags {
523 IEEE80211_CONF_RADIOTAP = (1<<0), 523 IEEE80211_CONF_RADIOTAP = (1<<0),
@@ -553,14 +553,26 @@ enum ieee80211_conf_changed {
553 * 553 *
554 * This struct indicates how the driver shall configure the hardware. 554 * This struct indicates how the driver shall configure the hardware.
555 * 555 *
556 * @flags: configuration flags defined above
557 *
556 * @radio_enabled: when zero, driver is required to switch off the radio. 558 * @radio_enabled: when zero, driver is required to switch off the radio.
557 * @beacon_int: beacon interval (TODO make interface config) 559 * @beacon_int: beacon interval (TODO make interface config)
560 *
558 * @listen_interval: listen interval in units of beacon interval 561 * @listen_interval: listen interval in units of beacon interval
559 * @flags: configuration flags defined above 562 * @max_sleep_interval: the maximum number of beacon intervals to sleep for
563 * before checking the beacon for a TIM bit (managed mode only); this
564 * value will be only achievable between DTIM frames, the hardware
565 * needs to check for the multicast traffic bit in DTIM beacons.
566 * This variable is valid only when the CONF_PS flag is set.
567 * @dynamic_ps_timeout: The dynamic powersave timeout (in ms), see the
568 * powersave documentation below. This variable is valid only when
569 * the CONF_PS flag is set.
570 *
560 * @power_level: requested transmit power (in dBm) 571 * @power_level: requested transmit power (in dBm)
561 * @dynamic_ps_timeout: dynamic powersave timeout (in ms) 572 *
562 * @channel: the channel to tune to 573 * @channel: the channel to tune to
563 * @channel_type: the channel (HT) type 574 * @channel_type: the channel (HT) type
575 *
564 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame 576 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame
565 * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11, 577 * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11,
566 * but actually means the number of transmissions not the number of retries 578 * but actually means the number of transmissions not the number of retries
@@ -572,6 +584,7 @@ struct ieee80211_conf {
572 int beacon_int; 584 int beacon_int;
573 u32 flags; 585 u32 flags;
574 int power_level, dynamic_ps_timeout; 586 int power_level, dynamic_ps_timeout;
587 int max_sleep_interval;
575 588
576 u16 listen_interval; 589 u16 listen_interval;
577 bool radio_enabled; 590 bool radio_enabled;