Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Apr 2012 04:51:25 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r234018 - head/sys/net80211
Message-ID:  <201204080451.q384pPEW093886@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sun Apr  8 04:51:25 2012
New Revision: 234018
URL: http://svn.freebsd.org/changeset/base/234018

Log:
  Add some statistics to track BAR TX.

Modified:
  head/sys/net80211/ieee80211_ht.c
  head/sys/net80211/ieee80211_ioctl.h

Modified: head/sys/net80211/ieee80211_ht.c
==============================================================================
--- head/sys/net80211/ieee80211_ht.c	Sun Apr  8 04:48:59 2012	(r234017)
+++ head/sys/net80211/ieee80211_ht.c	Sun Apr  8 04:51:25 2012	(r234018)
@@ -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 *n
 	    __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
 	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
 		bar_start_timer(tap);
 	return 0;
 bad:
+	vap->iv_stats.is_ampdu_bar_tx_fail++;
 	ieee80211_free_node(ni);
 	return ret;
 #undef senderr

Modified: head/sys/net80211/ieee80211_ioctl.h
==============================================================================
--- head/sys/net80211/ieee80211_ioctl.h	Sun Apr  8 04:48:59 2012	(r234017)
+++ head/sys/net80211/ieee80211_ioctl.h	Sun Apr  8 04:51:25 2012	(r234018)
@@ -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];
 };
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204080451.q384pPEW093886>