[PATCH] mesh: Make beacon interval configurable
Masashi Honma
masashi.honma
Tue Dec 16 01:52:25 PST 2014
Signed-off-by: Masashi Honma <masashi.honma at gmail.com>
---
src/drivers/driver.h | 1 +
src/drivers/driver_nl80211.c | 7 +++++++
wpa_supplicant/mesh.c | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index f94f57a..4fcc648 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -952,6 +952,7 @@ struct wpa_driver_mesh_join_params {
const u8 *ies;
int ie_len;
int freq;
+ int beacon_int;
enum ht_mode ht_mode;
struct wpa_driver_mesh_bss_params conf;
#define WPA_DRIVER_MESH_FLAG_USER_MPM 0x00000001
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index a7a536d..f6d5507 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -7769,6 +7769,13 @@ wpa_driver_nl80211_join_mesh(void *priv,
goto fail;
}
+ if (params->beacon_int > 0) {
+ wpa_printf(MSG_DEBUG, " * beacon_int=%d", params->beacon_int);
+ if (nla_put_u32(msg, NL80211_ATTR_BEACON_INTERVAL,
+ params->beacon_int))
+ goto fail;
+ }
+
wpa_printf(MSG_DEBUG, " * flags=%08X", params->flags);
container = nla_nest_start(msg, NL80211_ATTR_MESH_SETUP);
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index 68187e0..7adfa63 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -319,6 +319,10 @@ int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
params.meshid = ssid->ssid;
params.meshid_len = ssid->ssid_len;
params.freq = ssid->frequency;
+ if (ssid->beacon_int > 0)
+ params.beacon_int = ssid->beacon_int;
+ else if (wpa_s->conf->beacon_int > 0)
+ params.beacon_int = wpa_s->conf->beacon_int;
#ifdef CONFIG_IEEE80211N
params.ht_mode = ssid->mesh_ht_mode;
#endif /* CONFIG_IEEE80211N */
--
1.9.1
More information about the Hostap
mailing list