git: 307f9c351588 - main - rtwn: only set INIRATE if we're not doing firmware rate control.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 Dec 2024 19:13:34 UTC
The branch main has been updated by adrian:
URL: https://cgit.FreeBSD.org/src/commit/?id=307f9c351588fcfe5a170c61754a5b1394b7dc0a
commit 307f9c351588fcfe5a170c61754a5b1394b7dc0a
Author: Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2024-12-15 21:04:28 +0000
Commit: Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2024-12-31 19:12:57 +0000
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
---
sys/dev/rtwn/rtl8192c/r92c_fw.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
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);
}