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

Adrian Chadd adrian at FreeBSD.org
Thu Feb 21 06:38:50 UTC 2013


Author: adrian
Date: Thu Feb 21 06:38:49 2013
New Revision: 247087
URL: http://svnweb.freebsd.org/changeset/base/247087

Log:
  Add an option to allow the minimum number of delimiters to be tweaked.
  
  This is primarily for debugging purposes.
  
  Tested:
  
  * AR5416, STA mode

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

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Thu Feb 21 06:38:24 2013	(r247086)
+++ head/sys/dev/ath/if_ath.c	Thu Feb 21 06:38:49 2013	(r247087)
@@ -800,6 +800,7 @@ ath_attach(u_int16_t devid, struct ath_s
 	sc->sc_tid_hwq_lo = ATH_AGGR_SCHED_LOW;
 	sc->sc_tid_hwq_hi = ATH_AGGR_SCHED_HIGH;
 	sc->sc_aggr_limit = ATH_AGGR_MAXSIZE;
+	sc->sc_delim_min_pad = 0;
 
 	/*
 	 * Check if the hardware requires PCI register serialisation.

Modified: head/sys/dev/ath/if_ath_sysctl.c
==============================================================================
--- head/sys/dev/ath/if_ath_sysctl.c	Thu Feb 21 06:38:24 2013	(r247086)
+++ head/sys/dev/ath/if_ath_sysctl.c	Thu Feb 21 06:38:49 2013	(r247087)
@@ -714,9 +714,16 @@ ath_sysctlattach(struct ath_softc *sc)
 
 	/* Aggregate length twiddles */
 	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
-		"aggr_limit", CTLFLAG_RW, &sc->sc_aggr_limit, 0, "");
+		"aggr_limit", CTLFLAG_RW, &sc->sc_aggr_limit, 0,
+		"Maximum A-MPDU size, or 0 for 'default'");
 	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
-		"rts_aggr_limit", CTLFLAG_RW, &sc->sc_rts_aggr_limit, 0, "");
+		"rts_aggr_limit", CTLFLAG_RW, &sc->sc_rts_aggr_limit, 0,
+		"Maximum A-MPDU size for RTS-protected frames, or '0' "
+		"for default");
+	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+		"delim_min_pad", CTLFLAG_RW, &sc->sc_delim_min_pad, 0,
+		"Enforce a minimum number of delimiters per A-MPDU "
+		" sub-frame");
 
 	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"txq_data_minfree", CTLFLAG_RW, &sc->sc_txq_data_minfree,

Modified: head/sys/dev/ath/if_ath_tx_ht.c
==============================================================================
--- head/sys/dev/ath/if_ath_tx_ht.c	Thu Feb 21 06:38:24 2013	(r247086)
+++ head/sys/dev/ath/if_ath_tx_ht.c	Thu Feb 21 06:38:49 2013	(r247087)
@@ -364,6 +364,13 @@ ath_compute_num_delims(struct ath_softc 
 	    && ndelim < AH_FIRST_DESC_NDELIMS)
 		ndelim = AH_FIRST_DESC_NDELIMS;
 
+	/*
+	 * If sc_delim_min_pad is non-zero, enforce it as the minimum
+	 * pad delimiter count.
+	 */
+	if (sc->sc_delim_min_pad != 0)
+		ndelim = MAX(ndelim, sc->sc_delim_min_pad);
+
 	DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR,
 	    "%s: pktlen=%d, ndelim=%d, mpdudensity=%d\n",
 	    __func__, pktlen, ndelim, mpdudensity);

Modified: head/sys/dev/ath/if_athvar.h
==============================================================================
--- head/sys/dev/ath/if_athvar.h	Thu Feb 21 06:38:24 2013	(r247086)
+++ head/sys/dev/ath/if_athvar.h	Thu Feb 21 06:38:49 2013	(r247087)
@@ -719,6 +719,7 @@ struct ath_softc {
 	int			sc_rxchainmask;	/* currently configured RX chainmask */
 	int			sc_rts_aggr_limit;	/* TX limit on RTS aggregates */
 	int			sc_aggr_limit;	/* TX limit on all aggregates */
+	int			sc_delim_min_pad;	/* Minimum delimiter count */
 
 	/* Queue limits */
 


More information about the svn-src-all mailing list