svn commit: r361319 - head/sys/dev/ath/ath_rate/sample
Adrian Chadd
adrian at FreeBSD.org
Thu May 21 03:53:46 UTC 2020
Author: adrian
Date: Thu May 21 03:53:45 2020
New Revision: 361319
URL: https://svnweb.freebsd.org/changeset/base/361319
Log:
[ath_rate_sample] Obey the maximum frame length even when using static rates.
I wasn't enforcing the maximum packet length when using static rates
so although the driver was enforcing it itself OK, the statistics were
sometimes going into the wrong bin.
Tested:
* AR9380, STA mode
Modified:
head/sys/dev/ath/ath_rate/sample/sample.c
Modified: head/sys/dev/ath/ath_rate/sample/sample.c
==============================================================================
--- head/sys/dev/ath/ath_rate/sample/sample.c Thu May 21 03:50:56 2020 (r361318)
+++ head/sys/dev/ath/ath_rate/sample/sample.c Thu May 21 03:53:45 2020 (r361319)
@@ -165,6 +165,11 @@ static int ath_rate_sample_max_4ms_framelen[4][32] = {
* MCS rate in the transmit schedule.
*
* Returns -1 if it's a legacy rate or no MRR.
+ *
+ * XXX TODO: this needs to be limited by the RTS/CTS AR5416 8KB bug limit!
+ * (by checking rts/cts flags and applying sc_rts_aggr_limit)
+ *
+ * XXX TODO: apply per-node max-ampdu size and driver ampdu size limits too.
*/
static int
ath_rate_sample_find_min_pktlength(struct ath_softc *sc,
@@ -693,6 +698,17 @@ ath_rate_findrate(struct ath_softc *sc, struct ath_nod
if (sn->static_rix != -1) {
rix = sn->static_rix;
*try0 = ATH_TXMAXTRY;
+
+ /*
+ * Ensure we limit max packet length here too!
+ */
+ max_pkt_len = ath_rate_sample_find_min_pktlength(sc, an,
+ sn->static_rix,
+ is_aggr);
+ if (max_pkt_len > 0) {
+ *maxpktlen = frameLen = MIN(frameLen, max_pkt_len);
+ size_bin = size_to_bin(frameLen);
+ }
goto done;
}
More information about the svn-src-all
mailing list