From: Jouni Malinen Date: Thu, 26 Mar 2009 14:06:15 +0000 (+0200) Subject: Allow hostapd/config.h and wpa_supplicant/config_ssid.h coexist X-Git-Tag: hostap_0_7_0~408 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c746331b5237c8a54b686dffe2e3250502fbfdbe;p=thirdparty%2Fhostap.git Allow hostapd/config.h and wpa_supplicant/config_ssid.h coexist Move the shared IEEE 802.11w enum definition into src/common/defs.h to avoid redefinition when both configuration structures are included into the same file. --- diff --git a/hostapd/config.h b/hostapd/config.h index ea530d45d..fbcc353ca 100644 --- a/hostapd/config.h +++ b/hostapd/config.h @@ -205,11 +205,7 @@ struct hostapd_bss_config { int wpa; /* bitfield of WPA_PROTO_WPA, WPA_PROTO_RSN */ int wpa_key_mgmt; #ifdef CONFIG_IEEE80211W - enum { - NO_IEEE80211W = 0, - IEEE80211W_OPTIONAL = 1, - IEEE80211W_REQUIRED = 2 - } ieee80211w; + enum mfp_options ieee80211w; /* dot11AssociationSAQueryMaximumTimeout (in TUs) */ unsigned int assoc_sa_query_max_timeout; /* dot11AssociationSAQueryRetryTimeout (in TUs) */ diff --git a/src/common/defs.h b/src/common/defs.h index cee8c240c..d7cfe6516 100644 --- a/src/common/defs.h +++ b/src/common/defs.h @@ -206,4 +206,11 @@ typedef enum { #define MLME_SETPROTECTION_KEY_TYPE_GROUP 0 #define MLME_SETPROTECTION_KEY_TYPE_PAIRWISE 1 + +enum mfp_options { + NO_IEEE80211W = 0, + IEEE80211W_OPTIONAL = 1, + IEEE80211W_REQUIRED = 2 +}; + #endif /* DEFS_H */ diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h index 817046d08..3ebf22843 100644 --- a/wpa_supplicant/config_ssid.h +++ b/wpa_supplicant/config_ssid.h @@ -318,11 +318,7 @@ struct wpa_ssid { * This value is used to configure policy for management frame * protection (IEEE 802.11w). 0 = disabled, 1 = optional, 2 = required. */ - enum { - NO_IEEE80211W = 0, - IEEE80211W_OPTIONAL = 1, - IEEE80211W_REQUIRED = 2 - } ieee80211w; + enum mfp_options ieee80211w; #endif /* CONFIG_IEEE80211W */ /**