aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/rx_mgmt.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-11-19 15:09:02 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-19 15:09:02 (GMT)
commit990153b4dd482e016914cd8d1f54045f7e9d5530 (patch)
tree333f9999a590c9459f1d8ef876f9bf432560aef2 /wlantest/rx_mgmt.c
parent2e4c34691b734e7239dacddf4a2c5739c72b4ec5 (diff)
downloadhostap-990153b4dd482e016914cd8d1f54045f7e9d5530.zip
hostap-990153b4dd482e016914cd8d1f54045f7e9d5530.tar.gz
hostap-990153b4dd482e016914cd8d1f54045f7e9d5530.tar.bz2
wlantest: Add support for injecting (Re)Association Request frames
Diffstat (limited to 'wlantest/rx_mgmt.c')
-rw-r--r--wlantest/rx_mgmt.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c
index 45a0053..e9ab330 100644
--- a/wlantest/rx_mgmt.c
+++ b/wlantest/rx_mgmt.c
@@ -246,6 +246,16 @@ static void rx_mgmt_assoc_req(struct wlantest *wt, const u8 *data, size_t len)
return;
}
+ sta->assocreq_capab_info = le_to_host16(mgmt->u.assoc_req.capab_info);
+ sta->assocreq_listen_int =
+ le_to_host16(mgmt->u.assoc_req.listen_interval);
+ os_free(sta->assocreq_ies);
+ sta->assocreq_ies_len = len - (mgmt->u.assoc_req.variable - data);
+ sta->assocreq_ies = os_malloc(sta->assocreq_ies_len);
+ if (sta->assocreq_ies)
+ os_memcpy(sta->assocreq_ies, mgmt->u.assoc_req.variable,
+ sta->assocreq_ies_len);
+
sta_update_assoc(sta, &elems);
}
@@ -343,6 +353,17 @@ static void rx_mgmt_reassoc_req(struct wlantest *wt, const u8 *data,
return;
}
+ sta->assocreq_capab_info =
+ le_to_host16(mgmt->u.reassoc_req.capab_info);
+ sta->assocreq_listen_int =
+ le_to_host16(mgmt->u.reassoc_req.listen_interval);
+ os_free(sta->assocreq_ies);
+ sta->assocreq_ies_len = len - (mgmt->u.reassoc_req.variable - data);
+ sta->assocreq_ies = os_malloc(sta->assocreq_ies_len);
+ if (sta->assocreq_ies)
+ os_memcpy(sta->assocreq_ies, mgmt->u.reassoc_req.variable,
+ sta->assocreq_ies_len);
+
sta_update_assoc(sta, &elems);
}