aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/rx_ip.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2011-01-03 14:54:14 (GMT)
committerJouni Malinen <j@w1.fi>2011-01-03 14:54:14 (GMT)
commit1da4da6f76d17399c72ddb295e0d9d298e2f919e (patch)
tree9019d5c1e03a28e80263e5898b550b17085307db /wlantest/rx_ip.c
parentdf83fb7d00dc50c72ba7a5f5f0e313649619e5a2 (diff)
downloadhostap-1da4da6f76d17399c72ddb295e0d9d298e2f919e.zip
hostap-1da4da6f76d17399c72ddb295e0d9d298e2f919e.tar.gz
hostap-1da4da6f76d17399c72ddb295e0d9d298e2f919e.tar.bz2
wlantest: Add ping_ok_first_assoc STA counter
This can be used to verify whether ping goes through between clearing of the STA counters and the first (re)association.
Diffstat (limited to 'wlantest/rx_ip.c')
-rw-r--r--wlantest/rx_ip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wlantest/rx_ip.c b/wlantest/rx_ip.c
index 29874e6..aa2b087 100644
--- a/wlantest/rx_ip.c
+++ b/wlantest/rx_ip.c
@@ -82,6 +82,10 @@ static void rx_data_icmp(struct wlantest *wt, const u8 *bssid,
sta->icmp_echo_req_id == id &&
sta->icmp_echo_req_seq == seq) {
sta->counters[WLANTEST_STA_COUNTER_PING_OK]++;
+ if (sta->counters[WLANTEST_STA_COUNTER_ASSOCREQ_TX] == 0 &&
+ sta->counters[WLANTEST_STA_COUNTER_REASSOCREQ_TX] == 0)
+ sta->counters[
+ WLANTEST_STA_COUNTER_PING_OK_FIRST_ASSOC]++;
wpa_printf(MSG_DEBUG, "ICMP echo (ping) match for STA " MACSTR,
MAC2STR(sta->addr));
}