aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>2012-03-27 17:41:27 (GMT)
committerJouni Malinen <j@w1.fi>2012-03-27 17:49:44 (GMT)
commit07f53b8cc75c1c8ac6aa7eaaa8f625a7eed4de7d (patch)
tree0d7e13d9b1fa2387fa5b7bc67955847c1ec56043 /wpa_supplicant
parent17e729d49c32a02b815864ae8b85b81d24fef533 (diff)
downloadhostap-07f53b8cc75c1c8ac6aa7eaaa8f625a7eed4de7d.zip
hostap-07f53b8cc75c1c8ac6aa7eaaa8f625a7eed4de7d.tar.gz
hostap-07f53b8cc75c1c8ac6aa7eaaa8f625a7eed4de7d.tar.bz2
wpa_supplicant: Add provision to configure inactivity period in AP mode
This patch adds a configuration in network block, ap_max_inactivity, for station's inactivity period when in AP mode. The time period is configured in seconds, by default 300 seconds. Signed-hostap: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/ap.c3
-rw-r--r--wpa_supplicant/config.c1
-rw-r--r--wpa_supplicant/config_ssid.h8
-rw-r--r--wpa_supplicant/wpa_supplicant.conf17
4 files changed, 29 insertions, 0 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 48a6169..d18e3f1 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -181,6 +181,9 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
wep->keys_set = 1;
}
+ if (ssid->ap_max_inactivity)
+ bss->ap_max_inactivity = ssid->ap_max_inactivity;
+
/* Select group cipher based on the enabled pairwise cipher suites */
pairwise = 0;
if (bss->wpa & 1)
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index a90e9d3..9ca8f63 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -1602,6 +1602,7 @@ static const struct parse_data ssid_fields[] = {
{ INT_RANGE(ampdu_density, -1, 7) },
{ STR(ht_mcs) },
#endif /* CONFIG_HT_OVERRIDES */
+ { INT(ap_max_inactivity) },
};
#undef OFFSET
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
index f2bb597..fa18826 100644
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -484,6 +484,14 @@ struct wpa_ssid {
*/
char *ht_mcs;
#endif /* CONFIG_HT_OVERRIDES */
+
+ /**
+ * ap_max_inactivity - Timeout in seconds to detect STA's inactivity
+ *
+ * This timeout value is used in AP mode to clean up inactive stations.
+ * By default: 300 seconds.
+ */
+ int ap_max_inactivity;
};
#endif /* CONFIG_SSID_H */
diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
index 70d3030..fb8ea25 100644
--- a/wpa_supplicant/wpa_supplicant.conf
+++ b/wpa_supplicant/wpa_supplicant.conf
@@ -653,6 +653,23 @@ fast_reauth=1
# number of authentication servers. Strict EAP conformance mode can be
# configured by disabling workarounds with eap_workaround=0.
+# Station inactivity limit
+#
+# If a station does not send anything in ap_max_inactivity seconds, an
+# empty data frame is sent to it in order to verify whether it is
+# still in range. If this frame is not ACKed, the station will be
+# disassociated and then deauthenticated. This feature is used to
+# clear station table of old entries when the STAs move out of the
+# range.
+#
+# The station can associate again with the AP if it is still in range;
+# this inactivity poll is just used as a nicer way of verifying
+# inactivity; i.e., client will not report broken connection because
+# disassociation frame is not sent immediately without first polling
+# the STA with a data frame.
+# default: 300 (i.e., 5 minutes)
+#ap_max_inactivity=300
+
# Example blocks:
# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers