mesh: Make beacon interval configurable

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
This commit is contained in:
Masashi Honma 2014-12-16 18:52:25 +09:00 committed by Jouni Malinen
parent 3b797130d7
commit 9c58c5f72c
3 changed files with 12 additions and 0 deletions

View file

@ -952,6 +952,7 @@ struct wpa_driver_mesh_join_params {
const u8 *ies; const u8 *ies;
int ie_len; int ie_len;
int freq; int freq;
int beacon_int;
enum ht_mode ht_mode; enum ht_mode ht_mode;
struct wpa_driver_mesh_bss_params conf; struct wpa_driver_mesh_bss_params conf;
#define WPA_DRIVER_MESH_FLAG_USER_MPM 0x00000001 #define WPA_DRIVER_MESH_FLAG_USER_MPM 0x00000001

View file

@ -7761,6 +7761,13 @@ wpa_driver_nl80211_join_mesh(void *priv,
goto fail; 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); wpa_printf(MSG_DEBUG, " * flags=%08X", params->flags);
container = nla_nest_start(msg, NL80211_ATTR_MESH_SETUP); container = nla_nest_start(msg, NL80211_ATTR_MESH_SETUP);

View file

@ -319,6 +319,10 @@ int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
params.meshid = ssid->ssid; params.meshid = ssid->ssid;
params.meshid_len = ssid->ssid_len; params.meshid_len = ssid->ssid_len;
params.freq = ssid->frequency; 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 #ifdef CONFIG_IEEE80211N
params.ht_mode = ssid->mesh_ht_mode; params.ht_mode = ssid->mesh_ht_mode;
#endif /* CONFIG_IEEE80211N */ #endif /* CONFIG_IEEE80211N */