diff options
Diffstat (limited to 'sys/dev/ath/ath_rate/sample/sample.c')
-rw-r--r-- | sys/dev/ath/ath_rate/sample/sample.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/dev/ath/ath_rate/sample/sample.c b/sys/dev/ath/ath_rate/sample/sample.c index ad4c5e2..c993459 100644 --- a/sys/dev/ath/ath_rate/sample/sample.c +++ b/sys/dev/ath/ath_rate/sample/sample.c @@ -363,6 +363,30 @@ done: #undef RATE } +/* + * Get the TX rates. Don't fiddle with short preamble flags for them; + * the caller can do that. + */ +void +ath_rate_getxtxrates(struct ath_softc *sc, struct ath_node *an, + uint8_t rix0, uint8_t *rix, uint8_t *try) +{ + struct sample_node *sn = ATH_NODE_SAMPLE(an); + const struct txschedule *sched = &sn->sched[rix0]; + + KASSERT(rix0 == sched->r0, ("rix0 (%x) != sched->r0 (%x)!\n", rix0, sched->r0)); + +/* rix[0] = sched->r0; */ + rix[1] = sched->r1; + rix[2] = sched->r2; + rix[3] = sched->r3; + + try[0] = sched->t0; + try[1] = sched->t1; + try[2] = sched->t2; + try[3] = sched->t3; +} + void ath_rate_setupxtxdesc(struct ath_softc *sc, struct ath_node *an, struct ath_desc *ds, int shortPreamble, u_int8_t rix) |