summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2011-08-09 16:45:11 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-08-24 13:59:43 -0400
commit16dd7267f460739b3e29d984e73f05c5ffe2b142 (patch)
tree2902dddb8d8ef045ae64bff734eb400bf8a23fb7 /net/wireless
parent0507e159a2b590666982b53ecf6fb2843a5bb423 (diff)
downloadlinux-3.10-16dd7267f460739b3e29d984e73f05c5ffe2b142.tar.gz
linux-3.10-16dd7267f460739b3e29d984e73f05c5ffe2b142.tar.bz2
linux-3.10-16dd7267f460739b3e29d984e73f05c5ffe2b142.zip
{nl,cfg,mac}80211: let userspace make meshif mesh gate
Allow userspace to set NL80211_MESHCONF_GATE_ANNOUNCEMENTS attribute, which will advertise this mesh node as being a mesh gate. NL80211_HWMP_ROOTMODE must be set or this will do nothing. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/mesh.c1
-rw-r--r--net/wireless/nl80211.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c
index b5a39d4d1dc..4423e64c7d9 100644
--- a/net/wireless/mesh.c
+++ b/net/wireless/mesh.c
@@ -51,6 +51,7 @@ const struct mesh_config default_mesh_config = {
.path_refresh_time = MESH_PATH_REFRESH_TIME,
.min_discovery_timeout = MESH_MIN_DISCOVERY_TIMEOUT,
.dot11MeshHWMPRannInterval = MESH_RANN_INTERVAL,
+ .dot11MeshGateAnnouncementProtocol = false,
};
const struct mesh_setup default_mesh_setup = {
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index bbf3d7384a6..57ecfa4ad3b 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3037,6 +3037,8 @@ static int nl80211_get_mesh_config(struct sk_buff *skb,
cur_params.dot11MeshHWMPRootMode);
NLA_PUT_U16(msg, NL80211_MESHCONF_HWMP_RANN_INTERVAL,
cur_params.dot11MeshHWMPRannInterval);
+ NLA_PUT_U8(msg, NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
+ cur_params.dot11MeshGateAnnouncementProtocol);
nla_nest_end(msg, pinfoattr);
genlmsg_end(msg, hdr);
return genlmsg_reply(msg, info);
@@ -3066,6 +3068,7 @@ static const struct nla_policy nl80211_meshconf_params_policy[NL80211_MESHCONF_A
[NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME] = { .type = NLA_U16 },
[NL80211_MESHCONF_HWMP_ROOTMODE] = { .type = NLA_U8 },
[NL80211_MESHCONF_HWMP_RANN_INTERVAL] = { .type = NLA_U16 },
+ [NL80211_MESHCONF_GATE_ANNOUNCEMENTS] = { .type = NLA_U8 },
};
static const struct nla_policy
@@ -3148,6 +3151,10 @@ do {\
dot11MeshHWMPRannInterval, mask,
NL80211_MESHCONF_HWMP_RANN_INTERVAL,
nla_get_u16);
+ FILL_IN_MESH_PARAM_IF_SET(tb, cfg,
+ dot11MeshGateAnnouncementProtocol, mask,
+ NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
+ nla_get_u8);
if (mask_out)
*mask_out = mask;