aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2011-01-07 15:09:09 (GMT)
committerJouni Malinen <j@w1.fi>2011-01-07 15:09:09 (GMT)
commit0a9ddd92cd85f47bba0520c4d87414066b43955c (patch)
treed42d198b47087cdea94e041146efe82e4287cdc5
parente7ba4e2c7417e621b51d1e03c696eec4d6486dc4 (diff)
downloadhostap-0a9ddd92cd85f47bba0520c4d87414066b43955c.zip
hostap-0a9ddd92cd85f47bba0520c4d87414066b43955c.tar.gz
hostap-0a9ddd92cd85f47bba0520c4d87414066b43955c.tar.bz2
wlantest: Add STA counter prot_data_tx
-rw-r--r--wlantest/rx_data.c2
-rw-r--r--wlantest/wlantest_cli.c1
-rw-r--r--wlantest/wlantest_ctrl.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/wlantest/rx_data.c b/wlantest/rx_data.c
index fc264ac..a8312b6 100644
--- a/wlantest/rx_data.c
+++ b/wlantest/rx_data.c
@@ -210,6 +210,8 @@ static void rx_data_bss_prot(struct wlantest *wt,
if (bss == NULL)
return;
sta = sta_get(bss, hdr->addr2);
+ if (sta)
+ sta->counters[WLANTEST_STA_COUNTER_PROT_DATA_TX]++;
} else if (fc & WLAN_FC_FROMDS) {
bss = bss_get(wt, hdr->addr2);
if (bss == NULL)
diff --git a/wlantest/wlantest_cli.c b/wlantest/wlantest_cli.c
index da25524..4b99c0e 100644
--- a/wlantest/wlantest_cli.c
+++ b/wlantest/wlantest_cli.c
@@ -551,6 +551,7 @@ static const struct sta_counters sta_counters[] = {
{ "deauth_rx_awake", WLANTEST_STA_COUNTER_DEAUTH_RX_AWAKE },
{ "disassoc_rx_asleep", WLANTEST_STA_COUNTER_DISASSOC_RX_ASLEEP },
{ "disassoc_rx_awake", WLANTEST_STA_COUNTER_DISASSOC_RX_AWAKE },
+ { "prot_data_tx", WLANTEST_STA_COUNTER_PROT_DATA_TX },
{ NULL, 0 }
};
diff --git a/wlantest/wlantest_ctrl.h b/wlantest/wlantest_ctrl.h
index fa6b766..be26eff 100644
--- a/wlantest/wlantest_ctrl.h
+++ b/wlantest/wlantest_ctrl.h
@@ -105,6 +105,7 @@ enum wlantest_sta_counter {
WLANTEST_STA_COUNTER_DEAUTH_RX_AWAKE,
WLANTEST_STA_COUNTER_DISASSOC_RX_ASLEEP,
WLANTEST_STA_COUNTER_DISASSOC_RX_AWAKE,
+ WLANTEST_STA_COUNTER_PROT_DATA_TX,
NUM_WLANTEST_STA_COUNTER
};