aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorChun-Yeow Yeoh <yeohchunyeow@gmail.com>2012-06-13 14:06:06 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-14 03:08:22 -0400
commitac1073a61d73b6277794d2efc872eb7e1b706b5c (patch)
treee992e907f7fbf417981867750c5d27e76f6b00c1 /net/wireless
parent73c3df3ba3f2d7fe3ea47f944282f3cda31c5505 (diff)
{nl,cfg,mac}80211: implement dot11MeshHWMProotInterval and dot11MeshHWMPactivePathToRootTimeout
Add the mesh configuration parameters dot11MeshHWMProotInterval and dot11MeshHWMPactivePathToRootTimeout to be used by proactive PREQ mechanism. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> [line-break commit log] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/mesh.c4
-rw-r--r--net/wireless/nl80211.c15
2 files changed, 18 insertions, 1 deletions
diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c
index b44c736bf9cf..2f141cfd581e 100644
--- a/net/wireless/mesh.c
+++ b/net/wireless/mesh.c
@@ -14,6 +14,8 @@
14 14
15#define MESH_PATH_TIMEOUT 5000 15#define MESH_PATH_TIMEOUT 5000
16#define MESH_RANN_INTERVAL 5000 16#define MESH_RANN_INTERVAL 5000
17#define MESH_PATH_TO_ROOT_TIMEOUT 6000
18#define MESH_ROOT_INTERVAL 5000
17 19
18/* 20/*
19 * Minimum interval between two consecutive PREQs originated by the same 21 * Minimum interval between two consecutive PREQs originated by the same
@@ -62,6 +64,8 @@ const struct mesh_config default_mesh_config = {
62 .dot11MeshForwarding = true, 64 .dot11MeshForwarding = true,
63 .rssi_threshold = MESH_RSSI_THRESHOLD, 65 .rssi_threshold = MESH_RSSI_THRESHOLD,
64 .ht_opmode = IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED, 66 .ht_opmode = IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED,
67 .dot11MeshHWMPactivePathToRootTimeout = MESH_PATH_TO_ROOT_TIMEOUT,
68 .dot11MeshHWMProotInterval = MESH_ROOT_INTERVAL,
65}; 69};
66 70
67const struct mesh_setup default_mesh_setup = { 71const struct mesh_setup default_mesh_setup = {
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7db0aee8cd5b..f8930db613df 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3469,7 +3469,11 @@ static int nl80211_get_mesh_config(struct sk_buff *skb,
3469 nla_put_u32(msg, NL80211_MESHCONF_RSSI_THRESHOLD, 3469 nla_put_u32(msg, NL80211_MESHCONF_RSSI_THRESHOLD,
3470 cur_params.rssi_threshold) || 3470 cur_params.rssi_threshold) ||
3471 nla_put_u32(msg, NL80211_MESHCONF_HT_OPMODE, 3471 nla_put_u32(msg, NL80211_MESHCONF_HT_OPMODE,
3472 cur_params.ht_opmode)) 3472 cur_params.ht_opmode) ||
3473 nla_put_u32(msg, NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT,
3474 cur_params.dot11MeshHWMPactivePathToRootTimeout) ||
3475 nla_put_u16(msg, NL80211_MESHCONF_HWMP_ROOT_INTERVAL,
3476 cur_params.dot11MeshHWMProotInterval))
3473 goto nla_put_failure; 3477 goto nla_put_failure;
3474 nla_nest_end(msg, pinfoattr); 3478 nla_nest_end(msg, pinfoattr);
3475 genlmsg_end(msg, hdr); 3479 genlmsg_end(msg, hdr);
@@ -3505,6 +3509,8 @@ static const struct nla_policy nl80211_meshconf_params_policy[NL80211_MESHCONF_A
3505 [NL80211_MESHCONF_FORWARDING] = { .type = NLA_U8 }, 3509 [NL80211_MESHCONF_FORWARDING] = { .type = NLA_U8 },
3506 [NL80211_MESHCONF_RSSI_THRESHOLD] = { .type = NLA_U32 }, 3510 [NL80211_MESHCONF_RSSI_THRESHOLD] = { .type = NLA_U32 },
3507 [NL80211_MESHCONF_HT_OPMODE] = { .type = NLA_U16 }, 3511 [NL80211_MESHCONF_HT_OPMODE] = { .type = NLA_U16 },
3512 [NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT] = { .type = NLA_U32 },
3513 [NL80211_MESHCONF_HWMP_ROOT_INTERVAL] = { .type = NLA_U16 },
3508}; 3514};
3509 3515
3510static const struct nla_policy 3516static const struct nla_policy
@@ -3612,6 +3618,13 @@ do {\
3612 FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode, 3618 FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode,
3613 mask, NL80211_MESHCONF_HT_OPMODE, 3619 mask, NL80211_MESHCONF_HT_OPMODE,
3614 nla_get_u16); 3620 nla_get_u16);
3621 FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPactivePathToRootTimeout,
3622 mask,
3623 NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT,
3624 nla_get_u32);
3625 FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMProotInterval,
3626 mask, NL80211_MESHCONF_HWMP_ROOT_INTERVAL,
3627 nla_get_u16);
3615 if (mask_out) 3628 if (mask_out)
3616 *mask_out = mask; 3629 *mask_out = mask;
3617 3630