aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/ap.c7
-rw-r--r--wpa_supplicant/config.c3
-rw-r--r--wpa_supplicant/config.h16
-rw-r--r--wpa_supplicant/config_file.c6
-rw-r--r--wpa_supplicant/config_ssid.h5
-rw-r--r--wpa_supplicant/wpa_supplicant.conf9
6 files changed, 46 insertions, 0 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 82b7e19..720ff7b 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -209,6 +209,13 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
if (ssid->dtim_period)
bss->dtim_period = ssid->dtim_period;
+ else if (wpa_s->conf->dtim_period)
+ bss->dtim_period = wpa_s->conf->dtim_period;
+
+ if (ssid->beacon_int)
+ conf->beacon_int = ssid->beacon_int;
+ else if (wpa_s->conf->beacon_int)
+ conf->beacon_int = wpa_s->conf->beacon_int;
if ((bss->wpa & 2) && bss->rsn_pairwise == 0)
bss->rsn_pairwise = bss->wpa_pairwise;
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index ee634a5..91d82ae 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -1545,6 +1545,7 @@ static const struct parse_data ssid_fields[] = {
#endif /* CONFIG_HT_OVERRIDES */
{ INT(ap_max_inactivity) },
{ INT(dtim_period) },
+ { INT(beacon_int) },
};
#undef OFFSET
@@ -2991,6 +2992,8 @@ static const struct global_parse_data global_fields[] = {
{ INT(okc), 0 },
{ INT(pmf), 0 },
{ FUNC(sae_groups), 0 },
+ { INT(dtim_period), 0 },
+ { INT(beacon_int), 0 },
};
#undef FUNC
diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h
index 2b88bb5..2e3e76b 100644
--- a/wpa_supplicant/config.h
+++ b/wpa_supplicant/config.h
@@ -817,6 +817,22 @@ struct wpa_config {
* groups will be tried in the indicated order.
*/
int *sae_groups;
+
+ /**
+ * dtim_period - Default DTIM period in Beacon intervals
+ *
+ * This parameter can be used to set the default value for network
+ * blocks that do not specify dtim_period.
+ */
+ int dtim_period;
+
+ /**
+ * beacon_int - Default Beacon interval in TU
+ *
+ * This parameter can be used to set the default value for network
+ * blocks that do not specify beacon_int.
+ */
+ int beacon_int;
};
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index f29f7a6..ff99cd7 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -690,6 +690,8 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
#ifdef CONFIG_P2P
write_p2p_client_list(f, ssid);
#endif /* CONFIG_P2P */
+ INT(dtim_period);
+ INT(beacon_int);
#undef STR
#undef INT
@@ -974,6 +976,10 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
fprintf(f, "okc=%d\n", config->okc);
if (config->pmf)
fprintf(f, "pmf=%d\n", config->pmf);
+ if (config->dtim_period)
+ fprintf(f, "dtim_period=%d\n", config->dtim_period);
+ if (config->beacon_int)
+ fprintf(f, "beacon_int=%d\n", config->beacon_int);
if (config->sae_groups) {
int i;
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
index 9ac67c7..8cab88f 100644
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -549,6 +549,11 @@ struct wpa_ssid {
int dtim_period;
/**
+ * beacon_int - Beacon interval (default: 100 TU)
+ */
+ int beacon_int;
+
+ /**
* auth_failures - Number of consecutive authentication failures
*/
unsigned int auth_failures;
diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
index 18460b8..c9deb4b 100644
--- a/wpa_supplicant/wpa_supplicant.conf
+++ b/wpa_supplicant/wpa_supplicant.conf
@@ -289,6 +289,12 @@ fast_reauth=1
# http://www.iana.org/assignments/ipsec-registry/ipsec-registry.xml#ipsec-registry-9
#sae_groups=21 20 19 26 25
+# Default value for DTIM period (if not overridden in network block)
+#dtim_period=2
+
+# Default value for Beacon interval (if not overridden in network block)
+#beacon_int=100
+
# Interworking (IEEE 802.11u)
# Enable Interworking
@@ -832,6 +838,9 @@ fast_reauth=1
# DTIM period in Beacon intervals for AP mode (default: 2)
#dtim_period=2
+# Beacon interval (default: 100 TU)
+#beacon_int=100
+
# disable_ht: Whether HT (802.11n) should be disabled.
# 0 = HT enabled (if AP supports it)
# 1 = HT disabled