]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: Add support for mesh peer link expiration.
authorColleen Twitty <colleen@cozybit.com>
Mon, 8 Jul 2013 17:04:18 +0000 (10:04 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 8 Jul 2013 18:13:43 +0000 (20:13 +0200)
User can configure the peer link expiration time with a
new mesh parameter, mesh_plink_timeout.  This parameter
sets the expiration time, in seconds, for peer links.
After this time, the peer link is expired.  This means the
inactive STA is removed from the list of peers and is not
considered a peer again unless it re-peers.

Signed-off-by: Colleen Twitty <colleen@cozybit.com>
mesh.c

diff --git a/mesh.c b/mesh.c
index 5a09b62a8edf952de4b61c8762c27b03e594f44c..ca065bfa720ce8be798a5c212f2dddb2e92ac24c 100644 (file)
--- a/mesh.c
+++ b/mesh.c
@@ -157,6 +157,11 @@ static void _print_u32_timeout(struct nlattr *a)
        printf("%u milliseconds", nla_get_u32(a));
 }
 
+static void _print_u32_in_seconds(struct nlattr *a)
+{
+       printf("%d seconds", nla_get_u32(a));
+}
+
 static void _print_u32_in_TUs(struct nlattr *a)
 {
        printf("%d TUs", nla_get_u32(a));
@@ -258,6 +263,8 @@ const static struct mesh_param_descr _mesh_param_descrs[] =
        _my_nla_put_u32, _parse_u32_power_mode, _print_u32_power_mode},
        {"mesh_awake_window", NL80211_MESHCONF_AWAKE_WINDOW,
        _my_nla_put_u16, _parse_u16, _print_u16_in_TUs},
+       {"mesh_plink_timeout", NL80211_MESHCONF_PLINK_TIMEOUT,
+       _my_nla_put_u32, _parse_u32, _print_u32_in_seconds},
 };
 
 static void print_all_mesh_param_descr(void)