diff options
author | Marco Porsch <marco@cozybit.com> | 2013-01-07 10:04:52 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-16 16:48:04 -0500 |
commit | 3b1c5a5307fb5277f395efdcf330c064d79df07d (patch) | |
tree | 9aca9007c05a70a0bce2c18c3c60fcfda1b7923d /include/net/cfg80211.h | |
parent | 9bdbf04db099c11bbbaea9dcea7465c508531fb8 (diff) |
{cfg,nl}80211: mesh power mode primitives and userspace access
Add the nl80211_mesh_power_mode enumeration which holds possible
values for the mesh power mode. These modes are unknown, active,
light sleep and deep sleep.
Add power_mode entry to the mesh config structure to hold the
user-configured default mesh power mode. This value will be used
for new peer links.
Add the dot11MeshAwakeWindowDuration value to the mesh config.
The awake window is a duration in TU describing how long the STA
will stay awake after transmitting its beacon in PS mode.
Add access routines to:
- get/set local link-specific power mode (STA)
- get remote STA's link-specific power mode (STA)
- get remote STA's non-peer power mode (STA)
- get/set default mesh power mode (mesh config)
- get/set mesh awake window duration (mesh config)
All config changes may be done at mesh runtime and take effect
immediately.
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>
[fix commit message line length, error handling in set station]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 516aded3697f..d9f08f65f7a5 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -610,6 +610,8 @@ enum station_parameters_apply_mask { | |||
610 | * @sta_modify_mask: bitmap indicating which parameters changed | 610 | * @sta_modify_mask: bitmap indicating which parameters changed |
611 | * (for those that don't have a natural "no change" value), | 611 | * (for those that don't have a natural "no change" value), |
612 | * see &enum station_parameters_apply_mask | 612 | * see &enum station_parameters_apply_mask |
613 | * @local_pm: local link-specific mesh power save mode (no change when set | ||
614 | * to unknown) | ||
613 | */ | 615 | */ |
614 | struct station_parameters { | 616 | struct station_parameters { |
615 | u8 *supported_rates; | 617 | u8 *supported_rates; |
@@ -625,6 +627,7 @@ struct station_parameters { | |||
625 | struct ieee80211_vht_cap *vht_capa; | 627 | struct ieee80211_vht_cap *vht_capa; |
626 | u8 uapsd_queues; | 628 | u8 uapsd_queues; |
627 | u8 max_sp; | 629 | u8 max_sp; |
630 | enum nl80211_mesh_power_mode local_pm; | ||
628 | }; | 631 | }; |
629 | 632 | ||
630 | /** | 633 | /** |
@@ -655,6 +658,9 @@ struct station_parameters { | |||
655 | * @STATION_INFO_STA_FLAGS: @sta_flags filled | 658 | * @STATION_INFO_STA_FLAGS: @sta_flags filled |
656 | * @STATION_INFO_BEACON_LOSS_COUNT: @beacon_loss_count filled | 659 | * @STATION_INFO_BEACON_LOSS_COUNT: @beacon_loss_count filled |
657 | * @STATION_INFO_T_OFFSET: @t_offset filled | 660 | * @STATION_INFO_T_OFFSET: @t_offset filled |
661 | * @STATION_INFO_LOCAL_PM: @local_pm filled | ||
662 | * @STATION_INFO_PEER_PM: @peer_pm filled | ||
663 | * @STATION_INFO_NONPEER_PM: @nonpeer_pm filled | ||
658 | */ | 664 | */ |
659 | enum station_info_flags { | 665 | enum station_info_flags { |
660 | STATION_INFO_INACTIVE_TIME = 1<<0, | 666 | STATION_INFO_INACTIVE_TIME = 1<<0, |
@@ -678,6 +684,9 @@ enum station_info_flags { | |||
678 | STATION_INFO_STA_FLAGS = 1<<18, | 684 | STATION_INFO_STA_FLAGS = 1<<18, |
679 | STATION_INFO_BEACON_LOSS_COUNT = 1<<19, | 685 | STATION_INFO_BEACON_LOSS_COUNT = 1<<19, |
680 | STATION_INFO_T_OFFSET = 1<<20, | 686 | STATION_INFO_T_OFFSET = 1<<20, |
687 | STATION_INFO_LOCAL_PM = 1<<21, | ||
688 | STATION_INFO_PEER_PM = 1<<22, | ||
689 | STATION_INFO_NONPEER_PM = 1<<23, | ||
681 | }; | 690 | }; |
682 | 691 | ||
683 | /** | 692 | /** |
@@ -791,6 +800,9 @@ struct sta_bss_parameters { | |||
791 | * @sta_flags: station flags mask & values | 800 | * @sta_flags: station flags mask & values |
792 | * @beacon_loss_count: Number of times beacon loss event has triggered. | 801 | * @beacon_loss_count: Number of times beacon loss event has triggered. |
793 | * @t_offset: Time offset of the station relative to this host. | 802 | * @t_offset: Time offset of the station relative to this host. |
803 | * @local_pm: local mesh STA power save mode | ||
804 | * @peer_pm: peer mesh STA power save mode | ||
805 | * @nonpeer_pm: non-peer mesh STA power save mode | ||
794 | */ | 806 | */ |
795 | struct station_info { | 807 | struct station_info { |
796 | u32 filled; | 808 | u32 filled; |
@@ -820,6 +832,9 @@ struct station_info { | |||
820 | 832 | ||
821 | u32 beacon_loss_count; | 833 | u32 beacon_loss_count; |
822 | s64 t_offset; | 834 | s64 t_offset; |
835 | enum nl80211_mesh_power_mode local_pm; | ||
836 | enum nl80211_mesh_power_mode peer_pm; | ||
837 | enum nl80211_mesh_power_mode nonpeer_pm; | ||
823 | 838 | ||
824 | /* | 839 | /* |
825 | * Note: Add a new enum station_info_flags value for each new field and | 840 | * Note: Add a new enum station_info_flags value for each new field and |
@@ -995,6 +1010,10 @@ struct bss_parameters { | |||
995 | * @dot11MeshHWMPconfirmationInterval: The minimum interval of time (in TUs) | 1010 | * @dot11MeshHWMPconfirmationInterval: The minimum interval of time (in TUs) |
996 | * during which a mesh STA can send only one Action frame containing | 1011 | * during which a mesh STA can send only one Action frame containing |
997 | * a PREQ element for root path confirmation. | 1012 | * a PREQ element for root path confirmation. |
1013 | * @power_mode: The default mesh power save mode which will be the initial | ||
1014 | * setting for new peer links. | ||
1015 | * @dot11MeshAwakeWindowDuration: The duration in TUs the STA will remain awake | ||
1016 | * after transmitting its beacon. | ||
998 | */ | 1017 | */ |
999 | struct mesh_config { | 1018 | struct mesh_config { |
1000 | u16 dot11MeshRetryTimeout; | 1019 | u16 dot11MeshRetryTimeout; |
@@ -1022,6 +1041,8 @@ struct mesh_config { | |||
1022 | u32 dot11MeshHWMPactivePathToRootTimeout; | 1041 | u32 dot11MeshHWMPactivePathToRootTimeout; |
1023 | u16 dot11MeshHWMProotInterval; | 1042 | u16 dot11MeshHWMProotInterval; |
1024 | u16 dot11MeshHWMPconfirmationInterval; | 1043 | u16 dot11MeshHWMPconfirmationInterval; |
1044 | enum nl80211_mesh_power_mode power_mode; | ||
1045 | u16 dot11MeshAwakeWindowDuration; | ||
1025 | }; | 1046 | }; |
1026 | 1047 | ||
1027 | /** | 1048 | /** |