[PATCH 3/3] mesh: Fill Number of Peerings field in Mesh Formation Info

Masashi Honma masashi.honma
Thu Dec 18 21:59:54 PST 2014


Signed-off-by: Masashi Honma <masashi.honma at gmail.com>
---
 wpa_supplicant/mesh_mpm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index de1d24d..639d360 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -269,8 +269,9 @@ static void mesh_mpm_send_plink_action(struct wpa_supplicant *wpa_s,
 		wpabuf_put_u8(buf, conf->mesh_cc_id);
 		wpabuf_put_u8(buf, conf->mesh_sp_id);
 		wpabuf_put_u8(buf, conf->mesh_auth_id);
-		/* TODO: formation info */
-		wpabuf_put_u8(buf, 0);
+		/* TODO: Add Connected to Mesh Gate/AS bit*/
+		wpabuf_put_u8(buf,
+			(bss->num_plinks > 63 ? 63 : bss->num_plinks) << 1);
 		/* always forwarding & accepting plinks for now */
 		wpabuf_put_u8(buf, 0x1 | 0x8);
 	} else {	/* Peer closing frame */
-- 
1.9.1




More information about the Hostap mailing list