path: root/wpa_supplicant/wpas_glue.c
diff options
authorJouni Malinen <jouni.malinen@atheros.com>2009-03-20 20:26:41 (GMT)
committerJouni Malinen <j@w1.fi>2009-03-20 20:26:41 (GMT)
commitc2a04078513bffce2e3c2968fbb1e1381ab72059 (patch)
tree3051dda247540732ef2bd009834a609e4fa3a62e /wpa_supplicant/wpas_glue.c
parentb21fab69fd6b1b0297534ac42ea54142e0e380de (diff)
Add SME support (separate authentication and association)
This can be used, e.g., with mac80211-based Linux drivers with nl80211. This allows over-the-air FT protocol to be used (IEEE 802.11r). Since the nl80211 interface needed for this is very recent (added today into wireless-testing.git), driver_nl80211.c has backwards compatibility code that uses WEXT for association if the kernel does not support the new commands. This compatibility code can be disabled by defining NO_WEXT_COMPAT. That code will also be removed at some point to clean up driver_nl80211.c.
Diffstat (limited to 'wpa_supplicant/wpas_glue.c')
1 files changed, 7 insertions, 4 deletions
diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c
index eb2796e..4e021d2 100644
--- a/wpa_supplicant/wpas_glue.c
+++ b/wpa_supplicant/wpas_glue.c
@@ -24,6 +24,7 @@
#include "wpa_supplicant_i.h"
#include "pmksa_cache.h"
#include "mlme.h"
+#include "sme.h"
#include "ieee802_11_defs.h"
#include "wpa_ctrl.h"
#include "wpas_glue.h"
@@ -241,7 +242,7 @@ static void wpa_supplicant_eapol_cb(struct eapol_sm *eapol, int success,
wpa_supplicant_req_auth_timeout(wpa_s, 2, 0);
- if (!success || !wpa_s->driver_4way_handshake)
+ if (!success || !(wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE))
if (!wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt))
@@ -423,7 +424,7 @@ static void * wpa_supplicant_get_network_ctx(void *wpa_s)
static int wpa_supplicant_get_bssid(void *ctx, u8 *bssid)
struct wpa_supplicant *wpa_s = ctx;
- if (wpa_s->use_client_mlme) {
+ if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME) {
os_memcpy(bssid, wpa_s->bssid, ETH_ALEN);
return 0;
@@ -474,8 +475,10 @@ static int wpa_supplicant_update_ft_ies(void *ctx, const u8 *md,
const u8 *ies, size_t ies_len)
struct wpa_supplicant *wpa_s = ctx;
- if (wpa_s->use_client_mlme)
+ if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
return ieee80211_sta_update_ft_ies(wpa_s, md, ies, ies_len);
+ if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)
+ return sme_update_ft_ies(wpa_s, md, ies, ies_len);
return wpa_drv_update_ft_ies(wpa_s, md, ies, ies_len);
@@ -485,7 +488,7 @@ static int wpa_supplicant_send_ft_action(void *ctx, u8 action,
const u8 *ies, size_t ies_len)
struct wpa_supplicant *wpa_s = ctx;
- if (wpa_s->use_client_mlme)
+ if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
return ieee80211_sta_send_ft_action(wpa_s, action, target_ap,
ies, ies_len);
return wpa_drv_send_ft_action(wpa_s, action, target_ap, ies, ies_len);