aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2024-12-15 21:04:28 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2024-12-31 19:12:57 +0000
commit307f9c351588fcfe5a170c61754a5b1394b7dc0a (patch)
tree7619cd29b895062ede446853d71480ca90e6401a
parentaf2e102c40652156c89029177da7961165ffe4cc (diff)
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
-rw-r--r--sys/dev/rtwn/rtl8192c/r92c_fw.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/rtwn/rtl8192c/r92c_fw.c b/sys/dev/rtwn/rtl8192c/r92c_fw.c
index 384cd50e901a..58584b3cd020 100644
--- a/sys/dev/rtwn/rtl8192c/r92c_fw.c
+++ b/sys/dev/rtwn/rtl8192c/r92c_fw.c
@@ -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);
}