svn commit: r218378 - head/sys/dev/ath

Adrian Chadd adrian at FreeBSD.org
Sun Feb 6 17:40:28 UTC 2011


Author: adrian
Date: Sun Feb  6 17:40:27 2011
New Revision: 218378
URL: http://svn.freebsd.org/changeset/base/218378

Log:
  Only tag packets with the A-MPDU bit if they were part of an A-MPDU RX.
  
  Whilst I'm here, add a counter to count said packets.

Modified:
  head/sys/dev/ath/if_ath.c
  head/sys/dev/ath/if_athioctl.h

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Sun Feb  6 16:21:21 2011	(r218377)
+++ head/sys/dev/ath/if_ath.c	Sun Feb  6 17:40:27 2011	(r218378)
@@ -3892,16 +3892,11 @@ rx_accept:
 				IEEE80211_KEYIX_NONE : rs->rs_keyix);
 		sc->sc_lastrs = rs;
 		if (ni != NULL) {
-#ifdef	NOTYET
-		/* tag AMPDU aggregates for reorder processing */
-		/*
-		 * XXX this should only tag frames marked as aggregate; rather
-		 * XXX than all frames.
-		 */
-		if (ni->ni_flags & IEEE80211_NODE_HT)
-			m->m_flags |= M_AMPDU;
-#endif
-
+			/* tag AMPDU aggregates for reorder processing */
+			if (rs->rs_isaggr) {
+				
+				m->m_flags |= M_AMPDU;
+			}
 			/*
 			 * Sending station is known, dispatch directly.
 			 */
@@ -6499,4 +6494,6 @@ ath_sysctl_stats_attach(struct ath_softc
 	    &sc->sc_stats.ast_be_missed, 0, "number of -missed- beacons");
 	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_ani_cal", CTLFLAG_RD,
 	    &sc->sc_stats.ast_ani_cal, 0, "number of ANI polls");
+	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_agg", CTLFLAG_RD,
+	    &sc->sc_stats.ast_rx_agg, 0, "number of aggregate frames received");
 }

Modified: head/sys/dev/ath/if_athioctl.h
==============================================================================
--- head/sys/dev/ath/if_athioctl.h	Sun Feb  6 16:21:21 2011	(r218377)
+++ head/sys/dev/ath/if_athioctl.h	Sun Feb  6 17:40:27 2011	(r218378)
@@ -120,7 +120,8 @@ struct ath_stats {
 	u_int32_t	ast_tx_nofrag;	/* tx dropped 'cuz no ath frag buffer */
 	u_int32_t	ast_be_missed;	/* missed beacons */
 	u_int32_t	ast_ani_cal;	/* ANI calibrations performed */
-	u_int32_t	ast_pad[12];
+	u_int32_t	ast_rx_agg;	/* number of aggregate frames RX'ed */
+	u_int32_t	ast_pad[11];
 };
 
 #define	SIOCGATHSTATS	_IOWR('i', 137, struct ifreq)


More information about the svn-src-head mailing list