diff options
author | Adrian Chadd <adrian@FreeBSD.org> | 2024-12-16 20:09:56 +0000 |
---|---|---|
committer | Adrian Chadd <adrian@FreeBSD.org> | 2024-12-28 01:46:38 +0000 |
commit | 791170aaf7efb4e053ccbf537d80a43e8a81d1e4 (patch) | |
tree | 2dfe20c3a78c8f2b9724f021a03c09858bd5ac2a | |
parent | 6ea1ce222c7ce2aeae7ecd3558c731cb8c05a37e (diff) |
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
-rw-r--r-- | sys/dev/rtwn/if_rtwn_rx.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); } |