Hello again,


2014-05-30 22:22 GMT+09:00 Bob Copeland <m...@bobcopeland.com>:

> From: Jason Mobarak <x...@jason.mobarak.name>
>
> Add a new option "mesh_ht_mode" that specifies the HT mode for the
> mesh, with this option on, mesh beacons, actions frames, and probe
> responses with include the appropriate HT information elements.
>
> Change the mesh tests to check for the presence of HT in the scan
> results, for this to work "disable_scan_offload" must be added to
> p2p*.conf.
>
> Signed-off-by: Ashok Nagarajan <ashok.dra...@gmail.com>
> Signed-off-by: Javier Cardona <jav...@cozybit.com>
> [Original implementation by Chun-Yeow Yeoh <yeohchuny...@gmail.com>]
> Signed-hostap: Jason Mobarak <x...@jason.mobarak.name>
>
> ---
> Still TODO: fixup order of IEs
>


Yes. Order of IEs shall be fixed.
HT capabilities IE and HT operation IE shall be placed after the peering
management IE.
I would suggest to make the following changes.

----
diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index 377f663..5ba8998 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -401,9 +401,9 @@ static void mesh_mpm_send_plink_action(struct
wpa_supplicant *wpa_s,
                           2 + (32 - 8) +
                           2 + 32 + /* mesh ID */
                           2 + 7 +  /* mesh config */
+                          2 + 23 + /* peering management */
                           2 + 26 + /* HT capabilities */
                           2 + 22 + /* HT operation */
-                          2 + 23 + /* peering management */
                           2 + 96 + /* AMPE */
                           2 + 16); /* MIC */
        if (!buf)
@@ -446,11 +446,6 @@ static void mesh_mpm_send_plink_action(struct
wpa_supplicant *wpa_s,
                /* always forwarding & accepting plinks for now */
                /* TODO: PS bits */
                wpabuf_put_u8(buf, 0x1 | 0x8);
-#ifdef CONFIG_IEEE80211N
-               pos = hostapd_eid_ht_capabilities(bss, ht_capa_oper);
-               pos = hostapd_eid_ht_operation(bss, pos);
-               wpabuf_put_data(buf, ht_capa_oper, pos - ht_capa_oper);
-#endif /* CONFIG_IEEE80211N */

        } else {        /* Peer closing frame */
                /* IE: Mesh ID */
@@ -498,6 +493,15 @@ static void mesh_mpm_send_plink_action(struct
wpa_supplicant *wpa_s,
        if (ampe)
                mesh_rsn_get_pmkid(sta, (u8 *) wpabuf_put(buf, PMKID_LEN));

+#ifdef CONFIG_IEEE80211N
+       /* IE: HT Capability & Operation */
+       if (type != PLINK_CLOSE) {
+               pos = hostapd_eid_ht_capabilities(bss, ht_capa_oper);
+               pos = hostapd_eid_ht_operation(bss, pos);
+               wpabuf_put_data(buf, ht_capa_oper, pos - ht_capa_oper);
+       }
+#endif /* CONFIG_IEEE80211N */
+
        if (ampe && mesh_rsn_protect_frame(wpa_s->mesh_rsn, sta, cat, buf))
{
                wpa_msg(wpa_s, MSG_INFO,
                        "Mesh MPM: failed to add AMPE and MIC IE");


----

-- Yu
_______________________________________________
Devel mailing list
Devel@lists.open80211s.org
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

Reply via email to