mesh: Make DTIM period configurable
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
This commit is contained in:
parent
fac72f93dd
commit
4ac2ea5738
3 changed files with 19 additions and 2 deletions
|
@ -1135,6 +1135,7 @@ struct wpa_driver_mesh_join_params {
|
|||
int ie_len;
|
||||
struct hostapd_freq_params freq;
|
||||
int beacon_int;
|
||||
int dtim_period;
|
||||
int max_peer_links;
|
||||
struct wpa_driver_mesh_bss_params conf;
|
||||
#define WPA_DRIVER_MESH_FLAG_USER_MPM 0x00000001
|
||||
|
|
|
@ -3468,6 +3468,17 @@ static int nl80211_put_beacon_int(struct nl_msg *msg, int beacon_int)
|
|||
}
|
||||
|
||||
|
||||
static int nl80211_put_dtim_period(struct nl_msg *msg, int dtim_period)
|
||||
{
|
||||
if (dtim_period > 0) {
|
||||
wpa_printf(MSG_DEBUG, " * dtim_period=%d", dtim_period);
|
||||
return nla_put_u32(msg, NL80211_ATTR_DTIM_PERIOD, dtim_period);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int wpa_driver_nl80211_set_ap(void *priv,
|
||||
struct wpa_driver_ap_params *params)
|
||||
{
|
||||
|
@ -3504,7 +3515,7 @@ static int wpa_driver_nl80211_set_ap(void *priv,
|
|||
nla_put(msg, NL80211_ATTR_BEACON_TAIL, params->tail_len,
|
||||
params->tail) ||
|
||||
nl80211_put_beacon_int(msg, params->beacon_int) ||
|
||||
nla_put_u32(msg, NL80211_ATTR_DTIM_PERIOD, params->dtim_period) ||
|
||||
nl80211_put_dtim_period(msg, params->dtim_period) ||
|
||||
nla_put(msg, NL80211_ATTR_SSID, params->ssid_len, params->ssid))
|
||||
goto fail;
|
||||
if (params->proberesp && params->proberesp_len) {
|
||||
|
@ -8400,7 +8411,8 @@ static int nl80211_join_mesh(struct i802_bss *bss,
|
|||
nl80211_put_freq_params(msg, ¶ms->freq) ||
|
||||
nl80211_put_basic_rates(msg, params->basic_rates) ||
|
||||
nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
|
||||
nl80211_put_beacon_int(msg, params->beacon_int))
|
||||
nl80211_put_beacon_int(msg, params->beacon_int) ||
|
||||
nl80211_put_dtim_period(msg, params->dtim_period))
|
||||
goto fail;
|
||||
|
||||
wpa_printf(MSG_DEBUG, " * flags=%08X", params->flags);
|
||||
|
|
|
@ -400,6 +400,10 @@ int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
|
|||
params.beacon_int = ssid->beacon_int;
|
||||
else if (wpa_s->conf->beacon_int > 0)
|
||||
params.beacon_int = wpa_s->conf->beacon_int;
|
||||
if (ssid->dtim_period > 0)
|
||||
params.dtim_period = ssid->dtim_period;
|
||||
else if (wpa_s->conf->dtim_period > 0)
|
||||
params.dtim_period = wpa_s->conf->dtim_period;
|
||||
params.max_peer_links = wpa_s->conf->max_peer_links;
|
||||
|
||||
if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
|
||||
|
|
Loading…
Reference in a new issue