Add some statistics to track BAR TX.

This commit is contained in:
Adrian Chadd 2012-04-08 04:51:25 +00:00
parent d61c74edc5
commit fcacf9318c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234018
2 changed files with 13 additions and 4 deletions

View File

@ -2182,10 +2182,13 @@ bar_timeout(void *arg)
if ((tap->txa_flags & IEEE80211_AGGR_BARPEND) == 0)
return;
/* XXX ? */
if (tap->txa_attempts >= ieee80211_bar_maxtries)
if (tap->txa_attempts >= ieee80211_bar_maxtries) {
ni->ni_vap->iv_stats.is_ampdu_bar_tx_fail++;
ieee80211_ampdu_stop(ni, tap, IEEE80211_REASON_TIMEOUT);
else
} else {
ni->ni_vap->iv_stats.is_ampdu_bar_tx_retry++;
ieee80211_send_bar(ni, tap, tap->txa_seqpending);
}
}
static void
@ -2210,6 +2213,7 @@ bar_tx_complete(struct ieee80211_node *ni, void *arg, int status)
__func__, tap->txa_ac, tap->txa_flags,
callout_pending(&tap->txa_timer), status);
ni->ni_vap->iv_stats.is_ampdu_bar_tx++;
/* XXX locking */
if ((tap->txa_flags & IEEE80211_AGGR_BARPEND) &&
callout_pending(&tap->txa_timer)) {
@ -2325,6 +2329,7 @@ ieee80211_send_bar(struct ieee80211_node *ni,
if (ret != 0) {
/* xmit failed, clear state flag */
tap->txa_flags &= ~IEEE80211_AGGR_BARPEND;
vap->iv_stats.is_ampdu_bar_tx_fail++;
return ret;
}
/* XXX hack against tx complete happening before timer is started */
@ -2332,6 +2337,7 @@ ieee80211_send_bar(struct ieee80211_node *ni,
bar_start_timer(tap);
return 0;
bad:
vap->iv_stats.is_ampdu_bar_tx_fail++;
ieee80211_free_node(ni);
return ret;
#undef senderr

View File

@ -242,8 +242,11 @@ struct ieee80211_stats {
uint32_t is_rx_badalign; /* dropped 'cuz misaligned */
uint32_t is_hwmp_proxy; /* PREP for proxy route */
uint32_t is_beacon_bad; /* Number of bad beacons */
uint32_t is_spare[10];
uint32_t is_ampdu_bar_tx; /* A-MPDU BAR frames TXed */
uint32_t is_ampdu_bar_tx_retry; /* A-MPDU BAR frames TX rtry */
uint32_t is_ampdu_bar_tx_fail; /* A-MPDU BAR frames TX fail */
uint32_t is_spare[7];
};
/*