]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Add provision to configure inactivity period in AP mode
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Tue, 27 Mar 2012 17:41:27 +0000 (20:41 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 27 Mar 2012 17:49:44 +0000 (20:49 +0300)
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>

wpa_supplicant/ap.c
wpa_supplicant/config.c
wpa_supplicant/config_ssid.h
wpa_supplicant/wpa_supplicant.conf

index 48a6169bea9d6625995f774a924247db754313c9..d18e3f1c28ddef08abbd6117aee3955067063d17 100644 (file)
@@ -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)
index a90e9d365dc7d282f8027129b9d2ecccdc1f3b71..9ca8f6387c2255f85234b01f5663a3df9d705832 100644 (file)
@@ -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
index f2bb5974032f61aaf2379d5699f5b71fd7889c60..fa18826e4536a703884d3ba235f9dd022659215a 100644 (file)
@@ -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 */
index 70d3030e52e60b00ad1ffcea8a9e3d2748368b26..fb8ea259adda0ae0050099ec8e27aee844193448 100644 (file)
@@ -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