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

Adrian Chadd adrian at FreeBSD.org
Tue Mar 29 15:59:07 UTC 2011


Author: adrian
Date: Tue Mar 29 15:59:07 2011
New Revision: 220132
URL: http://svn.freebsd.org/changeset/base/220132

Log:
  According to ath9k recv.c, one shouldn't be doing self-linked descriptors
  in the RX path when doing 11n and block-ack'ed frames. Apparently, the MAC
  will loop over that self-linked descriptor and treat it as "good enough"
  for (incorrectly!) ACKing the frames in the block-ack.
  
  Until I figure out how to work around this issue in the future, this counter
  will tell me if packet RX processing ever gets to the point where it's
  touching the self-linked descriptor. If there's ever enough packets to get
  to that point, BA's will be invalid and likely very unhappy.

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

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Tue Mar 29 15:36:43 2011	(r220131)
+++ head/sys/dev/ath/if_ath.c	Tue Mar 29 15:59:07 2011	(r220132)
@@ -3338,6 +3338,7 @@ ath_rx_proc(void *arg, int npending)
 		ds = bf->bf_desc;
 		if (ds->ds_link == bf->bf_daddr) {
 			/* NB: never process the self-linked entry at the end */
+			sc->sc_stats.ast_rx_hitqueueend++;
 			break;
 		}
 		/* XXX sync descriptor memory */

Modified: head/sys/dev/ath/if_ath_sysctl.c
==============================================================================
--- head/sys/dev/ath/if_ath_sysctl.c	Tue Mar 29 15:36:43 2011	(r220131)
+++ head/sys/dev/ath/if_ath_sysctl.c	Tue Mar 29 15:59:07 2011	(r220132)
@@ -703,6 +703,8 @@ ath_sysctl_stats_attach(struct ath_softc
 	    &sc->sc_stats.ast_rx_hi_rx_chain, 0, "");
 	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_htprotect", CTLFLAG_RD,
 	    &sc->sc_stats.ast_tx_htprotect, 0, "HT tx frames with protection");
+	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_hitqueueend", CTLFLAG_RD,
+	    &sc->sc_stats.ast_rx_hitqueueend, 0, "RX hit queue end");
 
 	/* Attach the RX phy error array */
 	ath_sysctl_stats_attach_rxphyerr(sc, child);

Modified: head/sys/dev/ath/if_athioctl.h
==============================================================================
--- head/sys/dev/ath/if_athioctl.h	Tue Mar 29 15:36:43 2011	(r220131)
+++ head/sys/dev/ath/if_athioctl.h	Tue Mar 29 15:59:07 2011	(r220132)
@@ -128,7 +128,8 @@ struct ath_stats {
 	u_int32_t	ast_rx_decrypt_busy_err;
 	u_int32_t	ast_rx_hi_rx_chain;
 	u_int32_t	ast_tx_htprotect;	/* HT tx frames with protection */
-	u_int32_t	ast_pad[3];
+	u_int32_t	ast_rx_hitqueueend;
+	u_int32_t	ast_pad[2];
 };
 
 #define	SIOCGATHSTATS	_IOWR('i', 137, struct ifreq)


More information about the svn-src-all mailing list