Revert "Cumulative patch from commit 4ec1fd8e42bad9390f14a58225b6e5f6fb691950"

This reverts commit 78a5dac804c22aa6e4ec8226a864d3b0d6ccddbb.

Test: None
diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c
index 7ac337d..80ff996 100644
--- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c
@@ -31,8 +31,6 @@
 #include "ap_drv_ops.h"
 #include "wps_hostapd.h"
 #include "hs20.h"
-/* FIX: Not really a good thing to require ieee802_11.h here.. (FILS) */
-#include "ieee802_11.h"
 #include "ieee802_1x.h"
 
 
@@ -318,7 +316,6 @@
 	     hdr->code != EAP_CODE_INITIATE))
 		return;
 
-	eap_erp_update_identity(sm->eap, eap, len);
 	identity = eap_get_identity(sm->eap, &identity_len);
 	if (identity == NULL)
 		return;
@@ -475,7 +472,7 @@
 		}
 	}
 
-#ifdef CONFIG_IEEE80211R_AP
+#ifdef CONFIG_IEEE80211R
 	if (hapd->conf->wpa && wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt) &&
 	    sta->wpa_sm &&
 	    (wpa_key_mgmt_ft(wpa_auth_sta_key_mgmt(sta->wpa_sm)) ||
@@ -488,7 +485,7 @@
 		wpa_printf(MSG_ERROR, "Could not add Mobility-Domain-Id");
 		return -1;
 	}
-#endif /* CONFIG_IEEE80211R_AP */
+#endif /* CONFIG_IEEE80211R */
 
 	if ((hapd->conf->wpa || hapd->conf->osen) && sta->wpa_sm &&
 	    add_common_radius_sta_attr_rsn(hapd, req_attr, sta, msg) < 0)
@@ -591,9 +588,9 @@
 }
 
 
-void ieee802_1x_encapsulate_radius(struct hostapd_data *hapd,
-				   struct sta_info *sta,
-				   const u8 *eap, size_t len)
+static void ieee802_1x_encapsulate_radius(struct hostapd_data *hapd,
+					  struct sta_info *sta,
+					  const u8 *eap, size_t len)
 {
 	struct radius_msg *msg;
 	struct eapol_state_machine *sm = sta->eapol_sm;
@@ -848,7 +845,7 @@
 }
 
 
-struct eapol_state_machine *
+static struct eapol_state_machine *
 ieee802_1x_alloc_eapol_sm(struct hostapd_data *hapd, struct sta_info *sta)
 {
 	int flags = 0;
@@ -1157,7 +1154,7 @@
 
 	sta->eapol_sm->eap_if->portEnabled = TRUE;
 
-#ifdef CONFIG_IEEE80211R_AP
+#ifdef CONFIG_IEEE80211R
 	if (sta->auth_alg == WLAN_AUTH_FT) {
 		hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X,
 			       HOSTAPD_LEVEL_DEBUG,
@@ -1176,29 +1173,7 @@
 		/* TODO: get vlan_id from R0KH using RRB message */
 		return;
 	}
-#endif /* CONFIG_IEEE80211R_AP */
-
-#ifdef CONFIG_FILS
-	if (sta->auth_alg == WLAN_AUTH_FILS_SK ||
-	    sta->auth_alg == WLAN_AUTH_FILS_SK_PFS ||
-	    sta->auth_alg == WLAN_AUTH_FILS_PK) {
-		hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X,
-			       HOSTAPD_LEVEL_DEBUG,
-			       "PMK from FILS - skip IEEE 802.1X/EAP");
-		/* Setup EAPOL state machines to already authenticated state
-		 * because of existing FILS information. */
-		sta->eapol_sm->keyRun = TRUE;
-		sta->eapol_sm->eap_if->eapKeyAvailable = TRUE;
-		sta->eapol_sm->auth_pae_state = AUTH_PAE_AUTHENTICATING;
-		sta->eapol_sm->be_auth_state = BE_AUTH_SUCCESS;
-		sta->eapol_sm->authSuccess = TRUE;
-		sta->eapol_sm->authFail = FALSE;
-		sta->eapol_sm->portValid = TRUE;
-		if (sta->eapol_sm->eap)
-			eap_sm_notify_cached(sta->eapol_sm->eap);
-		return;
-	}
-#endif /* CONFIG_FILS */
+#endif /* CONFIG_IEEE80211R */
 
 	pmksa = wpa_auth_sta_get_pmksa(sta->wpa_sm);
 	if (pmksa) {
@@ -1862,19 +1837,6 @@
 	if (override_eapReq)
 		sm->eap_if->aaaEapReq = FALSE;
 
-#ifdef CONFIG_FILS
-#ifdef NEED_AP_MLME
-	if (sta->flags & WLAN_STA_PENDING_FILS_ERP) {
-		/* TODO: Add a PMKSA entry on success? */
-		ieee802_11_finish_fils_auth(
-			hapd, sta, hdr->code == RADIUS_CODE_ACCESS_ACCEPT,
-			sm->eap_if->aaaEapReqData,
-			sm->eap_if->aaaEapKeyData,
-			sm->eap_if->aaaEapKeyDataLen);
-	}
-#endif /* NEED_AP_MLME */
-#endif /* CONFIG_FILS */
-
 	eapol_auth_step(sm);
 
 	return RADIUS_RX_QUEUED;