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.
This commit is contained in:
parent
df83fb7d00
commit
1da4da6f76
3 changed files with 6 additions and 0 deletions
|
@ -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_id == id &&
|
||||||
sta->icmp_echo_req_seq == seq) {
|
sta->icmp_echo_req_seq == seq) {
|
||||||
sta->counters[WLANTEST_STA_COUNTER_PING_OK]++;
|
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,
|
wpa_printf(MSG_DEBUG, "ICMP echo (ping) match for STA " MACSTR,
|
||||||
MAC2STR(sta->addr));
|
MAC2STR(sta->addr));
|
||||||
}
|
}
|
||||||
|
|
|
@ -539,6 +539,7 @@ static const struct sta_counters sta_counters[] = {
|
||||||
{ "ping_ok", WLANTEST_STA_COUNTER_PING_OK },
|
{ "ping_ok", WLANTEST_STA_COUNTER_PING_OK },
|
||||||
{ "assocresp_comeback", WLANTEST_STA_COUNTER_ASSOCRESP_COMEBACK },
|
{ "assocresp_comeback", WLANTEST_STA_COUNTER_ASSOCRESP_COMEBACK },
|
||||||
{ "reassocresp_comeback", WLANTEST_STA_COUNTER_REASSOCRESP_COMEBACK },
|
{ "reassocresp_comeback", WLANTEST_STA_COUNTER_REASSOCRESP_COMEBACK },
|
||||||
|
{ "ping_ok_first_assoc", WLANTEST_STA_COUNTER_PING_OK_FIRST_ASSOC },
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,7 @@ enum wlantest_sta_counter {
|
||||||
WLANTEST_STA_COUNTER_PING_OK,
|
WLANTEST_STA_COUNTER_PING_OK,
|
||||||
WLANTEST_STA_COUNTER_ASSOCRESP_COMEBACK,
|
WLANTEST_STA_COUNTER_ASSOCRESP_COMEBACK,
|
||||||
WLANTEST_STA_COUNTER_REASSOCRESP_COMEBACK,
|
WLANTEST_STA_COUNTER_REASSOCRESP_COMEBACK,
|
||||||
|
WLANTEST_STA_COUNTER_PING_OK_FIRST_ASSOC,
|
||||||
NUM_WLANTEST_STA_COUNTER
|
NUM_WLANTEST_STA_COUNTER
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue