aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-12-25 16:37:33 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-26 11:37:06 (GMT)
commitae98e1f5b2fc245439f828e9b10f780846aa815b (patch)
treeca77ca01f4623db8c307b60d53fba7659d2d654f /wlantest
parentf4bfa2d27f407159e15848e2b6579fbc71e46aca (diff)
downloadhostap-ae98e1f5b2fc245439f828e9b10f780846aa815b.zip
hostap-ae98e1f5b2fc245439f828e9b10f780846aa815b.tar.gz
hostap-ae98e1f5b2fc245439f828e9b10f780846aa815b.tar.bz2
wlantest: Add a BSS probe_response counter
This can be used to verify whether an AP replies to a Probe Request frame. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wlantest')
-rw-r--r--wlantest/rx_mgmt.c1
-rw-r--r--wlantest/wlantest_cli.c1
-rw-r--r--wlantest/wlantest_ctrl.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c
index a2df0e9..c6ff718 100644
--- a/wlantest/rx_mgmt.c
+++ b/wlantest/rx_mgmt.c
@@ -86,6 +86,7 @@ static void rx_mgmt_probe_resp(struct wlantest *wt, const u8 *data, size_t len)
if (bss == NULL)
return;
+ bss->counters[WLANTEST_BSS_COUNTER_PROBE_RESPONSE]++;
bss->capab_info = le_to_host16(mgmt->u.probe_resp.capab_info);
if (ieee802_11_parse_elems(mgmt->u.probe_resp.variable,
len - (mgmt->u.probe_resp.variable - data),
diff --git a/wlantest/wlantest_cli.c b/wlantest/wlantest_cli.c
index ae84102..ad5a48d 100644
--- a/wlantest/wlantest_cli.c
+++ b/wlantest/wlantest_cli.c
@@ -657,6 +657,7 @@ static const struct bss_counters bss_counters[] = {
{ "missing_bip_mmie", WLANTEST_BSS_COUNTER_MISSING_BIP_MMIE },
{ "bip_deauth", WLANTEST_BSS_COUNTER_BIP_DEAUTH },
{ "bip_disassoc", WLANTEST_BSS_COUNTER_BIP_DISASSOC },
+ { "probe_response", WLANTEST_BSS_COUNTER_PROBE_RESPONSE },
{ NULL, 0 }
};
diff --git a/wlantest/wlantest_ctrl.h b/wlantest/wlantest_ctrl.h
index 8ecbaa7..1af6838 100644
--- a/wlantest/wlantest_ctrl.h
+++ b/wlantest/wlantest_ctrl.h
@@ -67,6 +67,7 @@ enum wlantest_bss_counter {
WLANTEST_BSS_COUNTER_MISSING_BIP_MMIE,
WLANTEST_BSS_COUNTER_BIP_DEAUTH,
WLANTEST_BSS_COUNTER_BIP_DISASSOC,
+ WLANTEST_BSS_COUNTER_PROBE_RESPONSE,
NUM_WLANTEST_BSS_COUNTER
};