diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 4388399353d2..98c219bb76c5 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 bce4ee603cbe..bbd1fe825711 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 022a00a45463..7245d060fbc1 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 09d03bc506f2..1b6e160dc101 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 */