summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-02-21 06:38:49 +0000
committeradrian <adrian@FreeBSD.org>2013-02-21 06:38:49 +0000
commit0e80cda705594a7a322a77d742acee43e2d940da (patch)
treecf5982809839c8a7769c0fd6a01097f815c64544 /sys/dev/ath
parente7a3528a802a6e703e526cd7fc6f3a75b8107fa1 (diff)
downloadFreeBSD-src-0e80cda705594a7a322a77d742acee43e2d940da.zip
FreeBSD-src-0e80cda705594a7a322a77d742acee43e2d940da.tar.gz
Add an option to allow the minimum number of delimiters to be tweaked.
This is primarily for debugging purposes. Tested: * AR5416, STA mode
Diffstat (limited to 'sys/dev/ath')
-rw-r--r--sys/dev/ath/if_ath.c1
-rw-r--r--sys/dev/ath/if_ath_sysctl.c11
-rw-r--r--sys/dev/ath/if_ath_tx_ht.c7
-rw-r--r--sys/dev/ath/if_athvar.h1
4 files changed, 18 insertions, 2 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 4388399..98c219bb 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -800,6 +800,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
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.
diff --git a/sys/dev/ath/if_ath_sysctl.c b/sys/dev/ath/if_ath_sysctl.c
index bce4ee6..bbd1fe8 100644
--- a/sys/dev/ath/if_ath_sysctl.c
+++ b/sys/dev/ath/if_ath_sysctl.c
@@ -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,
diff --git a/sys/dev/ath/if_ath_tx_ht.c b/sys/dev/ath/if_ath_tx_ht.c
index 022a00a..7245d06 100644
--- a/sys/dev/ath/if_ath_tx_ht.c
+++ b/sys/dev/ath/if_ath_tx_ht.c
@@ -364,6 +364,13 @@ ath_compute_num_delims(struct ath_softc *sc, struct ath_buf *first_bf,
&& 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);
diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h
index 09d03bc..1b6e160 100644
--- a/sys/dev/ath/if_athvar.h
+++ b/sys/dev/ath/if_athvar.h
@@ -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 */
OpenPOWER on IntegriCloud