[Bug 285822] rtwn filters BARs for the VAP when not in promiscuous mode
Date: Mon, 31 Mar 2025 22:01:46 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285822
--- Comment #1 from Jessica Clarke <jrtc27@freebsd.org> ---
The following seems to resolve this for me (I see a BAR come through for the
VAP, and no others). Whether it's the right approach or not I leave up to
people who actually know what they're doing.
diff --git a/sys/dev/rtwn/if_rtwn.c b/sys/dev/rtwn/if_rtwn.c
index 7df1b78db37b..7a547e13cafa 100644
--- a/sys/dev/rtwn/if_rtwn.c
+++ b/sys/dev/rtwn/if_rtwn.c
@@ -1203,6 +1203,9 @@ rtwn_newstate(struct ieee80211vap *vap, enum
ieee80211_state nstate, int arg)
/* Stop Rx of data frames. */
rtwn_write_2(sc, R92C_RXFLTMAP2, 0);
+ /* Stop Rx of control frames. */
+ rtwn_write_2(sc, R92C_RXFLTMAP1, 0);
+
/* Reset EDCA parameters. */
rtwn_write_4(sc, R92C_EDCA_VO_PARAM, 0x002f3217);
rtwn_write_4(sc, R92C_EDCA_VI_PARAM, 0x005e4317);
@@ -1374,6 +1377,11 @@ rtwn_run(struct rtwn_softc *sc, struct ieee80211vap
*vap)
rtwn_write_2(sc, R92C_BCN_INTERVAL(uvp->id), ni->ni_intval);
if (sc->vaps_running == sc->monvaps_running) {
+ /* Enable Rx of BAR control frames. */
+ rtwn_write_2(sc, R92C_RXFLTMAP1,
+ 1 << (IEEE80211_FC0_SUBTYPE_BAR >>
+ IEEE80211_FC0_SUBTYPE_SHIFT));
+
/* Enable Rx of data frames. */
rtwn_write_2(sc, R92C_RXFLTMAP2, 0xffff);
--
You are receiving this mail because:
You are the assignee for the bug.