From e4474c1c20a1442f96dfe6680881bb04648738f8 Mon Sep 17 00:00:00 2001 From: Darshan Paranji Sri Date: Fri, 12 Sep 2014 18:46:56 +0300 Subject: [PATCH] FT: Fix hostapd with driver-based SME to authorize the STA The driver-based SME case did not set STA flags properly to the kernel in the way that hostapd-SME did in ieee802_11.c. This resulted in the FT protocol case not marking the STA entry authorized. Fix that by handling the special WLAN_AUTH_FT case in hostapd_notif_assoc() and also add the forgotten hostapd_set_sta_flags() call to synchronize these flag to the driver. Signed-off-by: Jouni Malinen --- src/ap/drv_callbacks.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c index ae4c968ca..3bde7205d 100644 --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c @@ -340,6 +340,9 @@ skip_wpa_check: sta->auth_alg, req_ies, req_ies_len); hostapd_sta_assoc(hapd, addr, reassoc, status, buf, p - buf); + + if (sta->auth_alg == WLAN_AUTH_FT) + ap_sta_set_authorized(hapd, sta, 1); #else /* CONFIG_IEEE80211R */ /* Keep compiler silent about unused variables */ if (status) { @@ -350,6 +353,8 @@ skip_wpa_check: sta->flags |= WLAN_STA_AUTH | WLAN_STA_ASSOC; sta->flags &= ~WLAN_STA_WNM_SLEEP_MODE; + hostapd_set_sta_flags(hapd, sta); + if (reassoc && (sta->auth_alg == WLAN_AUTH_FT)) wpa_auth_sm_event(sta->wpa_sm, WPA_ASSOC_FT); else