This change affects MIMO-capable drivers: iwm(4), iwx(4), and athn(4)

Prevent MiRA from jumping from very high to very low rates while
switching ratesets when probing.

MiRA does multi-phase probing where it first probes within the current
rateset (e.g. MCS 8-15 aka MIMO2) and then switches to another rateset
(e.g. MCS 0-7 aka SISO) to see if that rateset contains an even better
rate.

When switching to another rateset, MiRA is supposed to begin probing
within the new rateset at a rate which is a close equivalent to the
"best" rate in the rateset it is switching away from.

E.g. if MCS 15 has been determined as the best MIMO2 rate, we should
start probing at MCS 7 when switching to the SISO rateset.
But because of a bug we start at the lowest rate (MCS 0) in this case,
which causes a noticable drop in throughput.

Keeps average throughput closer to the ideal test case of running
at a fixed high MIMO rate (provided that rate actually works best).

diff 875a69c55949fd83d2e1a833af1fbc2174a52ee0 /usr/src (staged changes)
blob - 29df16879e093b5774cfc010d9ad488e5a4af97e
blob + fb2f7c3f9553b3c473f25597d0005bd43c928b15
--- sys/net80211/ieee80211_mira.c
+++ sys/net80211/ieee80211_mira.c
@@ -670,6 +670,9 @@ ieee80211_mira_probe_next_rateset(struct ieee80211_mir
                        break;
                }
        }
+       /* If all rates are lower the maximum rate is the closest match. */
+       if (i == rsnext->nrates)
+               ni->ni_txmcs = rsnext->max_mcs;
 
        /* Add rates from the next rateset as candidates. */
        mn->candidate_rates |= (1 << ni->ni_txmcs);

Reply via email to