Search Linux Wireless

iw [PATCH] update to latest kernel changes (mesh)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This introduces a new mesh parameter mesh_hwmp_rootmode to make the
mesh point act as a root node using mesh RANN frames.

Signed-off-by: Rui Paulo <rpaulo@xxxxxxxxx>
---
 mesh.c    |    2 ++
 mpath.c   |    8 ++++----
 nl80211.h |   11 +++++++----
 3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/mesh.c b/mesh.c
index 624ec37..8a03282 100644
--- a/mesh.c
+++ b/mesh.c
@@ -165,6 +165,8 @@ const static struct mesh_param_descr _mesh_param_descrs[] =
 	{"mesh_hwmp_net_diameter_traversal_time",
 	NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
 	_my_nla_put_u16, _parse_u16, _print_u16_in_TUs},
+	{"mesh_hwmp_rootmode", NL80211_MESHCONF_HWMP_ROOTMODE,
+	_my_nla_put_u8, _parse_u8, _print_u8},
 };
 
 static void print_all_mesh_param_descr(void)
diff --git a/mpath.c b/mpath.c
index eb5ad6a..8f5a334 100644
--- a/mpath.c
+++ b/mpath.c
@@ -38,7 +38,7 @@ static int print_mpath_handler(struct nl_msg *msg, void *arg)
 	char dst[20], next_hop[20], dev[20];
 	static struct nla_policy mpath_policy[NL80211_MPATH_INFO_MAX + 1] = {
 		[NL80211_MPATH_INFO_FRAME_QLEN] = { .type = NLA_U32 },
-		[NL80211_MPATH_INFO_DSN] = { .type = NLA_U32 },
+		[NL80211_MPATH_INFO_SN] = { .type = NLA_U32 },
 		[NL80211_MPATH_INFO_METRIC] = { .type = NLA_U32 },
 		[NL80211_MPATH_INFO_EXPTIME] = { .type = NLA_U32 },
 		[NL80211_MPATH_INFO_DISCOVERY_TIMEOUT] = { .type = NLA_U32 },
@@ -70,9 +70,9 @@ static int print_mpath_handler(struct nl_msg *msg, void *arg)
 	mac_addr_n2a(next_hop, nla_data(tb[NL80211_ATTR_MPATH_NEXT_HOP]));
 	if_indextoname(nla_get_u32(tb[NL80211_ATTR_IFINDEX]), dev);
 	printf("%s %s %s", dst, next_hop, dev);
-	if (pinfo[NL80211_MPATH_INFO_DSN])
+	if (pinfo[NL80211_MPATH_INFO_SN])
 		printf("\t%u",
-			nla_get_u32(pinfo[NL80211_MPATH_INFO_DSN]));
+			nla_get_u32(pinfo[NL80211_MPATH_INFO_SN]));
 	if (pinfo[NL80211_MPATH_INFO_METRIC])
 		printf("\t%u",
 			nla_get_u32(pinfo[NL80211_MPATH_INFO_METRIC]));
@@ -184,7 +184,7 @@ static int handle_mpath_dump(struct nl80211_state *state,
 			     struct nl_msg *msg,
 			     int argc, char **argv)
 {
-	printf("DEST ADDR         NEXT HOP          IFACE\tDSN\tMETRIC\tQLEN\t"
+	printf("DEST ADDR         NEXT HOP          IFACE\tSN\tMETRIC\tQLEN\t"
 	       "EXPTIME\t\tDTIM\tDRET\tFLAGS\n");
 	nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_mpath_handler, NULL);
 	return 0;
diff --git a/nl80211.h b/nl80211.h
index a8d71ed..8d58267 100644
--- a/nl80211.h
+++ b/nl80211.h
@@ -895,14 +895,14 @@ enum nl80211_sta_info {
  *
  * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active
  * @NL80211_MPATH_FLAG_RESOLVING: the mesh path discovery process is running
- * @NL80211_MPATH_FLAG_DSN_VALID: the mesh path contains a valid DSN
+ * @NL80211_MPATH_FLAG_SN_VALID: the mesh path contains a valid SN
  * @NL80211_MPATH_FLAG_FIXED: the mesh path has been manually set
  * @NL80211_MPATH_FLAG_RESOLVED: the mesh path discovery process succeeded
  */
 enum nl80211_mpath_flags {
 	NL80211_MPATH_FLAG_ACTIVE =	1<<0,
 	NL80211_MPATH_FLAG_RESOLVING =	1<<1,
-	NL80211_MPATH_FLAG_DSN_VALID =	1<<2,
+	NL80211_MPATH_FLAG_SN_VALID =	1<<2,
 	NL80211_MPATH_FLAG_FIXED =	1<<3,
 	NL80211_MPATH_FLAG_RESOLVED =	1<<4,
 };
@@ -915,7 +915,7 @@ enum nl80211_mpath_flags {
  *
  * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved
  * @NL80211_ATTR_MPATH_FRAME_QLEN: number of queued frames for this destination
- * @NL80211_ATTR_MPATH_DSN: destination sequence number
+ * @NL80211_ATTR_MPATH_SN: destination sequence number
  * @NL80211_ATTR_MPATH_METRIC: metric (cost) of this mesh path
  * @NL80211_ATTR_MPATH_EXPTIME: expiration time for the path, in msec from now
  * @NL80211_ATTR_MPATH_FLAGS: mesh path flags, enumerated in
@@ -926,7 +926,7 @@ enum nl80211_mpath_flags {
 enum nl80211_mpath_info {
 	__NL80211_MPATH_INFO_INVALID,
 	NL80211_MPATH_INFO_FRAME_QLEN,
-	NL80211_MPATH_INFO_DSN,
+	NL80211_MPATH_INFO_SN,
 	NL80211_MPATH_INFO_METRIC,
 	NL80211_MPATH_INFO_EXPTIME,
 	NL80211_MPATH_INFO_FLAGS,
@@ -1196,6 +1196,8 @@ enum nl80211_mntr_flags {
  * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs)
  * that it takes for an HWMP information element to propagate across the mesh
  *
+ * @NL80211_MESHCONF_ROOTMODE: whether root mode is enabled or not
+ *
  * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
  *
  * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
@@ -1215,6 +1217,7 @@ enum nl80211_meshconf_params {
 	NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT,
 	NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
 	NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
+	NL80211_MESHCONF_HWMP_ROOTMODE,
 
 	/* keep last */
 	__NL80211_MESHCONF_ATTR_AFTER_LAST,
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux