On Thu, Oct 06, 2016 at 06:51:04PM +0200, Stefan Sperling wrote:
> athn(4) has a hack which disables lower Tx retry rates if RTS is used.
>
> I don't understand why this was added. Perhaps the assumption was
> that RTS will prevent transmission failures outright.
I believe I've found the reason for this after examining the frame
exchanges more closely. OK to commit these comments instead?
The duration field mentioned below specifies the air time required
to send the data frame + ack. And of course different data rates
use up different amounts of air time.
Index: ar5008.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/ar5008.c,v
retrieving revision 1.35
diff -u -p -r1.35 ar5008.c
--- ar5008.c 5 Jan 2016 18:41:15 -0000 1.35
+++ ar5008.c 7 Oct 2016 06:26:03 -0000
@@ -1467,8 +1467,12 @@ ar5008_tx(struct athn_softc *sc, struct
ds->ds_ctl0 |= AR_TXC0_CTS_ENABLE;
}
}
+ /*
+ * Disable multi-rate retries when protection is used.
+ * The RTS/CTS frame's duration field is fixed and won't be
+ * updated by hardware when the data rate changes.
+ */
if (ds->ds_ctl0 & (AR_TXC0_RTS_ENABLE | AR_TXC0_CTS_ENABLE)) {
- /* Disable multi-rate retries when protection is used. */
ridx[1] = ridx[2] = ridx[3] = ridx[0];
}
/* Setup multi-rate retries. */
Index: ar9003.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/ar9003.c,v
retrieving revision 1.39
diff -u -p -r1.39 ar9003.c
--- ar9003.c 5 Jan 2016 18:41:15 -0000 1.39
+++ ar9003.c 7 Oct 2016 06:26:18 -0000
@@ -1613,8 +1613,12 @@ ar9003_tx(struct athn_softc *sc, struct
ds->ds_ctl11 |= AR_TXC11_CTS_ENABLE;
}
}
+ /*
+ * Disable multi-rate retries when protection is used.
+ * The RTS/CTS frame's duration field is fixed and won't be
+ * updated by hardware when the data rate changes.
+ */
if (ds->ds_ctl11 & (AR_TXC11_RTS_ENABLE | AR_TXC11_CTS_ENABLE)) {
- /* Disable multi-rate retries when protection is used. */
ridx[1] = ridx[2] = ridx[3] = ridx[0];
}
/* Setup multi-rate retries. */