#include "wpas_glue.h"
#include "wps_supplicant.h"
#include "bss.h"
+#include "scan.h"
#ifndef CONFIG_NO_CONFIG_BLOBS
/* No WPA/RSN IE found in the cached scan results. Try to get updated
* scan results from the driver. */
- if (wpa_supplicant_get_scan_results(wpa_s, NULL, 0) < 0) {
+ if (wpa_supplicant_update_scan_results(wpa_s) < 0)
return -1;
- }
return wpa_get_beacon_ie(wpa_s);
}
ies, ies_len);
return wpa_drv_send_ft_action(wpa_s, action, target_ap, ies, ies_len);
}
+
+
+static int wpa_supplicant_mark_authenticated(void *ctx, const u8 *target_ap)
+{
+ struct wpa_supplicant *wpa_s = ctx;
+ struct wpa_driver_auth_params params;
+ struct wpa_bss *bss;
+
+ if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
+ return -1;
+
+ bss = wpa_bss_get_bssid(wpa_s, target_ap);
+ if (bss == NULL)
+ return -1;
+
+ os_memset(¶ms, 0, sizeof(params));
+ params.bssid = target_ap;
+ params.freq = bss->freq;
+ params.ssid = bss->ssid;
+ params.ssid_len = bss->ssid_len;
+ params.auth_alg = WPA_AUTH_ALG_FT;
+ params.local_state_change = 1;
+ return wpa_drv_authenticate(wpa_s, ¶ms);
+}
#endif /* CONFIG_IEEE80211R */
#endif /* CONFIG_NO_WPA */
static void wpa_supplicant_port_cb(void *ctx, int authorized)
{
struct wpa_supplicant *wpa_s = ctx;
+#ifdef CONFIG_AP
+ if (wpa_s->ap_iface) {
+ wpa_printf(MSG_DEBUG, "AP mode active - skip EAPOL Supplicant "
+ "port status: %s",
+ authorized ? "Authorized" : "Unauthorized");
+ return;
+ }
+#endif /* CONFIG_AP */
wpa_printf(MSG_DEBUG, "EAPOL: Supplicant port status: %s",
authorized ? "Authorized" : "Unauthorized");
wpa_drv_set_supp_port(wpa_s, authorized);
#ifdef CONFIG_IEEE80211R
ctx->update_ft_ies = wpa_supplicant_update_ft_ies;
ctx->send_ft_action = wpa_supplicant_send_ft_action;
+ ctx->mark_authenticated = wpa_supplicant_mark_authenticated;
#endif /* CONFIG_IEEE80211R */
wpa_s->wpa = wpa_sm_init(ctx);