diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c index 4921d8d56..9b1f061b8 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 301d6f803..b8aa0437a 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 eeaa5f94d..911ffaf13 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 };