From 66aadbd7bf36f50bee51f757027b1f3c4b158d08 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 runtime configuration of Hotspot 2.0 station Signed-hostap: Jouni Malinen --- wpa_supplicant/config.c | 3 +++ wpa_supplicant/config.h | 5 +++++ wpa_supplicant/config_file.c | 4 ++++ wpa_supplicant/wpa_supplicant.conf | 3 +++ 4 files changed, 15 insertions(+) diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index fd53bd3de..de8ff1590 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -2875,6 +2875,9 @@ static const struct global_parse_data global_fields[] = { { INT_RANGE(filter_ssids, 0, 1), 0 }, { INT(max_num_sta), 0 }, { INT_RANGE(disassoc_low_ack, 0, 1), 0 }, +#ifdef CONFIG_HS20 + { INT_RANGE(hs20, 0, 1), 0 }, +#endif /* CONFIG_HS20 */ { INT_RANGE(interworking, 0, 1), 0 }, { FUNC(hessid), 0 }, { INT_RANGE(access_network_type, 0, 15), 0 }, diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h index e68b5a815..119252e70 100644 --- a/wpa_supplicant/config.h +++ b/wpa_supplicant/config.h @@ -612,6 +612,11 @@ struct wpa_config { */ u8 hessid[ETH_ALEN]; + /** + * hs20 - Hotspot 2.0 + */ + int hs20; + /** * pbc_in_m1 - AP mode WPS probing workaround for PBC with Windows 7 * diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index 8a73fa816..ee22e4bbd 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -836,6 +836,10 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config) fprintf(f, "max_num_sta=%u\n", config->max_num_sta); if (config->disassoc_low_ack) fprintf(f, "disassoc_low_ack=%u\n", config->disassoc_low_ack); +#ifdef CONFIG_HS20 + if (config->hs20) + fprintf(f, "hs20=1\n"); +#endif /* CONFIG_HS20 */ #ifdef CONFIG_INTERWORKING if (config->interworking) fprintf(f, "interworking=%u\n", config->interworking); diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf index 6b94c6104..745dc5ba3 100644 --- a/wpa_supplicant/wpa_supplicant.conf +++ b/wpa_supplicant/wpa_supplicant.conf @@ -327,6 +327,9 @@ fast_reauth=1 # milenage="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82" #} +# Hotspot 2.0 +# hs20=1 + # network block # # Each network (usually AP's sharing the same SSID) is configured as a separate