]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Add a config option to control beaconing
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Sat, 20 Jul 2013 14:20:43 +0000 (17:20 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 20 Jul 2013 14:20:43 +0000 (17:20 +0300)
In a AP/STA concurrent setup, if the STA interface is continually
scanning, trying to connect to a network, the AP interface
is basically broken since beaconing would be erratic.

This option can be used in a WDS setup where one AP acts as a
Client/AP-Repeater. The Repeater AP interface has to start beaconing
only after the Client interface has established a WDS link with the
"Root AP".

Signed-hostap: Sujith Manoharan <c_manoha@qca.qualcomm.com>

hostapd/config_file.c
hostapd/hostapd.conf
src/ap/ap_config.h
src/ap/hostapd.c

index 8e6f35a5f7e4073d4d13ab2b02ee6d498f2db844..bf17abec3c963b7546e1c890652356b3b47ece9d 100644 (file)
@@ -1781,6 +1781,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
                        }
                } else if (os_strcmp(buf, "wds_sta") == 0) {
                        bss->wds_sta = atoi(pos);
+               } else if (os_strcmp(buf, "start_disabled") == 0) {
+                       bss->start_disabled = atoi(pos);
                } else if (os_strcmp(buf, "ap_isolate") == 0) {
                        bss->isolate = atoi(pos);
                } else if (os_strcmp(buf, "ap_max_inactivity") == 0) {
index 68c40694649511f742d49f8cdb9f918395479599..c46dff5d76dcc9af7a82d1cd7f71e11c7c80ac3d 100644 (file)
@@ -389,6 +389,9 @@ wmm_ac_vo_acm=0
 # use a separate bridge.
 #wds_bridge=wds-br0
 
+# Start the AP with beaconing disabled by default.
+#start_disabled=0
+
 # Client isolation can be used to prevent low-level bridging of frames between
 # associated stations in the BSS. By default, this bridging is allowed.
 #ap_isolate=1
index a744ba627d895bd66e6da4df09ed298ee6b22df9..c9b25992cdcdf56c9d1acc329fc5563cf393c1b3 100644 (file)
@@ -243,6 +243,7 @@ struct hostapd_bss_config {
        int num_deny_mac;
        int wds_sta;
        int isolate;
+       int start_disabled;
 
        int auth_algs; /* bitfield of allowed IEEE 802.11 authentication
                        * algorithms, WPA_AUTH_ALG_{OPEN,SHARED,LEAP} */
index 780b2e2ef9fc6fdbfe3696ed9c63141e8bae4c02..ac6700155d8e24b6cfe74023ee6fc6c4b0591151 100644 (file)
@@ -806,7 +806,8 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
                return -1;
        }
 
-       ieee802_11_set_beacon(hapd);
+       if (!hapd->conf->start_disabled)
+               ieee802_11_set_beacon(hapd);
 
        if (hapd->wpa_auth && wpa_init_keys(hapd->wpa_auth) < 0)
                return -1;