From 17c1a9e4d5f967c74c9cabe8abc58f29af44b433 Mon Sep 17 00:00:00 2001 From: adrian Date: Sat, 7 Apr 2012 02:51:53 +0000 Subject: [PATCH] Store away the RTS aggregate limit from the HAL. This will be used by some upcoming code to ensure that aggregates are enforced to be a certain size. The AR5416 has a limitation on RTS protected aggregates (8KiB). --- sys/dev/ath/if_ath.c | 7 +++++++ sys/dev/ath/if_athvar.h | 1 + 2 files changed, 8 insertions(+) diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 3866ba1f1a1a..9e1625ba7d87 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -732,6 +732,13 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) ic->ic_txstream = txs; ic->ic_rxstream = rxs; + (void) ath_hal_getcapability(ah, HAL_CAP_RTS_AGGR_LIMIT, 1, + &sc->sc_rts_aggr_limit); + if (sc->sc_rts_aggr_limit != (64 * 1024)) + device_printf(sc->sc_dev, + "[HT] RTS aggregates limited to %d KiB\n", + sc->sc_rts_aggr_limit / 1024); + device_printf(sc->sc_dev, "[HT] %d RX streams; %d TX streams\n", rxs, txs); } diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h index 04b7c301fafe..77e70662356e 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -533,6 +533,7 @@ struct ath_softc { uint16_t *sc_eepromdata; /* Local eeprom data, if AR9100 */ int sc_txchainmask; /* currently configured TX chainmask */ int sc_rxchainmask; /* currently configured RX chainmask */ + int sc_rts_aggr_limit; /* TX limit on RTS aggregates */ /* Queue limits */