aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorDeepthi Gowri <deepthi@codeaurora.org>2013-03-12 18:08:53 (GMT)
committerJouni Malinen <j@w1.fi>2013-03-12 18:08:53 (GMT)
commit6a1ce39599c857e6e612d8dd81e892ec5ca36c7c (patch)
tree902e62a96df3bc1025cad11f641d56650dfdb121 /wpa_supplicant/events.c
parentf46fc73a3f8d0eeb1b43d17769464884f467ac47 (diff)
downloadhostap-6a1ce39599c857e6e612d8dd81e892ec5ca36c7c.zip
hostap-6a1ce39599c857e6e612d8dd81e892ec5ca36c7c.tar.gz
hostap-6a1ce39599c857e6e612d8dd81e892ec5ca36c7c.tar.bz2
FT: Add support for IEEE 802.11r with driver-based SME
Add NL80211_CMD_UPDATE_FT_IES to support update of FT IEs to the WLAN driver. Add NL80211_CMD_FT_EVENT to send FT event from the WLAN driver. This will carry the target AP's MAC address along with the relevant Information Elements. This event is used to report received FT IEs (MDIE, FTIE, RSN IE, TIE, RICIE). Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 6c8ab6c..186db8a 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1438,6 +1438,7 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
{
int l, len, found = 0, wpa_found, rsn_found;
const u8 *p;
+ u8 bssid[ETH_ALEN];
wpa_dbg(wpa_s, MSG_DEBUG, "Association info event");
if (data->assoc_info.req_ies)
@@ -1492,7 +1493,6 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
#ifdef CONFIG_IEEE80211R
#ifdef CONFIG_SME
if (wpa_s->sme.auth_alg == WPA_AUTH_ALG_FT) {
- u8 bssid[ETH_ALEN];
if (wpa_drv_get_bssid(wpa_s, bssid) < 0 ||
wpa_ft_validate_reassoc_resp(wpa_s->wpa,
data->assoc_info.resp_ies,
@@ -1550,6 +1550,23 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
}
#endif /* CONFIG_SME */
+ /* Process FT when SME is in the driver */
+ if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
+ wpa_ft_is_completed(wpa_s->wpa)) {
+ if (wpa_drv_get_bssid(wpa_s, bssid) < 0 ||
+ wpa_ft_validate_reassoc_resp(wpa_s->wpa,
+ data->assoc_info.resp_ies,
+ data->assoc_info.resp_ies_len,
+ bssid) < 0) {
+ wpa_dbg(wpa_s, MSG_DEBUG, "FT: Validation of "
+ "Reassociation Response failed");
+ wpa_supplicant_deauthenticate(
+ wpa_s, WLAN_REASON_INVALID_IE);
+ return -1;
+ }
+ wpa_dbg(wpa_s, MSG_DEBUG, "FT: Reassociation Response done");
+ }
+
wpa_sm_set_ft_params(wpa_s->wpa, data->assoc_info.resp_ies,
data->assoc_info.resp_ies_len);
#endif /* CONFIG_IEEE80211R */