Skip to content

Jaguar3 TX beamforming apply — closed-loop steering (experimental, self-gating)#204

Open
josephnef wants to merge 1 commit into
masterfrom
txbf-apply
Open

Jaguar3 TX beamforming apply — closed-loop steering (experimental, self-gating)#204
josephnef wants to merge 1 commit into
masterfrom
txbf-apply

Conversation

@josephnef

Copy link
Copy Markdown
Collaborator

Completes the TX-beamforming-in-monitor-mode loop for Jaguar3 — the exact remaining work from #203 (rate-split + CBR-gating + beamformer-entry config). Closes #203.

What

The WMAC builds the steering V matrix from the peer's Compressed Beamforming Report autonomously (no software linear algebra — rtl8822c_bf_monitor.c); devourer only configures the entry and flips the apply toggle.

  • bf::arm_beamformer_entry — the beamformer-entry regs arm_sounder doesn't write: BFMER0_INFO (0x06E4), TX_CSI_RPT_PARAM dims (0x06F4), BBPSF_CTRL (0x06DC), CSI_RRSR (0x1678). Byte-faithful vendor port.
  • bf::apply_vmatrix — the toggle: TXBF_CTRL 0x042C[11:9] per BW + DIS_NDP_BFEN.
  • DEVOURER_TX_NDPA=N — periodic NDPA (N>1 = every Nth frame; 1 = every frame, unchanged). Measured to scale cleanly (period 1/8/64 → 16363/6556/831 CBRs). Periodic NDPA frames forced to VHT-2SS (a 1SS NDP yields no CBR — measured); interleaved data keeps its 1SS/HT rate (what gets steered).
  • DEVOURER_BF_TXBF=<peer_mac> — configure the entry at InitWrite, enable the apply toggle from the RX loop only after ingesting a CBR from the peer. A blind apply with no V degrades the link (measured −7 dB), so this is the load-bearing gate. Off by default, self-gating (inert until a real CBR arrives).

Validation status — honest

Piece Status
Vendor register recipe (incl. 8822E RF-table) ✅ byte-exact
Sounding / beamformee / RF-mode / CBR capture ✅ validated (50k reports/20s)
Periodic NDPA + VHT2SS rate-split ✅ on-air (CBR scaling)
Apply toggle affects TX ✅ measured
End-to-end steering GAIN not measured on this bench

The end-to-end gain A/B could not be produced on the available bench: the beamformer never ingested a CBR in the closed-loop config — dominated by USB contention (both Jaguar3 adapters on one bus), flaky multi-chip init, and the 8822E TX+RX RX-desense (0x41e8). This is a bench limitation, not a code defect — reproducing the gain needs two Jaguar3 chips on separate USB controllers running concurrently.

Shipped as an experimental, off-by-default, self-gating knob: inert without a captured CBR (so it can't degrade a link like the blind version), with tests/txbf_apply_onair.sh as the A/B harness for a suitable bench. Default behavior byte-identical (both envs unset). Full build + ctest (10/10) green.

🤖 Generated with Claude Code

…lf-gating)

Completes the TX-beamforming-in-monitor-mode loop on Jaguar3 (the #203
follow-through): after devourer sounds a peer, steer injected TX toward it via
the hardware-built V matrix for a free link-budget gain (no PA power). The WMAC
builds V from the peer's Compressed Beamforming Report autonomously — software
only configures the entry and flips the apply toggle (no linear algebra).

- src/BeamformingSounder.h: bf::arm_beamformer_entry (the beamformer-entry regs
  arm_sounder doesn't write — BFMER0_INFO, TX_CSI_RPT_PARAM dims, BBPSF_CTRL,
  CSI_RRSR) + bf::apply_vmatrix (TXBF_CTRL[11:9] per BW + DIS_NDP_BFEN). Ported
  byte-faithfully from reference/rtl88x2cu/hal/rtl8822c/rtl8822c_bf_monitor.c.
- DEVOURER_TX_NDPA=N: periodic NDPA (N>1 = every Nth frame; 1 = every frame,
  the original self-sounding capture, unchanged). Periodic sounding measured to
  scale cleanly (period 1/8/64 -> 16363/6556/831 CBRs). Periodic NDPA frames are
  forced to VHT-2SS (a 1SS NDP yields no CBR — measured) while the interleaved
  data keeps its 1SS/HT radiotap rate (what gets steered).
- DEVOURER_BF_TXBF=<peer_mac>: configure the beamformer entry at InitWrite, then
  enable the apply toggle from the RX loop ONLY after ingesting a CBR from the
  peer (a blind apply with no V degrades the link — measured -7 dB). Self-gating
  and off by default: inert until a genuine peer CBR arrives.

VALIDATION STATUS (honest): the register recipe is byte-exact to the vendor
(incl. the 8822E RF-table), the sub-components are individually validated
(sounding, beamformee, RF-mode, CBR capture — 50k reports/20s), periodic NDPA +
rate-split are validated on-air, and the apply toggle demonstrably affects TX.
The end-to-end steering GAIN is NOT yet measured: on the available bench the
beamformer never ingested a CBR in the closed-loop config — dominated by USB
contention (both Jaguar3 adapters on one bus), flaky multi-chip init, and the
8822E TX+RX RX-desense (0x41e8) — so a positive RSSI A/B could not be produced
here. Shipped as an experimental, off-by-default, self-gating knob (inert
without a captured CBR, so safe); tests/txbf_apply_onair.sh is the A/B harness
for a bench that can run two Jaguar3 chips concurrently without contention.

Default behavior unchanged (DEVOURER_TX_NDPA unset + DEVOURER_BF_TXBF unset =
byte-identical). Full build + ctest (10/10) green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TX beamforming apply (monitor mode, Jaguar3): mechanism wired + steers TX, but closed-loop gain needs rate-split + CBR-gating

1 participant