aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpas_glue.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-03-13 16:28:15 (GMT)
committerJouni Malinen <j@w1.fi>2010-03-13 16:28:15 (GMT)
commit2a7e7f4e4a310823d4a0fc5252f39679a6b5d6b8 (patch)
tree1ff90fde6704d11219866186f717868ea7e72196 /wpa_supplicant/wpas_glue.c
parentfe1919856c3e564748c4601f27b0953d897beaee (diff)
downloadhostap-2a7e7f4e4a310823d4a0fc5252f39679a6b5d6b8.zip
hostap-2a7e7f4e4a310823d4a0fc5252f39679a6b5d6b8.tar.gz
hostap-2a7e7f4e4a310823d4a0fc5252f39679a6b5d6b8.tar.bz2
FT: Add driver op for marking a STA authenticated
This can be used with FT-over-DS where FT Action frame exchange triggers transition to State 2 (authenticated) without Authentication frame exchange.
Diffstat (limited to 'wpa_supplicant/wpas_glue.c')
-rw-r--r--wpa_supplicant/wpas_glue.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c
index 3fa85a1..a3622b3 100644
--- a/wpa_supplicant/wpas_glue.c
+++ b/wpa_supplicant/wpas_glue.c
@@ -489,6 +489,30 @@ static int wpa_supplicant_send_ft_action(void *ctx, u8 action,
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(&params, 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, &params);
+}
#endif /* CONFIG_IEEE80211R */
#endif /* CONFIG_NO_WPA */
@@ -617,6 +641,7 @@ int wpa_supplicant_init_wpa(struct wpa_supplicant *wpa_s)
#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);