|
@@ -220,21 +220,28 @@ static void mesh_mpm_send_plink_action(struct wpa_supplicant *wpa_s,
|
|
u8 ie_len, add_plid = 0;
|
|
u8 ie_len, add_plid = 0;
|
|
int ret;
|
|
int ret;
|
|
int ampe = conf->security & MESH_CONF_SEC_AMPE;
|
|
int ampe = conf->security & MESH_CONF_SEC_AMPE;
|
|
|
|
+ size_t buf_len;
|
|
|
|
|
|
if (!sta)
|
|
if (!sta)
|
|
return;
|
|
return;
|
|
|
|
|
|
- buf = wpabuf_alloc(2 +
|
|
+ buf_len = 2 +
|
|
- 2 +
|
|
+ 2 +
|
|
- 2 + 8 +
|
|
+ 2 + 8 +
|
|
- 2 + (32 - 8) +
|
|
+ 2 + (32 - 8) +
|
|
- 2 + 32 +
|
|
+ 2 + 32 +
|
|
- 2 + 7 +
|
|
+ 2 + 7 +
|
|
- 2 + 26 +
|
|
+ 2 + 23 +
|
|
- 2 + 22 +
|
|
+ 2 + 96 +
|
|
- 2 + 23 +
|
|
+ 2 + 16;
|
|
- 2 + 96 +
|
|
+#ifdef CONFIG_IEEE80211N
|
|
- 2 + 16);
|
|
+ if (type != PLINK_CLOSE &&
|
|
|
|
+ wpa_s->current_ssid->mesh_ht_mode > CHAN_NO_HT) {
|
|
|
|
+ buf_len += 2 + 26 +
|
|
|
|
+ 2 + 22;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+ buf = wpabuf_alloc(buf_len);
|
|
if (!buf)
|
|
if (!buf)
|
|
return;
|
|
return;
|
|
|
|
|