aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh_mpm.c
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2014-12-19 05:59:54 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-21 21:59:40 (GMT)
commitd5b95325de03c8ca2114b1d6abc5e656ec535595 (patch)
tree0ed1df4bfdb0b5c2c502ad31da714a9996b8d1e5 /wpa_supplicant/mesh_mpm.c
parent46e8d90f6a8ba29ccd1ef2b9b951f9ca3aaa93b2 (diff)
downloadhostap-d5b95325de03c8ca2114b1d6abc5e656ec535595.zip
hostap-d5b95325de03c8ca2114b1d6abc5e656ec535595.tar.gz
hostap-d5b95325de03c8ca2114b1d6abc5e656ec535595.tar.bz2
mesh: Fill Number of Peerings field in Mesh Formation Info
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'wpa_supplicant/mesh_mpm.c')
-rw-r--r--wpa_supplicant/mesh_mpm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index 6d08f48..ff909fa 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -244,6 +244,8 @@ static void mesh_mpm_send_plink_action(struct wpa_supplicant *wpa_s,
wpabuf_put_u8(buf, type);
if (type != PLINK_CLOSE) {
+ u8 info;
+
/* capability info */
wpabuf_put_le16(buf, ampe ? IEEE80211_CAP_PRIVACY : 0);
@@ -269,8 +271,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);
+ info = (bss->num_plinks > 63 ? 63 : bss->num_plinks) << 1;
+ /* TODO: Add Connected to Mesh Gate/AS subfields */
+ wpabuf_put_u8(buf, info);
/* always forwarding & accepting plinks for now */
wpabuf_put_u8(buf, 0x1 | 0x8);
} else { /* Peer closing frame */