Configure beacon interval for IBSS command

wpa_supplicant already allowed beacon interval to be configured for AP
mode operations, but this was not passed to the driver for IBSS even
though the same parameter can used for that case. Add this for the
nl80211 driver interface to allow beacon interval to be controlled for
IBSS as well.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2014-03-06 23:09:20 +02:00 committed by Jouni Malinen
parent 5a92bda635
commit 8f05577d11
3 changed files with 19 additions and 0 deletions

View file

@ -447,6 +447,11 @@ struct wpa_driver_associate_params {
*/
int bg_scan_period;
/**
* beacon_int - Beacon interval for IBSS or 0 to use driver default
*/
int beacon_int;
/**
* wpa_ie - WPA information element for (Re)Association Request
* WPA information element to be included in (Re)Association

View file

@ -8377,6 +8377,12 @@ retry:
wpa_printf(MSG_DEBUG, " * freq=%d", params->freq);
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq);
if (params->beacon_int > 0) {
wpa_printf(MSG_DEBUG, " * beacon_int=%d", params->beacon_int);
NLA_PUT_U32(msg, NL80211_ATTR_BEACON_INTERVAL,
params->beacon_int);
}
ret = nl80211_set_conn_keys(params, msg);
if (ret)
goto nla_put_failure;

View file

@ -1714,6 +1714,14 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
if (ssid->mode == WPAS_MODE_IBSS && ssid->frequency > 0 &&
params.freq == 0)
params.freq = ssid->frequency; /* Initial channel for IBSS */
if (ssid->mode == WPAS_MODE_IBSS) {
if (ssid->beacon_int)
params.beacon_int = ssid->beacon_int;
else
params.beacon_int = wpa_s->conf->beacon_int;
}
params.wpa_ie = wpa_ie;
params.wpa_ie_len = wpa_ie_len;
params.pairwise_suite = cipher_pairwise;