aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2017-06-12 06:29:27 (GMT)
committerJouni Malinen <j@w1.fi>2017-07-18 10:28:09 (GMT)
commitb5bf84ba39e11de607ef9b9242b2fb7cae3b77d5 (patch)
treedb87a1e0d0b2e8b5ff8adab552ceebf335a6ab70 /hostapd
parent922dcf1b457cf767d184b786175680520bacace0 (diff)
downloadhostap-b5bf84ba39e11de607ef9b9242b2fb7cae3b77d5.zip
hostap-b5bf84ba39e11de607ef9b9242b2fb7cae3b77d5.tar.gz
hostap-b5bf84ba39e11de607ef9b9242b2fb7cae3b77d5.tar.bz2
WNM: Differentiate between WNM for station and for AP in build
Previously, CONFIG_WNM enabled build that supports WNM for both station mode and AP mode. However, in most wpa_supplicant cases only station mode WNM is required and there is no need for AP mode WNM. Add support to differentiate between station mode WNM and AP mode WNM in wpa_supplicant builds by adding CONFIG_WNM_AP that should be used when AP mode WNM support is required in addition to station mode WNM. This allows binary size to be reduced for builds that require only the station side WNM functionality. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/Android.mk2
-rw-r--r--hostapd/Makefile2
-rw-r--r--hostapd/config_file.c4
-rw-r--r--hostapd/ctrl_iface.c8
4 files changed, 8 insertions, 8 deletions
diff --git a/hostapd/Android.mk b/hostapd/Android.mk
index 721fcbb..8684681 100644
--- a/hostapd/Android.mk
+++ b/hostapd/Android.mk
@@ -288,7 +288,7 @@ endif
endif
ifdef CONFIG_WNM
-L_CFLAGS += -DCONFIG_WNM
+L_CFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP
OBJS += src/ap/wnm_ap.c
endif
diff --git a/hostapd/Makefile b/hostapd/Makefile
index fb926fb..15deb5c 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -332,7 +332,7 @@ endif
endif
ifdef CONFIG_WNM
-CFLAGS += -DCONFIG_WNM
+CFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP
OBJS += ../src/ap/wnm_ap.o
endif
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index dfe8ab7..a398bb1 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3258,12 +3258,12 @@ static int hostapd_config_fill(struct hostapd_config *conf,
bss->time_zone = os_strdup(pos);
if (bss->time_zone == NULL)
return 1;
-#ifdef CONFIG_WNM
+#ifdef CONFIG_WNM_AP
} else if (os_strcmp(buf, "wnm_sleep_mode") == 0) {
bss->wnm_sleep_mode = atoi(pos);
} else if (os_strcmp(buf, "bss_transition") == 0) {
bss->bss_transition = atoi(pos);
-#endif /* CONFIG_WNM */
+#endif /* CONFIG_WNM_AP */
#ifdef CONFIG_INTERWORKING
} else if (os_strcmp(buf, "interworking") == 0) {
bss->interworking = atoi(pos);
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index c2eadb5..c2534d1 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -764,7 +764,7 @@ static int hostapd_ctrl_iface_send_qos_map_conf(struct hostapd_data *hapd,
#endif /* CONFIG_INTERWORKING */
-#ifdef CONFIG_WNM
+#ifdef CONFIG_WNM_AP
static int hostapd_ctrl_iface_disassoc_imminent(struct hostapd_data *hapd,
const char *cmd)
@@ -988,7 +988,7 @@ fail:
return ret;
}
-#endif /* CONFIG_WNM */
+#endif /* CONFIG_WNM_AP */
static int hostapd_ctrl_iface_get_key_mgmt(struct hostapd_data *hapd,
@@ -2538,7 +2538,7 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
if (hostapd_ctrl_iface_hs20_deauth_req(hapd, buf + 16))
reply_len = -1;
#endif /* CONFIG_HS20 */
-#ifdef CONFIG_WNM
+#ifdef CONFIG_WNM_AP
} else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) {
if (hostapd_ctrl_iface_disassoc_imminent(hapd, buf + 18))
reply_len = -1;
@@ -2548,7 +2548,7 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
} else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) {
if (hostapd_ctrl_iface_bss_tm_req(hapd, buf + 11))
reply_len = -1;
-#endif /* CONFIG_WNM */
+#endif /* CONFIG_WNM_AP */
} else if (os_strcmp(buf, "GET_CONFIG") == 0) {
reply_len = hostapd_ctrl_iface_get_config(hapd, reply,
reply_size);