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. However, not
letting the hardware retry at lower rates seems to hurt at least my
athn-based AP a little. The failure pattern I've observed is:

 AP: RTS
 Client: CTS
 AP: data frame @ 9Mbit/s
 AP: RTS
 Client: CTS
 AP: data frame <retry> @ 9Mbit/s
 AP: RTS
 Client: CTS
 AP: data frame <retry> @ 9Mbit/s
 AP: RTS
 Client: CTS
 AP: data frame <retry> @ 9Mbit/s

and so on, until net80211 finally scales the rate down and the frame
has been dropped.

With the diff below, it changes to:

 AP: RTS
 Client: CTS
 AP: data frame @ 9Mbit/s
 AP: RTS
 Client: CTS
 AP: data frame <retry> @ 9Mbit/s
 AP: RTS
 Client: CTS
 AP: data frame <retry> @ 5.5Mbit/s
 AP: RTS
 Client: CTS
 AP: data frame <retry> @ 2Mbit/s
 Client: ACK

(The actual data frame rates wary over time, of course.)

net80211 will still account these retries against the current Tx rate,
and scale down. But every bit of air time counts and if hardware can
help us out a bit, then why not allow for that?

ok?

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    6 Oct 2016 16:25:47 -0000
@@ -1467,10 +1467,7 @@ ar5008_tx(struct athn_softc *sc, struct 
                                ds->ds_ctl0 |= AR_TXC0_CTS_ENABLE;
                }
        }
-       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. */
        for (i = 0; i < 4; i++) {
                series[i].hwrate = athn_rates[ridx[i]].hwrate;
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    6 Oct 2016 16:25:38 -0000
@@ -1613,10 +1613,7 @@ ar9003_tx(struct athn_softc *sc, struct 
                                ds->ds_ctl11 |= AR_TXC11_CTS_ENABLE;
                }
        }
-       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. */
        for (i = 0; i < 4; i++) {
                series[i].hwrate = athn_rates[ridx[i]].hwrate;

Reply via email to