Skip to content

rx: opt-in drop_ctrl and own_addr_only monitor RX filters (Jaguar2/3, RTL8733B) - #595

Merged
josephnef merged 2 commits into
OpenIPC:masterfrom
snokvist:feature/rx-drop-ctrl-own-addr
Nov 21, 2026
Merged

josephnef merged 2 commits into
OpenIPC:masterfrom
snokvist:feature/rx-drop-ctrl-own-addr

Conversation

@snokvist

@snokvist snokvist commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

What this is

A monitor-mode link that sends unicast and receives its peer's ACKs spends most of its host RX work on frames it never uses. Measured on an embedded ARM host with an 8812EU sending about 750 frames/s:

  • the ACKs for its own frames (about 750/s, control subtype 13);
  • on a shared channel, other networks' unicast (740–1,015/s: data, RTS, BlockAck).

Two opt-in DeviceConfig::Rx knobs let the MAC drop these. Both are off by default, and with both off every register write is unchanged.

Knob (env) Register Effect
drop_ctrl (DEVOURER_RX_DROP_CTRL) RXFLTMAP1 (0x06A2) = 0 Control frames stop at the MAC. The MAC still acts on the ACKs for its own frames.
own_addr_only (DEVOURER_RX_OWN_ADDR_ONLY) RCR: AAP off, APM|AM|AB on Only unicast to MACID (0x0610), plus group frames.

Jaguar2, Jaguar3 and the RTL8733B. Silently inert elsewhere, like keep_corrupted.

What changed

  • src/DeviceConfig.h: the two fields. The comments say that Jaguar2/3 bring-up does not program MACID, so arm an identity first (SetAckResponder, a station or beacon arm). They also say that host readers of control frames get none, and that a beamformee arm re-opens subtypes 4-5.
  • src/RxFilter.h: monitor_rcr() and monitor_ctrl_map(), the pure arithmetic shared by the three families.
  • Jaguar3: the three filter-map writes move into HalJaguar3::write_rx_filter_maps(), used by both monitor_rx_cfg and the re-open after a TX-only InitWrite. Same writes, same order. Its RX log line prints the RCR and RXFLTMAP1 written.
  • HalJaguar2::enable_rx: applies monitor_rcr, and writes RXFLTMAP1 = 0 only when drop_ctrl is set. So the 8822B's reset value 0x0FFF and the 8821C's MAC-init 0xFFFF stay as before.
  • Halmac8733bMac::configure_monitor_rx now takes the Rx struct and calls the helpers.
  • examples/common/env_config.cpp: the two env flags.
  • tests/rx_filter_selftest.cpp: the RCR arithmetic on each family's base value, and the knobs-off identity.

Cost

None with the knobs off. With them on, the host no longer sees control frames or third-party unicast. The DeviceConfig.h comments name the in-tree readers this affects (rx.blockack, the cell RTS/BA attribution, sounding captures).

Verification

Camera end: an 8812EU on an SSC338Q (ARM Cortex-A7). It sends about 750 frames/s of real H.265 video to an 8733BU, whose ACK responder is armed at both ends. ch36, MCS4. Both ends use the same knobs. CPU is the sender process's user+sys, over 60 s windows.

The busy channel: an 8812BU nearby, with no peer, sending 700 foreign unicast frames/s of 1400 B at MCS4.

Arm (75 s) Channel Reports/s at the ARM host ARM host CPU, ms/s Retry share Lost Peer's 40 Hz beacons heard/s
control busy 1,602 155.0 2.21 % 0 34.0
both knobs busy 113 112.8 2.37 % 0 32.5
control busy 1,586 153.2 2.24 % 0 33.9
both knobs busy 116 113.5 2.30 % 1 34.5
control quiet 882 135.0 0.20 % 0 39.2
both knobs quiet 88 110.5 0.18 % 0 39.4
  • Readback after bring-up:

    • 8812EU: RCR f410400f → f410400e;
    • 8733BU: 90000001 → 9000000e;
    • RXFLTMAP1 0000 on both.
  • Each knob alone (register writes from the host, same busy setup):

    • own_addr_only 155 → 139 ms/s;
    • drop_ctrl with the other filter maps also closed, 155 → 141;
    • both together about 110.

    The management and data-subtype maps, and a BSSID check, would remove fewer than 75 frames/s together, so they are not in this PR.

  • The ACKs for our own frames still end retries with drop_ctrl on, on all three families. On an x86 host, quiet channel, 60 s runs (window from 10 s to the end):

    Sender → receiver Knobs Retry share Lost Sender reports/s
    8812EU → 8733BU (table above) on 2.30–2.37 % busy, 0.18 % quiet 0–1 88–116
    8812BU → 8733BU off 0.47 % 0 109
    8812BU → 8733BU on 0.37 % 0 85
    8733BU → 8812BU off 0.26 % 0 740
    8733BU → 8812BU on 0.14 % 0 80

    The 8822B already drops ACK/CTS by default (RXFLTMAP1 0x0FFF), so it gains less.

  • Loss, checked separately: in 300 s runs with CCX reports on, the busy channel sometimes lost frames in short bursts, almost all of them chip lifetime drops (TX report state 2). This happened with and without the knobs (unfiltered: 1 and 29 lost; filtered: 0 to 160). It tracked the channel through the afternoon, not the knobs.

  • After the cleanup commit (one Jaguar3 filter-map writer), a 40 s quiet run on the ARM host with both knobs: 86 reports/s, 110.7 ms/s, retry 0.09 %, 0 lost. Readback unchanged.

  • Tests and build:

    • ctest: 93/93, and 93/93 under -DDEVOURER_SANITIZE=address+undefined;
    • the unique compiler-warning set is the same as master's (9);
    • a mutation (AAP left set) fails 3 checks in the new selftest.

Not verified

  • The 8812CU / 8822C and the 8821C (same code paths as the 8822E / 8822B).
  • PCIe parts.
  • USB3 on the ARM host.
  • own_addr_only without an armed ACK responder on Jaguar2/3. The comment says it drops unicast there, since MACID is unprogrammed.
  • With own_addr_only on, the 8812BU still passed about 2 foreign unicast frames/s. What they were was not traced.

🤖 Generated with Claude Code

… RTL8733B)

Two DeviceConfig::Rx knobs, both off by default (register writes
unchanged):
- drop_ctrl (DEVOURER_RX_DROP_CTRL): RXFLTMAP1 = 0, so control frames
  stop at the MAC. The MAC still acts on the ACKs for its own frames.
- own_addr_only (DEVOURER_RX_OWN_ADDR_ONLY): RCR AAP off, APM|AM|AB on,
  so only unicast to MACID plus group frames reach the host.

On a link that sends video and receives its peer's ACKs, the host
otherwise spends most of its RX work on the ACKs for its own frames and
on other networks' unicast. src/RxFilter.h holds the arithmetic; a
selftest pins the per-family RCR values and the knobs-off identity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dReg158JQxkhEWGPBro5f
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Add opt-in monitor RX filters for control and foreign unicast frames

✨ Enhancement 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Add opt-in MAC filters to reduce host processing of control frames and third-party unicast.
• Apply the filters across Jaguar2, Jaguar3, and RTL8733B without changing default register writes.
• Add environment flags and headless tests for per-family filter values.
Merge Risk 🟡 Medium

Blast radius 🟡 Medium 💥 2 capabilities

  • 2 affected capabilities within one bounded functional scope: realtek_monitor_rx.
  • The changed environment fields, shared register helper, and three hardware-specific monitor setup paths implement one bounded monitor-capture behavior.
  • The RCR and RXFLTMAP writes are propagation hops of that same end-to-end capture capability, not separate capabilities.
  • This is a distinct system outcome within the bounded Realtek monitor/beamforming integration: responding to an NDPA/NDP exchange and producing a CSI report.
  • The path is independent from ordinary monitor capture at the user outcome level, but shares the same hardware RX-filter boundary and therefore remains in the same functional scope.
Behavioral complexity 🟡 Medium 🧩 Interacting branches, Coordinated invariants

  • Before: beamformee arming could add required RX-filter bits, while the TX-only-to-RX transition separately closed and later reopened the monitor maps.
  • After: the restoration is centralized through a helper that derives RXFLTMAP1 solely from drop_ctrl.
  • New correctness condition: restoration must preserve both the monitor policy and any beamformee-specific acceptance bits across the closed-to-reopened state transition.
  • The existing branches are not merely extracted; they now interact through a shared register write, and the source does not show a preservation mechanism.
Potential damage 🟡 Medium 🩹 Temporary loss

  • The affected capability is loss or narrowing of monitor frames, not persistent corruption.
  • Disabling the option and restarting/re-running monitor bring-up restores the normal filter configuration.
  • For own_addr_only on Jaguar2/3, recovery additionally requires a supported identity-arming path before capture; the source explicitly says those bring-ups do not program MACID automatically. drop_ctrl is a deliberate host-delivery restriction, but it can still remove required control-frame observations from the monitor capability.
  • Recoverable by changing the configuration and restarting the relevant bring-up; no persistent state repair or external compensation is indicated.
  • If a capture consumer requires control frames, it must be restarted after reopening the filter.
Assessed commit 2fab277
Diagram

graph TD
  Config["RX configuration"] --> Helpers["Filter helpers"] --> J2["Jaguar2 setup"] --> MAC["MAC RX filters"] --> Host["Host RX"]
  Helpers --> J3["Jaguar3 setup"] --> MAC
  Helpers --> RTL["RTL8733B setup"] --> MAC
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Filter frames in the host RX pipeline
  • ➕ Preserves full monitor capture for other host consumers.
  • ➕ Avoids chipset-specific register behavior.
  • ➖ Does not avoid MAC-to-host transfer or host RX processing, the overhead this PR targets.
2. Filter selected control subtypes only
  • ➕ Could retain RTS, BlockAck, or sounding frames needed by host features.
  • ➖ Requires a more complex policy and would discard fewer unwanted control frames.

Recommendation: Keep the opt-in MAC filtering and shared register calculations: they address host RX overhead while preserving existing defaults. Documented tradeoffs matter—drop_ctrl starves control-frame readers, and own_addr_only on Jaguar2/3 requires a suitable MACID to be programmed before expected unicast can pass.

Files changed (11) +136 / -9

Enhancement (8) +70 / -9
DeviceConfig.hDefine opt-in monitor RX settings +20/-0

Define opt-in monitor RX settings

• Adds disabled-by-default drop_ctrl and own_addr_only fields. Comments describe supported chipsets, MACID prerequisites, and host features that filtering can starve.

src/DeviceConfig.h

RxFilter.hShare monitor filter calculations +28/-0

Share monitor filter calculations

• Adds helpers that clear promiscuous unicast acceptance while enabling address and group matching, or close the control-subtype map when requested.

src/RxFilter.h

HalJaguar2.cppApply Jaguar2 monitor RX filters +6/-0

Apply Jaguar2 monitor RX filters

• Applies the configured RCR calculation during RX enable. Writes the control-frame map only when drop_ctrl is enabled, preserving each chip's initialization value by default.

src/jaguar2/HalJaguar2.cpp

HalJaguar3.cppApply Jaguar3 monitor filter settings +5/-2

Apply Jaguar3 monitor filter settings

• Uses the shared RCR and control-map calculations in monitor setup and logs the values applied.

src/jaguar3/HalJaguar3.cpp

RtlJaguar3Device.cppPreserve control filtering during TX+RX restoration +2/-1

Preserve control filtering during TX+RX restoration

• Restores Jaguar3's control-frame map according to the RX setting when reopening filters for a receive loop after TX-oriented bring-up.

src/jaguar3/RtlJaguar3Device.cpp

Halmac8733bMac.cppApply RTL8733B monitor RX filters +5/-3

Apply RTL8733B monitor RX filters

• Accepts the full RX configuration and uses it to set RCR and the control-frame map while retaining keep_corrupted behavior.

src/rtl8733b/Halmac8733bMac.cpp

Halmac8733bMac.hExpand RTL8733B monitor configuration interface +2/-1

Expand RTL8733B monitor configuration interface

• Changes configure_monitor_rx to accept DeviceConfig::Rx instead of a single keep_corrupted flag.

src/rtl8733b/Halmac8733bMac.h

Rtl8733bDevice.cppPass RX settings through RTL8733B bring-up +2/-2

Pass RX settings through RTL8733B bring-up

• Passes the full RX configuration to monitor setup from both receive initialization and TX-with-RX initialization.

src/rtl8733b/Rtl8733bDevice.cpp

Tests (2) +64 / -0
CMakeLists.txtRegister RX filter selftest +8/-0

Register RX filter selftest

• Builds and registers a headless test for the monitor RCR and control-frame map calculations.

CMakeLists.txt

rx_filter_selftest.cppTest filter values across three families +56/-0

Test filter values across three families

• Checks default RCR and control-map values, per-family own-address RCR values, and drop_ctrl behavior independently.

tests/rx_filter_selftest.cpp

Other (1) +2 / -0
env_config.cppExpose RX filter environment flags +2/-0

Expose RX filter environment flags

• Maps DEVOURER_RX_DROP_CTRL and DEVOURER_RX_OWN_ADDR_ONLY to the new RX configuration fields.

examples/common/env_config.cpp

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Beamformee captures lose addressed frames 🐞 Bug ≡ Correctness
Description
monitor_rcr() clears promiscuous acceptance when own_addr_only is enabled, leaving beamformee
reception dependent on the current MACID even though configured ACK-responder setup subsequently
overwrites the beamformee's MACID. When both features are configured with different addresses on
Jaguar2 or Jaguar3, NDPA frames addressed to the beamformee identity no longer pass its RX filter.
Code

src/jaguar2/HalJaguar2.cpp[2753]

+  rcr = devourer::monitor_rcr(rcr, _cfg.rx);
Evidence
The new helper makes MACID matching the only unicast acceptance path. Jaguar2 programs a fixed
beamformee MACID and then arms the configured ACK responder, whose shared recipe writes its target
to the same register; Jaguar3 has the same ordering.

src/RxFilter.h[12-20]
src/jaguar2/RtlJaguar2Device.cpp[568-585]
src/jaguar3/RtlJaguar3Device.cpp[167-201]
src/AckResponder.h[73-94]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
With `own_addr_only`, a beamformee and an ACK responder configured for different addresses cannot both receive unicast through the single MACID match. Both Jaguar bring-up paths arm the beamformee before the ACK responder replaces its MACID.
## Fix Focus Areas
- src/jaguar2/HalJaguar2.cpp[2750-2758]
- src/jaguar2/RtlJaguar2Device.cpp[568-585]
- src/jaguar3/HalJaguar3.cpp[537-544]
- src/jaguar3/RtlJaguar3Device.cpp[167-201]
## Recommended Fix
Handle conflicting identities explicitly during bring-up and runtime ACK-responder changes. Either retain promiscuous reception for this combination, or reject incompatible addresses before claiming that the beamformee is armed; cover both Jaguar families with a test.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. A later receive session loses sounding 🐞 Bug ≡ Correctness
Description
start_rx_loop() now restores RXFLTMAP1 from monitor_ctrl_map(), which writes zero for
drop_ctrl and erases the control-subtype bits set by a beamformee arm. On the same device, a
TX-only InitWrite() leaves _rx_filters_closed set; a subsequent Init() arms the beamformee
before entering that restore path, so its NDPA and report-poll reception is closed again.
Code

src/jaguar3/RtlJaguar3Device.cpp[255]

+        _device.rtw_write<uint16_t>(0x06A2, devourer::monitor_ctrl_map(_cfg.rx));
Evidence
TX-only initialization sets the flag, while receive initialization arms the beamformee before
calling start_rx_loop() and does not first clear that flag. The changed restore write therefore
replaces the beamformee's RXFLTMAP1 bits with the helper's zero value.

src/jaguar3/RtlJaguar3Device.cpp[1130-1139]
src/jaguar3/RtlJaguar3Device.cpp[167-217]
src/jaguar3/RtlJaguar3Device.cpp[245-258]
src/BeamformingSounder.h[128-141]
src/RxFilter.h[23-25]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A Jaguar3 TX-only bring-up leaves the RX-filters-closed flag set. If a later `Init()` arms a beamformee, its RX-loop restore overwrites the newly opened NDPA and report-poll bits with zero when `drop_ctrl` is enabled.
## Fix Focus Areas
- src/jaguar3/RtlJaguar3Device.cpp[245-258]
- src/jaguar3/RtlJaguar3Device.cpp[1130-1139]
- src/jaguar3/RtlJaguar3Device.cpp[167-185]
## Recommended Fix
Reset the closed-filter state when `Init()` establishes its new monitor RX configuration, so its later RX loop does not restore stale TX-only state. Ensure any restore that remains necessary preserves control bits deliberately reopened by beamformee arming, and test the same-device `InitWrite()`-then-`Init()` sequence.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

- HalJaguar3::write_rx_filter_maps() now writes the three maps for both
  monitor_rx_cfg and the re-open after a TX-only InitWrite, so a filter
  knob has one place to change. Same writes, same order.
- Jaguar2 writes the constant 0 under drop_ctrl; its comment says 0x0FFF
  is the 8822B reset value, not a MAC-init write.
- The two DeviceConfig comments shortened to the keep_corrupted style.
- Dropped a redundant include and repeated header comments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dReg158JQxkhEWGPBro5f

@josephnef josephnef left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Code read, ctest green on a local build, and checked on air on four dies — including the 8812CU and the "no armed identity" case the description lists as not verified.

On-air check

ch36, 10 s cells. A T3U (8812BU) floods unicast QoS-Data to address X at ~250 frames/s; a second adapter is armed as ACK responder for X so control frames are on air. Each DUT is judged by its own per-frame events (DEVOURER_RX_DUMP_ALL frame-control classes, and SA-gated rx.seq for the flood).

DUT off: ctrl / unicast-to-X drop_ctrl: ctrl / unicast own_addr_only, no identity: unicast identity = X identity = Y both knobs, identity = X: ctrl / unicast
8812CU (0bda:c812) 6168 / 1863 3 / 1887 0 2062 0 2 / 2015
8812BU (0bda:b812) 2357 / 1946 0 / 2073 0 1971 0 0 / 1917
8733BU (0bda:b733) 5785 / 2004 3 / 2064 0 2096 0 1 / 2035
8812EU (0bda:a81a) 5444 / 2075 3 / 2051 0 1951 0 3 / 1830
  • Management-frame counts (ambient beacons) were unchanged in every cell, so group frames still pass under own_addr_only.
  • Logged RCR / RXFLTMAP1 matched the description on each family (f410400f→f410400e, f000002f→f000002e, 90000001→9000000e).
  • 1–3 control frames still reached the host under drop_ctrl on Jaguar3 and the 8733B. Not traced.
  • Not measured here either: BlockAck handling under A-MPDU TX with drop_ctrl on (only the ACK/retry path was), the 8821C, PCIe.
  • One unit of each die, one channel, one session.

Notes, none blocking

  1. Qodo's "a later receive session loses sounding" is real but narrow. On Jaguar3 a TX-only InitWrite sets _rx_filters_closed, and Init never clears it. A later Init on the same object with bf.beamformee_of and drop_ctrl arms the beamformee (ORs 0x30 into RXFLTMAP1) and then start_rx_loop calls write_rx_filter_maps(), which writes the map back to 0. Before this PR that restore wrote 0xFFFF, so it was harmless. Clearing the flag when Init establishes its own monitor config would fix it.
  2. Qodo's identity conflict is real too. With own_addr_only, bf.beamformee_of plus an ack_responder on a different MAC cannot both receive: SetAckResponder overwrites the MACID the beamformee arm just wrote. Refusing the combination, or a line in the DeviceConfig.h comment, would do.
  3. own_addr_only with no identity on Jaguar2/3 is a silent total loss of unicast (the zero column above). The header comment says so; a one-shot W at bring-up when the knob is set and nothing programs MACID would save someone a debugging session.
  4. Jaguar1 is silently inert although it has the same RCR / RXFLTMAP1 registers, and there is no AdapterCaps flag for a caller to tell. Fine for this PR; worth a follow-up given how common the 8812AU is.

qodo-gate is red because Qodo answered with comments rather than a review; it needs a re-run or the skip-qodo-gate label.

@josephnef josephnef added the skip-qodo-gate Bypass the Qodo review gate (outage / maintainer decision) label Nov 21, 2026
@josephnef
josephnef merged commit c15672a into OpenIPC:master Nov 21, 2026
30 of 31 checks passed
josephnef pushed a commit that referenced this pull request Nov 21, 2026
## What changed and why

The review of #595 left four notes. This PR covers 1–3, plus one stale
comment. Note 4 (Jaguar1 has the same registers but ignores both knobs)
is not here and would be its own PR.

1. **Jaguar3: a TX-only bring-up followed by an RX bring-up on the same
object.** `InitWrite` sets `_rx_filters_closed`
(`src/jaguar3/RtlJaguar3Device.cpp:1136`), and `Init` never cleared it.
With `bf.beamformee_of` and `drop_ctrl`:
   - `Init` arms the beamformee (RXFLTMAP1 |= 0x30);
- `StartRxLoop` then saw the stale flag and rewrote the maps, putting
RXFLTMAP1 back to 0.

`Init` now clears the flag right after `rtw_hal_init`, which has just
written this session's own maps through `monitor_rx_cfg`.
2. **One identity under `own_addr_only`.** The `DeviceConfig.h` comment
now says that an ACK responder on another address overwrites the MACID a
beamformee arm wrote. Comment only: refusing the combination would be a
behaviour change.
3. **Silent loss of all unicast.** Jaguar2/3 `StartRxLoop` logs one
warning when `own_addr_only` is set and MACID still reads
00:00:00:00:00:00. It reuses `ack::macid_is` from `AckResponder.h`. On
Jaguar3 the read is under `_reg_mu`, like the other register access
there.
4. **`IRadio.h`'s station note** said the default NOACK stream radiotap
"never retries". Only the MT7612U reads that flag (`RadiotapBuilder.h`
already says so). The Realtek descriptors take the retry count from
`tx.retry_limit` (`src/jaguar2/RtlJaguar2Device.cpp:1900`,
`src/jaguar3/RtlJaguar3Device.cpp:2905`, which zero it only in A-MPDU
no-ack mode). A unicast frame sent with NOACK on an RTL8733B still aired
5.5 times on average with `retry_limit` 16.

## Evidence

Note 3, on an RTL8812BU (`0bda:b812`, USB3), `rxdemo`, ch36,
`DEVOURER_RX_OWN_ADDR_ONLY=1`:

| Run | Log |
|---|---|
| no identity | `[W] Jaguar2: rx.own_addr_only with MACID
00:00:00:00:00:00: no unicast passes until SetAckResponder or a station
or beacon arm sets an identity` |
| `DEVOURER_ACK_RESPONDER=02:57:4e:11:22:33` (control) | `hardware ACK
responder armed for 02:57:4e:11:22:33`, no warning |

With the knob off the condition is false, so no read and no log.

## Verification

- Build: Release, default options. The unique warning set is the same as
master's (9).
- Tests: `ctest` 93/93.
- Hardware: note 3 on the 8812BU only, once per arm.

## Not verified

- **Note 1 on hardware.** No in-tree example runs `InitWrite` and then
`Init` on the same object. The fix follows the code path the review
traced.
- **Note 3 on Jaguar3:** same code; not run on an 8812CU or 8812EU.

## Blast radius

- Note 1: only a Jaguar3 object that ran `InitWrite` and then `Init`. A
plain RX or a plain TX session is unchanged.
- Note 3: one register read and at most one log line per `StartRxLoop`,
only with `own_addr_only` set.
- Notes 2 and 4: comments only.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
josephnef added a commit that referenced this pull request Nov 21, 2026
## What this is

The rest of #597, on top of #598 (which landed the Jaguar3 `Init` flag
clear, the MACID-zero warning and the comments).

- **Jaguar1 applies `rx.drop_ctrl` and `rx.own_addr_only`.**
`own_addr_only` uses the shared `monitor_rcr()`; Jaguar1 bring-up
already programs MACID from EFUSE, so it needs no identity arm.
`drop_ctrl` clears RCR `ACF` as well as RXFLTMAP1, because on this MAC
the map alone filtered nothing.
- **Jaguar2/3 refuse one combination at bring-up:** `own_addr_only` with
a beamformee arm and an ACK responder on a different address. MACID
holds one address, so that session could not receive both. Same address,
or promiscuous RX, is unaffected. #598 documented this; this makes it an
error (`std::runtime_error`, like a failed responder arm).
- **Jaguar3 `InitWrite` clears the "RX filters closed" state** after its
bring-up, as `Init` now does.
- **`AdapterCaps::rx_mac_filters_ok`** (`rx_mac_filters` in
`adapter.caps`): whether the backend applies the two knobs. Jaguar1,
Jaguar2, Jaguar3, RTL8733B.
- `DeviceConfig.h`: a few control frames admitted during bring-up can
still reach the host under `drop_ctrl`.

## Measured

All ch36, one unit per die. The flood is a T3U sending unicast QoS-Data
to address X; a hardware ACK responder for X puts control frames on air.
Counts are the DUT's own per-frame events over a 10 s cell (8 s for the
last two rows).

**Jaguar1, 8812AU** (on a second host, RF-coupled to the bench):

| Cell | Control frames | Flood frames to X |
|---|---|---|
| off | 4951 | 4210 |
| `drop_ctrl` | 143 (all BlockAck) | 4240 |
| `own_addr_only`, EFUSE identity | 0 | 0 |
| `own_addr_only`, identity X | 0 | 4270 |
| `own_addr_only`, identity Y | 0 | 0 |
| both, identity X | 0 | 4263 |

Management frames were 364–368 in every cell. With RXFLTMAP1 = 0 alone,
`drop_ctrl` read 4184 control frames against 4234 off.

**8812AU as transmitter, `drop_ctrl` on its own RX** (peer: an 8812BU
hardware responder; TX reports OK):

| | open | `drop_ctrl` | no responder |
|---|---|---|---|
| unicast, retry limit 6 | 86% | 87% | 0% |
| A-MPDU | 78% | 77% | 0% |

**BlockAck under A-MPDU with `drop_ctrl` on the transmitter** (the item
#595 left unmeasured), TX reports OK, open / `drop_ctrl` / no responder:
8812CU 96 / 96 / 0%, 8812BU 95 / 97 / 0%, 8733BU 95 / 97 / 0%. Under
aggregation the per-frame retry count reads 0 in every cell, including
no responder, so only the OK share discriminates.

**The refusal**, `rxdemo` with `DEVOURER_RX_OWN_ADDR_ONLY=1
DEVOURER_BF_ARM_BFEE=…`, on an 8812CU and an 8812BU: responder on
another address exits with the error; responder on the beamformee
address runs; the same pair without `own_addr_only` runs.

**The leaked control frames** from the #595 review (1–3 per cell on
Jaguar3 and the RTL8733B): all sat in the first ~40 events of a session,
while an ambient NDPA source ran at ~60/s for the whole unfiltered cell.
They are frames admitted during bring-up before the monitor filter is
written. Later runs had 0 or 1.

**Regression on this build:** the #595 filter cells on the 8812CU and
8733BU: `drop_ctrl` 1 and 0 control frames against 3396 and 2678;
`own_addr_only` 0 flood frames without the identity, 1545 and 1470 with
it.

`ctest` 96/96.

## Not verified

- **The 8812AU as ACK responder under `drop_ctrl`.** The cross-rig loop
did not close with both knobs off either (the transmitter retried every
frame to its limit with the responder armed), so the run says nothing
about the knob.
- The RTL8811AU, RTL8821AU and RTL8814AU: same code path as the 8812AU,
not run.
- The 8821C and the PCIe parts.
- One observation not chased: a scratch harness doing `InitWrite` then
`Init` on one Jaguar3 object, then `Stop`, logged a clean de-init and
did not exit in two of three runs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-qodo-gate Bypass the Qodo review gate (outage / maintainer decision)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants