aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-11-21 19:50:28 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-21 19:50:28 (GMT)
commit783a082ccc8f9dd46cfae6760c6c6958a386080c (patch)
treed9f5c8824a4f3f9ddf768dc3d46136db011377f7
parentcdd71e307eb5978b0de8bf14eddd6773ad28bf03 (diff)
downloadhostap-783a082ccc8f9dd46cfae6760c6c6958a386080c.zip
hostap-783a082ccc8f9dd46cfae6760c6c6958a386080c.tar.gz
hostap-783a082ccc8f9dd46cfae6760c6c6958a386080c.tar.bz2
wlantest: Add per-BSS counters for BIP deauth/disassoc
-rw-r--r--wlantest/rx_mgmt.c5
-rw-r--r--wlantest/wlantest_cli.c2
-rw-r--r--wlantest/wlantest_ctrl.h2
3 files changed, 9 insertions, 0 deletions
diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c
index 4921d8d..9b1f061 100644
--- a/wlantest/rx_mgmt.c
+++ b/wlantest/rx_mgmt.c
@@ -784,6 +784,11 @@ static int check_bip(struct wlantest *wt, const u8 *data, size_t len)
os_memcpy(bss->ipn[keyid], mmie + 2, 6);
bss->counters[WLANTEST_BSS_COUNTER_VALID_BIP_MMIE]++;
+ if (stype == WLAN_FC_STYPE_DEAUTH)
+ bss->counters[WLANTEST_BSS_COUNTER_BIP_DEAUTH]++;
+ else if (stype == WLAN_FC_STYPE_DISASSOC)
+ bss->counters[WLANTEST_BSS_COUNTER_BIP_DISASSOC]++;
+
return 0;
}
diff --git a/wlantest/wlantest_cli.c b/wlantest/wlantest_cli.c
index 301d6f8..b8aa043 100644
--- a/wlantest/wlantest_cli.c
+++ b/wlantest/wlantest_cli.c
@@ -569,6 +569,8 @@ static const struct bss_counters bss_counters[] = {
{ "valid_bip_mmie", WLANTEST_BSS_COUNTER_VALID_BIP_MMIE },
{ "invalid_bip_mmie", WLANTEST_BSS_COUNTER_INVALID_BIP_MMIE },
{ "missing_bip_mmie", WLANTEST_BSS_COUNTER_MISSING_BIP_MMIE },
+ { "bip_deauth", WLANTEST_BSS_COUNTER_BIP_DEAUTH },
+ { "bip_disassoc", WLANTEST_BSS_COUNTER_BIP_DISASSOC },
{ NULL, 0 }
};
diff --git a/wlantest/wlantest_ctrl.h b/wlantest/wlantest_ctrl.h
index eeaa5f9..911ffaf 100644
--- a/wlantest/wlantest_ctrl.h
+++ b/wlantest/wlantest_ctrl.h
@@ -60,6 +60,8 @@ enum wlantest_bss_counter {
WLANTEST_BSS_COUNTER_VALID_BIP_MMIE,
WLANTEST_BSS_COUNTER_INVALID_BIP_MMIE,
WLANTEST_BSS_COUNTER_MISSING_BIP_MMIE,
+ WLANTEST_BSS_COUNTER_BIP_DEAUTH,
+ WLANTEST_BSS_COUNTER_BIP_DISASSOC,
NUM_WLANTEST_BSS_COUNTER
};