automake build system
[mech_eap.orig] / src / ap / wpa_auth_ie.c
index da37f82..f8a1804 100644 (file)
  * See README and COPYING for more details.
  */
 
-#include "includes.h"
+#include "utils/includes.h"
 
-#include "common.h"
-#include "config.h"
-#include "ieee802_11.h"
+#include "utils/common.h"
+#include "common/ieee802_11_defs.h"
 #include "eapol_auth/eapol_auth_sm.h"
-#include "wpa.h"
-#include "pmksa_cache.h"
+#include "ap_config.h"
+#include "ieee802_11.h"
+#include "wpa_auth.h"
+#include "pmksa_cache_auth.h"
 #include "wpa_auth_ie.h"
 #include "wpa_auth_i.h"
 
@@ -220,9 +221,9 @@ int wpa_write_rsn_ie(struct wpa_auth_config *conf, u8 *buf, size_t len,
                capab |= (RSN_NUM_REPLAY_COUNTERS_16 << 2);
        }
 #ifdef CONFIG_IEEE80211W
-       if (conf->ieee80211w != WPA_NO_IEEE80211W) {
+       if (conf->ieee80211w != NO_MGMT_FRAME_PROTECTION) {
                capab |= WPA_CAPABILITY_MFPC;
-               if (conf->ieee80211w == IEEE80211W_REQUIRED)
+               if (conf->ieee80211w == MGMT_FRAME_PROTECTION_REQUIRED)
                        capab |= WPA_CAPABILITY_MFPR;
        }
 #endif /* CONFIG_IEEE80211W */
@@ -240,7 +241,7 @@ int wpa_write_rsn_ie(struct wpa_auth_config *conf, u8 *buf, size_t len,
        }
 
 #ifdef CONFIG_IEEE80211W
-       if (conf->ieee80211w != WPA_NO_IEEE80211W) {
+       if (conf->ieee80211w != NO_MGMT_FRAME_PROTECTION) {
                if (pos + 2 + 4 > buf + len)
                        return -1;
                if (pmkid == NULL) {
@@ -612,7 +613,7 @@ int wpa_validate_wpa_ie(struct wpa_authenticator *wpa_auth,
        }
 
 #ifdef CONFIG_IEEE80211W
-       if (wpa_auth->conf.ieee80211w == WPA_IEEE80211W_REQUIRED) {
+       if (wpa_auth->conf.ieee80211w == MGMT_FRAME_PROTECTION_REQUIRED) {
                if (!(data.capabilities & WPA_CAPABILITY_MFPC)) {
                        wpa_printf(MSG_DEBUG, "Management frame protection "
                                   "required, but client did not enable it");
@@ -632,7 +633,7 @@ int wpa_validate_wpa_ie(struct wpa_authenticator *wpa_auth,
                }
        }
 
-       if (wpa_auth->conf.ieee80211w == WPA_NO_IEEE80211W ||
+       if (wpa_auth->conf.ieee80211w == NO_MGMT_FRAME_PROTECTION ||
            !(data.capabilities & WPA_CAPABILITY_MFPC))
                sm->mgmt_frame_prot = 0;
        else
@@ -839,6 +840,9 @@ int wpa_parse_kde_ies(const u8 *buf, size_t len, struct wpa_eapol_ie_parse *ie)
                } else if (*pos == WLAN_EID_MOBILITY_DOMAIN) {
                        ie->mdie = pos;
                        ie->mdie_len = pos[1] + 2;
+               } else if (*pos == WLAN_EID_FAST_BSS_TRANSITION) {
+                       ie->ftie = pos;
+                       ie->ftie_len = pos[1] + 2;
 #endif /* CONFIG_IEEE80211R */
                } else if (*pos == WLAN_EID_VENDOR_SPECIFIC) {
                        ret = wpa_parse_generic(pos, end, ie);