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
This commit is contained in:
Adrian Chadd 2024-12-16 12:09:56 -08:00
parent 6ea1ce222c
commit 791170aaf7

View file

@ -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);
}