]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Make CONFIG_TESTING_OPTIONS=y enable all testing options
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 28 Nov 2013 13:34:24 +0000 (15:34 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 26 Dec 2013 18:50:28 +0000 (20:50 +0200)
This makes it easier to enable various testing parameters and
functionality in build configuration.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

hostapd/Makefile
tests/hwsim/example-hostapd.config
tests/hwsim/example-wpa_supplicant.config
wpa_supplicant/Makefile
wpa_supplicant/ctrl_iface.c

index e60ae9beafc0ef4a23052b79335365be1aa158ea..753781406ee7e51786f63a3fab4ffaa519322bfd 100644 (file)
@@ -15,6 +15,11 @@ CFLAGS += -I$(abspath ../src/utils)
 
 -include .config
 
+ifdef CONFIG_TESTING_OPTIONS
+CFLAGS += -DCONFIG_TESTING_OPTIONS
+CONFIG_WPS_TESTING=y
+endif
+
 ifndef CONFIG_OS
 ifdef CONFIG_NATIVE_WINDOWS
 CONFIG_OS=win32
@@ -858,10 +863,6 @@ LIBS += -lsqlite3
 LIBS_h += -lsqlite3
 endif
 
-ifdef CONFIG_TESTING_OPTIONS
-CFLAGS += -DCONFIG_TESTING_OPTIONS
-endif
-
 ALL=hostapd hostapd_cli
 
 all: verify_config $(ALL)
index 89dc6a883118bf8d45217205694710ff4d7533be..c565e428c973a41beca23f18d44856686d2294e6 100644 (file)
@@ -68,3 +68,5 @@ CONFIG_HS20=y
 #CONFIG_SQLITE=y
 CONFIG_SAE=y
 CFLAGS += -DALL_DH_GROUPS
+
+CONFIG_TESTING_OPTIONS=y
index 34525ccf8e4658f9dc39777105c6f1fcddd30964..67c9768d428f2ffba1e72f0dc4d56177b9f89fc8 100644 (file)
@@ -110,6 +110,8 @@ CFLAGS += -DALL_DH_GROUPS
 
 CONFIG_WNM=y
 
+CONFIG_TESTING_OPTIONS=y
+
 # gcov code coverage from the virtual machine
 #CONFIG_CODE_COVERAGE=y
 #CFLAGS += -fprofile-dir=/tmp/logs/gcov
index 8ade64c17b77ddd9e14c54df2c0cb87aa9781bb4..2c709c3304634c8dfc60dd5de0363a04917f461e 100644 (file)
@@ -15,6 +15,12 @@ CFLAGS += -I$(abspath ../src/utils)
 
 -include .config
 
+ifdef CONFIG_TESTING_OPTIONS
+CFLAGS += -DCONFIG_TESTING_OPTIONS
+CONFIG_WPS_TESTING=y
+CONFIG_TDLS_TESTING=y
+endif
+
 BINALL=wpa_supplicant wpa_cli
 
 ifndef CONFIG_NO_WPA_PASSPHRASE
index f09c886f4d0350d205083ffea3a7d7ed0dff68e6..0495c5b947077f42c4f41fcda43b2887273483b8 100644 (file)
@@ -361,13 +361,13 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
        } else if (os_strcasecmp(cmd, "ampdu") == 0) {
                if (wpa_drv_ampdu(wpa_s, atoi(value)) < 0)
                        ret = -1;
+#ifdef CONFIG_TDLS
 #ifdef CONFIG_TDLS_TESTING
        } else if (os_strcasecmp(cmd, "tdls_testing") == 0) {
                extern unsigned int tdls_testing;
                tdls_testing = strtol(value, NULL, 0);
                wpa_printf(MSG_DEBUG, "TDLS: tdls_testing=0x%x", tdls_testing);
 #endif /* CONFIG_TDLS_TESTING */
-#ifdef CONFIG_TDLS
        } else if (os_strcasecmp(cmd, "tdls_disabled") == 0) {
                int disabled = atoi(value);
                wpa_printf(MSG_DEBUG, "TDLS: tdls_disabled=%d", disabled);
@@ -5172,11 +5172,11 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
        wpa_s->after_wps = 0;
        wpa_s->known_wps_freq = 0;
 
+#ifdef CONFIG_TDLS
 #ifdef CONFIG_TDLS_TESTING
        extern unsigned int tdls_testing;
        tdls_testing = 0;
 #endif /* CONFIG_TDLS_TESTING */
-#ifdef CONFIG_TDLS
        wpa_drv_tdls_oper(wpa_s, TDLS_ENABLE, NULL);
        wpa_tdls_enable(wpa_s->wpa, 1);
 #endif /* CONFIG_TDLS */