aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJay Katabathuni <jkatabat@qca.qualcomm.com>2012-02-26 22:34:19 +0200
committerJouni Malinen <j@w1.fi>2012-02-26 22:52:53 +0200
commitdca30c3fb7550ad7c964c3aaa92cab16c3c489ed (patch)
tree308f4bd10a4319f967d58251bcb96a34b59ff373 /hostapd
parentfb80e86e7d872e3f5a2dae815d33aff98c750e55 (diff)
downloadexternal_wpa_supplicant_8_ti-dca30c3fb7550ad7c964c3aaa92cab16c3c489ed.zip
external_wpa_supplicant_8_ti-dca30c3fb7550ad7c964c3aaa92cab16c3c489ed.tar.gz
external_wpa_supplicant_8_ti-dca30c3fb7550ad7c964c3aaa92cab16c3c489ed.tar.bz2
Interworking: Add GAS server support for AP mode
This adds GAS/ANQP implementation into hostapd. This commit brings in the basic GAS/ANQP functionality, but only the ANQP Capability List element is supported. For testing purposes, hostapd control interface SET command can be used to set the gas_frag_limit parameter dynamically. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/Makefile2
-rw-r--r--hostapd/config_file.c4
-rw-r--r--hostapd/ctrl_iface.c8
3 files changed, 14 insertions, 0 deletions
diff --git a/hostapd/Makefile b/hostapd/Makefile
index 22c09c1..05a363b 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -759,6 +759,8 @@ endif
ifdef CONFIG_INTERWORKING
CFLAGS += -DCONFIG_INTERWORKING
+OBJS += ../src/common/gas.o
+OBJS += ../src/ap/gas_serv.o
endif
OBJS += ../src/drivers/driver_common.o
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 77a34fb..d20496a 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2113,6 +2113,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
} else if (os_strcmp(buf, "roaming_consortium") == 0) {
if (parse_roaming_consortium(bss, pos, line) < 0)
errors++;
+ } else if (os_strcmp(buf, "gas_frag_limit") == 0) {
+ bss->gas_frag_limit = atoi(pos);
+ } else if (os_strcmp(buf, "gas_comeback_delay") == 0) {
+ bss->gas_comeback_delay = atoi(pos);
#endif /* CONFIG_INTERWORKING */
#ifdef CONFIG_RADIUS_TEST
} else if (os_strcmp(buf, "dump_msk_file") == 0) {
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index 0fe761b..b1bafc1 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -607,6 +607,14 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
wpa_printf(MSG_DEBUG, "WPS: Testing - dummy_cred=%d",
wps_testing_dummy_cred);
#endif /* CONFIG_WPS_TESTING */
+#ifdef CONFIG_INTERWORKING
+ } else if (os_strcasecmp(cmd, "gas_frag_limit") == 0) {
+ int val = atoi(value);
+ if (val <= 0)
+ ret = -1;
+ else
+ hapd->gas_frag_limit = val;
+#endif /* CONFIG_INTERWORKING */
} else {
ret = hostapd_set_iface(hapd->iconf, hapd->conf, cmd, value);
}