diff options
author | Marco Porsch <marco@cozybit.com> | 2013-01-30 12:14:08 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-04 12:57:47 -0500 |
commit | 3f52b7e328c526fa7a592af9bf5772c591ed38a4 (patch) | |
tree | 1bcf93b87c99c3be6c9020a41b28114130f4c251 /net/mac80211/sta_info.h | |
parent | 0532d4f154b87da6361ab90d12f35142d5119dc1 (diff) |
mac80211: mesh power save basics
Add routines to
- maintain a PS mode for each peer and a non-peer PS mode
- indicate own PS mode in transmitted frames
- track neighbor STAs power modes
- buffer frames when neighbors are in PS mode
- add TIM and Awake Window IE to beacons
- release frames in Mesh Peer Service Periods
Add local_pm to sta_info to represent the link-specific power
mode at this station towards the remote station. When a peer
link is established, use the default power mode stored in mesh
config. Update the PS status if the peering status of a neighbor
changes.
Maintain a mesh power mode for non-peer mesh STAs. Set the
non-peer power mode to active mode during peering. Authenticated
mesh peering is currently not working when either node is
configured to be in power save mode.
Indicate the current power mode in transmitted frames. Use QoS
Nulls to indicate mesh power mode transitions.
For performance reasons, calls to the function setting the frame
flags are placed in HWMP routing routines, as there the STA
pointer is already available.
Add peer_pm to sta_info to represent the peer's link-specific
power mode towards the local station. Add nonpeer_pm to
represent the peer's power mode towards all non-peer stations.
Track power modes based on received frames.
Add the ps_data structure to ieee80211_if_mesh (for TIM map, PS
neighbor counter and group-addressed frame buffer).
Set WLAN_STA_PS flag for STA in PS mode to use the unicast frame
buffering routines in the tx path. Update num_sta_ps to buffer
and release group-addressed frames after DTIM beacons.
Announce the awake window duration in beacons if in light or
deep sleep mode towards any peer or non-peer. Create a TIM IE
similarly to AP mode and add it to mesh beacons. Parse received
Awake Window IEs and check TIM IEs for buffered frames.
Release frames towards peers in mesh Peer Service Periods. Use
the corresponding trigger frames and monitor the MPSP status.
Append a QoS Null as trigger frame if neccessary to properly end
the MPSP. Currently, in HT channels MPSPs behave imperfectly and
show large delay spikes and frame losses.
Signed-off-by: Marco Porsch <marco@cozybit.com>
Signed-off-by: Ivan Bezyazychnyy <ivan.bezyazychnyy@gmail.com>
Signed-off-by: Mike Krinkin <krinkin.m.u@gmail.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/sta_info.h')
-rw-r--r-- | net/mac80211/sta_info.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index af7d78aa5523..5a1deba2c645 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
@@ -56,6 +56,8 @@ | |||
56 | * @WLAN_STA_INSERTED: This station is inserted into the hash table. | 56 | * @WLAN_STA_INSERTED: This station is inserted into the hash table. |
57 | * @WLAN_STA_RATE_CONTROL: rate control was initialized for this station. | 57 | * @WLAN_STA_RATE_CONTROL: rate control was initialized for this station. |
58 | * @WLAN_STA_TOFFSET_KNOWN: toffset calculated for this station is valid. | 58 | * @WLAN_STA_TOFFSET_KNOWN: toffset calculated for this station is valid. |
59 | * @WLAN_STA_MPSP_OWNER: local STA is owner of a mesh Peer Service Period. | ||
60 | * @WLAN_STA_MPSP_RECIPIENT: local STA is recipient of a MPSP. | ||
59 | */ | 61 | */ |
60 | enum ieee80211_sta_info_flags { | 62 | enum ieee80211_sta_info_flags { |
61 | WLAN_STA_AUTH, | 63 | WLAN_STA_AUTH, |
@@ -78,6 +80,8 @@ enum ieee80211_sta_info_flags { | |||
78 | WLAN_STA_INSERTED, | 80 | WLAN_STA_INSERTED, |
79 | WLAN_STA_RATE_CONTROL, | 81 | WLAN_STA_RATE_CONTROL, |
80 | WLAN_STA_TOFFSET_KNOWN, | 82 | WLAN_STA_TOFFSET_KNOWN, |
83 | WLAN_STA_MPSP_OWNER, | ||
84 | WLAN_STA_MPSP_RECIPIENT, | ||
81 | }; | 85 | }; |
82 | 86 | ||
83 | #define ADDBA_RESP_INTERVAL HZ | 87 | #define ADDBA_RESP_INTERVAL HZ |
@@ -282,6 +286,9 @@ struct sta_ampdu_mlme { | |||
282 | * @t_offset_setpoint: reference timing offset of this sta to be used when | 286 | * @t_offset_setpoint: reference timing offset of this sta to be used when |
283 | * calculating clockdrift | 287 | * calculating clockdrift |
284 | * @ch_width: peer's channel width | 288 | * @ch_width: peer's channel width |
289 | * @local_pm: local link-specific power save mode | ||
290 | * @peer_pm: peer-specific power save mode towards local STA | ||
291 | * @nonpeer_pm: STA power save mode towards non-peer neighbors | ||
285 | * @debugfs: debug filesystem info | 292 | * @debugfs: debug filesystem info |
286 | * @dead: set to true when sta is unlinked | 293 | * @dead: set to true when sta is unlinked |
287 | * @uploaded: set to true when sta is uploaded to the driver | 294 | * @uploaded: set to true when sta is uploaded to the driver |
@@ -379,6 +386,10 @@ struct sta_info { | |||
379 | s64 t_offset; | 386 | s64 t_offset; |
380 | s64 t_offset_setpoint; | 387 | s64 t_offset_setpoint; |
381 | enum nl80211_chan_width ch_width; | 388 | enum nl80211_chan_width ch_width; |
389 | /* mesh power save */ | ||
390 | enum nl80211_mesh_power_mode local_pm; | ||
391 | enum nl80211_mesh_power_mode peer_pm; | ||
392 | enum nl80211_mesh_power_mode nonpeer_pm; | ||
382 | #endif | 393 | #endif |
383 | 394 | ||
384 | #ifdef CONFIG_MAC80211_DEBUGFS | 395 | #ifdef CONFIG_MAC80211_DEBUGFS |