wlantest: Add STA counter prot_data_tx

This commit is contained in:
Jouni Malinen 2011-01-07 17:09:09 +02:00 committed by Jouni Malinen
parent e7ba4e2c74
commit 0a9ddd92cd
3 changed files with 4 additions and 0 deletions

View file

@ -210,6 +210,8 @@ static void rx_data_bss_prot(struct wlantest *wt,
if (bss == NULL) if (bss == NULL)
return; return;
sta = sta_get(bss, hdr->addr2); sta = sta_get(bss, hdr->addr2);
if (sta)
sta->counters[WLANTEST_STA_COUNTER_PROT_DATA_TX]++;
} else if (fc & WLAN_FC_FROMDS) { } else if (fc & WLAN_FC_FROMDS) {
bss = bss_get(wt, hdr->addr2); bss = bss_get(wt, hdr->addr2);
if (bss == NULL) if (bss == NULL)

View file

@ -551,6 +551,7 @@ static const struct sta_counters sta_counters[] = {
{ "deauth_rx_awake", WLANTEST_STA_COUNTER_DEAUTH_RX_AWAKE }, { "deauth_rx_awake", WLANTEST_STA_COUNTER_DEAUTH_RX_AWAKE },
{ "disassoc_rx_asleep", WLANTEST_STA_COUNTER_DISASSOC_RX_ASLEEP }, { "disassoc_rx_asleep", WLANTEST_STA_COUNTER_DISASSOC_RX_ASLEEP },
{ "disassoc_rx_awake", WLANTEST_STA_COUNTER_DISASSOC_RX_AWAKE }, { "disassoc_rx_awake", WLANTEST_STA_COUNTER_DISASSOC_RX_AWAKE },
{ "prot_data_tx", WLANTEST_STA_COUNTER_PROT_DATA_TX },
{ NULL, 0 } { NULL, 0 }
}; };

View file

@ -105,6 +105,7 @@ enum wlantest_sta_counter {
WLANTEST_STA_COUNTER_DEAUTH_RX_AWAKE, WLANTEST_STA_COUNTER_DEAUTH_RX_AWAKE,
WLANTEST_STA_COUNTER_DISASSOC_RX_ASLEEP, WLANTEST_STA_COUNTER_DISASSOC_RX_ASLEEP,
WLANTEST_STA_COUNTER_DISASSOC_RX_AWAKE, WLANTEST_STA_COUNTER_DISASSOC_RX_AWAKE,
WLANTEST_STA_COUNTER_PROT_DATA_TX,
NUM_WLANTEST_STA_COUNTER NUM_WLANTEST_STA_COUNTER
}; };