From d503eeead1b0b4a074c104a8826fb989171fdf0c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 19 Nov 2016 23:54:50 +0200 Subject: [PATCH] FT: Complete CONFIG_IEEE80211R_AP renaming for hostapd Commit 4ec1fd8e42bad9390f14a58225b6e5f6fb691950 ('FT: Differentiate between FT for station and for AP in build') renamed all CONFIG_IEEE80211R instances within src/ap/* to CONFIG_IEEE80211R_AP, but it did not change hostapd/* files to match. While this does not cause much harm for normal use cases, this broke some test builds where wpa_supplicant build is used to build in hostapd/*.c files for analysis. Fix this by completing CONFIG_IEEE80211R_AP renaming. Signed-off-by: Jouni Malinen --- hostapd/config_file.c | 16 ++++++++-------- hostapd/ctrl_iface.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 77950150d..8ff31b525 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -685,12 +685,12 @@ static int hostapd_config_parse_key_mgmt(int line, const char *value) val |= WPA_KEY_MGMT_PSK; else if (os_strcmp(start, "WPA-EAP") == 0) val |= WPA_KEY_MGMT_IEEE8021X; -#ifdef CONFIG_IEEE80211R +#ifdef CONFIG_IEEE80211R_AP else if (os_strcmp(start, "FT-PSK") == 0) val |= WPA_KEY_MGMT_FT_PSK; else if (os_strcmp(start, "FT-EAP") == 0) val |= WPA_KEY_MGMT_FT_IEEE8021X; -#endif /* CONFIG_IEEE80211R */ +#endif /* CONFIG_IEEE80211R_AP */ #ifdef CONFIG_IEEE80211W else if (os_strcmp(start, "WPA-PSK-SHA256") == 0) val |= WPA_KEY_MGMT_PSK_SHA256; @@ -716,12 +716,12 @@ static int hostapd_config_parse_key_mgmt(int line, const char *value) val |= WPA_KEY_MGMT_FILS_SHA256; else if (os_strcmp(start, "FILS-SHA384") == 0) val |= WPA_KEY_MGMT_FILS_SHA384; -#ifdef CONFIG_IEEE80211R +#ifdef CONFIG_IEEE80211R_AP else if (os_strcmp(start, "FT-FILS-SHA256") == 0) val |= WPA_KEY_MGMT_FT_FILS_SHA256; else if (os_strcmp(start, "FT-FILS-SHA384") == 0) val |= WPA_KEY_MGMT_FT_FILS_SHA384; -#endif /* CONFIG_IEEE80211R */ +#endif /* CONFIG_IEEE80211R_AP */ #endif /* CONFIG_FILS */ else { wpa_printf(MSG_ERROR, "Line %d: invalid key_mgmt '%s'", @@ -991,7 +991,7 @@ static int hostapd_config_tx_queue(struct hostapd_config *conf, } -#ifdef CONFIG_IEEE80211R +#ifdef CONFIG_IEEE80211R_AP static int add_r0kh(struct hostapd_bss_config *bss, char *value) { struct ft_remote_r0kh *r0kh; @@ -1081,7 +1081,7 @@ static int add_r1kh(struct hostapd_bss_config *bss, char *value) return 0; } -#endif /* CONFIG_IEEE80211R */ +#endif /* CONFIG_IEEE80211R_AP */ #ifdef CONFIG_IEEE80211N @@ -2534,7 +2534,7 @@ static int hostapd_config_fill(struct hostapd_config *conf, } else if (os_strcmp(buf, "peerkey") == 0) { bss->peerkey = atoi(pos); #endif /* CONFIG_PEERKEY */ -#ifdef CONFIG_IEEE80211R +#ifdef CONFIG_IEEE80211R_AP } else if (os_strcmp(buf, "mobility_domain") == 0) { if (os_strlen(pos) != 2 * MOBILITY_DOMAIN_ID_LEN || hexstr2bin(pos, bss->mobility_domain, @@ -2574,7 +2574,7 @@ static int hostapd_config_fill(struct hostapd_config *conf, bss->ft_over_ds = atoi(pos); } else if (os_strcmp(buf, "ft_psk_generate_local") == 0) { bss->ft_psk_generate_local = atoi(pos); -#endif /* CONFIG_IEEE80211R */ +#endif /* CONFIG_IEEE80211R_AP */ #ifndef CONFIG_NO_CTRL_IFACE } else if (os_strcmp(buf, "ctrl_interface") == 0) { os_free(bss->ctrl_interface); diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 0d86b4a4f..4acc06443 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -1096,7 +1096,7 @@ static int hostapd_ctrl_iface_get_key_mgmt(struct hostapd_data *hapd, return pos - buf; pos += ret; } -#ifdef CONFIG_IEEE80211R +#ifdef CONFIG_IEEE80211R_AP if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_PSK) { ret = os_snprintf(pos, end - pos, "FT-PSK "); if (os_snprintf_error(end - pos, ret)) @@ -1131,7 +1131,7 @@ static int hostapd_ctrl_iface_get_key_mgmt(struct hostapd_data *hapd, pos += ret; } #endif /* CONFIG_FILS */ -#endif /* CONFIG_IEEE80211R */ +#endif /* CONFIG_IEEE80211R_AP */ #ifdef CONFIG_IEEE80211W if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK_SHA256) { ret = os_snprintf(pos, end - pos, "WPA-PSK-SHA256 ");