git: 791170aaf7ef - main - rtwn: make sure RCR_APPFCS stays set in monitor mode / mode changes.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 28 Dec 2024 01:47:02 UTC
The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=791170aaf7efb4e053ccbf537d80a43e8a81d1e4 commit 791170aaf7efb4e053ccbf537d80a43e8a81d1e4 Author: Adrian Chadd <adrian@FreeBSD.org> AuthorDate: 2024-12-16 20:09:56 +0000 Commit: Adrian Chadd <adrian@FreeBSD.org> CommitDate: 2024-12-28 01:46:38 +0000 rtwn: make sure RCR_APPFCS stays set in monitor mode / mode changes. My previous commit meant that APPFCS wasn't enabled during monitor mode and likely other corner cases. Ensure it stays on at all times. This, amusingly, fixes monitor mode in RTL8812AU/RTL8821AU - without it, I don't see HT/VHT frames in monitor mode but I can still receive them in normal STA mode. Differential Revision: https://reviews.freebsd.org/D48112 --- sys/dev/rtwn/if_rtwn_rx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/dev/rtwn/if_rtwn_rx.c b/sys/dev/rtwn/if_rtwn_rx.c index b1465dd80ee7..e5ddc7a3cb97 100644 --- a/sys/dev/rtwn/if_rtwn_rx.c +++ b/sys/dev/rtwn/if_rtwn_rx.c @@ -532,7 +532,7 @@ rtwn_set_promisc(struct rtwn_softc *sc) RTWN_ASSERT_LOCKED(sc); mask_all = R92C_RCR_ACF | R92C_RCR_ADF | R92C_RCR_AMF | R92C_RCR_AAP; - mask_min = R92C_RCR_APM | R92C_RCR_APPFCS; + mask_min = R92C_RCR_APM; if (sc->bcn_vaps == 0) mask_min |= R92C_RCR_CBSSID_BCN; @@ -551,5 +551,12 @@ rtwn_set_promisc(struct rtwn_softc *sc) sc->rcr &= ~mask_min; sc->rcr |= mask_all; } + + /* + * Add FCS, to work around occasional 4 byte truncation. + * See the previous comment above R92C_RCR_APPFCS. + */ + sc->rcr |= R92C_RCR_APPFCS; + rtwn_rxfilter_set(sc); }