rtwn: only set INIRATE if we're not doing firmware rate control.

This register (array) controls the initial rate to use for each
MACID.  There's no need to set it if firmware rate control is enabled -
it'll actually be under firmware control (and we can read it back to
see what choices the firmware is making.)

Locally tested:

* RTL8188EU, STA
* RTL8192CU, STA
* RTL8192EU, STA

Differential Revision:	https://reviews.freebsd.org/D48094
Reviewed by:	bz
This commit is contained in:
Adrian Chadd
2024-12-15 13:04:28 -08:00
parent af2e102c40
commit 307f9c3515
+6 -1
View File
@@ -239,7 +239,12 @@ r92c_init_ra(struct rtwn_softc *sc, int macid)
}
#endif
rtwn_write_1(sc, R92C_INIDATA_RATE_SEL(macid), maxrate);
/*
* There's no need to set this if firmware rate control is
* enabled - the firmware will be controlling this per MACID.
*/
if (sc->sc_ratectl != RTWN_RATECTL_FW)
rtwn_write_1(sc, R92C_INIDATA_RATE_SEL(macid), maxrate);
ieee80211_free_node(ni);
}