From 159c89ab4f09768b7c86b835a7752aed04668a0d Mon Sep 17 00:00:00 2001 From: Jay Katabathuni Date: Thu, 8 Sep 2011 20:52:23 +0300 Subject: [PATCH] HS 2.0: Add configuration for Hotspot 2.0 AP support Signed-hostap: Jouni Malinen --- hostapd/Makefile | 5 +++++ hostapd/config_file.c | 4 ++++ hostapd/defconfig | 3 +++ hostapd/hostapd.conf | 5 +++++ src/ap/ap_config.h | 4 ++++ 5 files changed, 21 insertions(+) diff --git a/hostapd/Makefile b/hostapd/Makefile index b43aa75aa..aed4b8905 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -770,6 +770,11 @@ CFLAGS += -DCONFIG_P2P_MANAGER OBJS += ../src/ap/p2p_hostapd.o endif +ifdef CONFIG_HS20 +CFLAGS += -DCONFIG_HS20 +CONFIG_INTERWORKING=y +endif + ifdef CONFIG_INTERWORKING CFLAGS += -DCONFIG_INTERWORKING OBJS += ../src/common/gas.o diff --git a/hostapd/config_file.c b/hostapd/config_file.c index eebbaa689..9edc80ddb 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -2439,6 +2439,10 @@ static int hostapd_config_fill(struct hostapd_config *conf, os_free(bss->dump_msk_file); bss->dump_msk_file = os_strdup(pos); #endif /* CONFIG_RADIUS_TEST */ +#ifdef CONFIG_HS20 + } else if (os_strcmp(buf, "hs20") == 0) { + bss->hs20 = atoi(pos); +#endif /* CONFIG_HS20 */ } else { wpa_printf(MSG_ERROR, "Line %d: unknown configuration " "item '%s'", line, buf); diff --git a/hostapd/defconfig b/hostapd/defconfig index 9c5b13a42..f9655186a 100644 --- a/hostapd/defconfig +++ b/hostapd/defconfig @@ -257,3 +257,6 @@ CONFIG_IPV6=y # This can be used to enable functionality to improve interworking with # external networks. #CONFIG_INTERWORKING=y + +# Hotspot 2.0 +#CONFIG_HS20=y diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index 4d47bbd80..48aae5316 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -1325,6 +1325,11 @@ own_ip_addr=127.0.0.1 #venue_name=eng:Example venue #venue_name=fin:Esimerkkipaikka +##### Hotspot 2.0 ############################################################# + +# Enable Hotspot 2.0 support +#hs20=1 + ##### Multiple BSSID support ################################################## # # Above configuration is using the default interface (wlan#, or multi-SSID VLAN diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index ca4fe58c8..e3834ade8 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -394,6 +394,10 @@ struct hostapd_bss_config { u16 gas_comeback_delay; int gas_frag_limit; +#ifdef CONFIG_HS20 + int hs20; +#endif /* CONFIG_HS20 */ + u8 wps_rf_bands; /* RF bands for WPS (WPS_RF_*) */ #ifdef CONFIG_RADIUS_TEST