summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/if_ath.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-03-10 04:14:04 +0000
committeradrian <adrian@FreeBSD.org>2012-03-10 04:14:04 +0000
commitbaaae4c089684ffdf08087371fb69edb26a97088 (patch)
treef1eeac29546cc6cdaa2731a048c92917139d9d31 /sys/dev/ath/if_ath.c
parent147645f640fdc88eafdb8d8942b31c147bba72e9 (diff)
downloadFreeBSD-src-baaae4c089684ffdf08087371fb69edb26a97088.zip
FreeBSD-src-baaae4c089684ffdf08087371fb69edb26a97088.tar.gz
Don't flood the cabq/mcastq with frames.
In a very noisy 2.4GHz environment (with HT/40 enabled, making it worse) I saw the following occur: * the air was considered "busy" a lot of the time; * the cabq time is quite short due to staggered beacons being enabled; * it just wasn't able to keep up TX'ing CABQ frames; * .. and the cabq would swallow up all the TX ath_buf's. This patch introduces a twiddle which allows the maximum cabq depth to be set, forcing further frames to be dropped. It defaults to the TX buffer count at the moment, so the default behaviour isn't changed. I've also started fleshing out a similar setup for the data path, so it doesn't swallow up all the available TX buffers and preventing management frames (such as ADDBA) out. PR: kern/165895
Diffstat (limited to 'sys/dev/ath/if_ath.c')
-rw-r--r--sys/dev/ath/if_ath.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index bff28ee..bc47f87 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -637,6 +637,19 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
#endif
/*
+ * TODO: enforce that at least this many frames are available
+ * in the txbuf list before allowing data frames (raw or
+ * otherwise) to be transmitted.
+ */
+ sc->sc_txq_data_minfree = 10;
+ /*
+ * Leave this as default to maintain legacy behaviour.
+ * Shortening the cabq/mcastq may end up causing some
+ * undesirable behaviour.
+ */
+ sc->sc_txq_mcastq_maxdepth = ath_txbuf;
+
+ /*
* Allow the TX and RX chainmasks to be overridden by
* environment variables and/or device.hints.
*
OpenPOWER on IntegriCloud