History

{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.

Marco Porsch committed 13 years ago

Commit 3b1c5a51 parent 9bdbf044 files · +113 −1Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+47−0
@@ -1310,6 +1310,9 @@ enum nl80211_commands { · 1309 unmodified lines
13101310 * if not given in START_AP 0 is assumed, if not given in SET_BSS
13111311 * no change is made.
13121312 *
1313+ * @NL80211_ATTR_LOCAL_MESH_POWER_MODE: local mesh STA link-specific power mode
1314+ * defined in &enum nl80211_mesh_power_mode.
1315+ *
13131316 * @NL80211_ATTR_MAX: highest attribute number currently defined
13141317 * @__NL80211_ATTR_AFTER_LAST: internal use
13151318 */
@@ -1580,6 +1583,8 @@ enum nl80211_attrs { · 264 unmodified lines
15801583 NL80211_ATTR_P2P_CTWINDOW,
15811584 NL80211_ATTR_P2P_OPPPS,
15821585
1586+ NL80211_ATTR_LOCAL_MESH_POWER_MODE,
1587+
15831588 /* add attributes here, update the policy in nl80211.c */
15841589
15851590 __NL80211_ATTR_AFTER_LAST,
@@ -1838,6 +1843,10 @@ enum nl80211_sta_bss_param { · 252 unmodified lines
18381843 * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
18391844 * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
18401845 * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64)
1846+ * @NL80211_STA_INFO_LOCAL_PM: local mesh STA link-specific power mode
1847+ * @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode
1848+ * @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards
1849+ * non-peer STA
18411850 * @__NL80211_STA_INFO_AFTER_LAST: internal
18421851 * @NL80211_STA_INFO_MAX: highest possible station info attribute
18431852 */
@@ -1862,6 +1871,9 @@ enum nl80211_sta_info { · 18 unmodified lines
18621871 NL80211_STA_INFO_STA_FLAGS,
18631872 NL80211_STA_INFO_BEACON_LOSS,
18641873 NL80211_STA_INFO_T_OFFSET,
1874+ NL80211_STA_INFO_LOCAL_PM,
1875+ NL80211_STA_INFO_PEER_PM,
1876+ NL80211_STA_INFO_NONPEER_PM,
18651877
18661878 /* keep last */
18671879 __NL80211_STA_INFO_AFTER_LAST,
@@ -2252,6 +2264,34 @@ enum nl80211_mntr_flags { · 384 unmodified lines
22522264 NL80211_MNTR_FLAG_MAX = __NL80211_MNTR_FLAG_AFTER_LAST - 1
22532265 };
22542266
2267+/**
2268+ * enum nl80211_mesh_power_mode - mesh power save modes
2269+ *
2270+ * @NL80211_MESH_POWER_UNKNOWN: The mesh power mode of the mesh STA is
2271+ * not known or has not been set yet.
2272+ * @NL80211_MESH_POWER_ACTIVE: Active mesh power mode. The mesh STA is
2273+ * in Awake state all the time.
2274+ * @NL80211_MESH_POWER_LIGHT_SLEEP: Light sleep mode. The mesh STA will
2275+ * alternate between Active and Doze states, but will wake up for
2276+ * neighbor's beacons.
2277+ * @NL80211_MESH_POWER_DEEP_SLEEP: Deep sleep mode. The mesh STA will
2278+ * alternate between Active and Doze states, but may not wake up
2279+ * for neighbor's beacons.
2280+ *
2281+ * @__NL80211_MESH_POWER_AFTER_LAST - internal use
2282+ * @NL80211_MESH_POWER_MAX - highest possible power save level
2283+ */
2284+
2285+enum nl80211_mesh_power_mode {
2286+ NL80211_MESH_POWER_UNKNOWN,
2287+ NL80211_MESH_POWER_ACTIVE,
2288+ NL80211_MESH_POWER_LIGHT_SLEEP,
2289+ NL80211_MESH_POWER_DEEP_SLEEP,
2290+
2291+ __NL80211_MESH_POWER_AFTER_LAST,
2292+ NL80211_MESH_POWER_MAX = __NL80211_MESH_POWER_AFTER_LAST - 1
2293+};
2294+
22552295 /**
22562296 * enum nl80211_meshconf_params - mesh configuration parameters
22572297 *
@@ -2346,6 +2386,11 @@ enum nl80211_mntr_flags { · 88 unmodified lines
23462386 * (in TUs) during which a mesh STA can send only one Action frame
23472387 * containing a PREQ element for root path confirmation.
23482388 *
2389+ * @NL80211_MESHCONF_POWER_MODE: Default mesh power mode for new peer links.
2390+ * type &enum nl80211_mesh_power_mode (u32)
2391+ *
2392+ * @NL80211_MESHCONF_AWAKE_WINDOW: awake window duration (in TUs)
2393+ *
23492394 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
23502395 */
23512396 enum nl80211_meshconf_params {
@@ -2375,6 +2420,8 @@ enum nl80211_meshconf_params { · 23 unmodified lines
23752420 NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT,
23762421 NL80211_MESHCONF_HWMP_ROOT_INTERVAL,
23772422 NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL,
2423+ NL80211_MESHCONF_POWER_MODE,
2424+ NL80211_MESHCONF_AWAKE_WINDOW,
23782425
23792426 /* keep last */
23802427 __NL80211_MESHCONF_ATTR_AFTER_LAST,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t