Jaguar3 RX: parse jgr3 phy-status (#152) + fix 8822e 2.4 GHz RXBB#175
Merged
Conversation
Two related Jaguar3 RX-correctness fixes, found together while validating per-frame signal metrics on hardware. ## phy-status parse (#152) The Jaguar3 RX path decoded rate/CRC but never parsed the PHY-status trailer, so RxAtrib.rssi/snr/evm stayed 0 on 8812CU/8822CU/8812EU/8822EU (Jaguar1 and Jaguar2 already surface these). monitor_rx_cfg already enabled APP_PHYSTS + RX_DRVINFO_SZ=4 and parse_rx_8822c already skipped the 32-byte drvinfo — nothing decoded it. 8822C/8822E use the phydm "jgr3" phy-status format (types 0-6, matching the issue's "Type 0/1/2/3"). Verified against reference/rtl88x2{c,e}u hal/phydm/phydm_phystatus.{h,c}: jgr3 type1's byte layout is identical to jgr2 type1 for the surfaced fields (per-path pwdb[4] at 1..4, l/ht_rxsc at 5, flags at 7, s(8,1) rxevm[4] at 16..19, rxsnr[4] at 24..27), with vendor conversions pwdb-110 / snr>>1. Added parse_phy_sts_jgr3 (dispatches on page_num: CCK type0 vs OFDM type1) and call it in the RX loop, gated on !C2H && drvinfo_size>=28 — mirroring the Jaguar2 call site. Stores raw phy-status bytes, matching the Jaguar1/Jaguar2 convention. Hardware-validated on 8822CU (ch6, 8812AU MCS1 beacon): 71 canonical-SA hits with plausible metrics (rate=13, rssi=73,57, snr=43,25, evm=-43,-128). ## 8822e 2.4 GHz RXBB fix Found while validating the EU: devourer's 8822e 20 MHz path set the RX baseband bandwidth via RF 0x3f=0x18 — an 8822c-ONLY register — and left RF 0x1a UNSET (it was only written in the 40/80 branch). On the 8822e the RXBB/TXBB bandwidth lives in RF 0x1a[14:10] (config_phydm_switch_bandwidth_8822e: rf_reg1a &= ~0x7c00; 20M |= BIT11|BIT10). Kernel 2G ground truth (reference OpenHD rtl88x2eu driver, /proc read_reg): RF 0x1a=0xc00, RF 0x3f=0x2. Set RF 0x1a for every bandwidth and drop the bogus RF 0x3f. 5 GHz RX verified no-regression. Also ported the EU's missing 2G config the shared 8822c path skipped for the 8822e, register-verified against the kernel: 2G AGC-table selection (phydm_set_agc_table_8822e indices — 0x18ac now 0x8200, matching the kernel exactly), force-update-anapar (phydm_rstb_3wire_8822e, the #138 mechanism the BB-direct-window RF writes need), and CCK-RxIQ (identical across variants). CU path is byte-identical. NB: on-air 2.4 GHz RX could not be demonstrated end-to-end — the specific 8822EU bench unit's 2.4 GHz receiver is hardware-dead (the reference kernel driver is equally deaf on 2.4 GHz while both work on 5 GHz). The 8822e changes are register-validated against the working kernel driver. Adds tests/validate_jaguar3_physts.sh (CU+EU phy-status on-air) and tests/eu_kernel_2g_groundtruth.sh (kernel-driver 2.4 GHz hardware ruling). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #152.
Two related Jaguar3 RX-correctness fixes, found together while validating per-frame signal metrics on hardware.
1. phy-status parse (#152)
The Jaguar3 RX path decoded rate/CRC but never parsed the PHY-status trailer, so
RxAtrib.rssi/snr/evmstayed 0 on 8812CU/8822CU/8812EU/8822EU — while Jaguar1 and Jaguar2 already surface these.monitor_rx_cfgalready enabledAPP_PHYSTS+RX_DRVINFO_SZ=4, andparse_rx_8822calready skipped the 32-byte drvinfo; nothing decoded it.8822C/8822E use the phydm jgr3 phy-status format (types 0-6 — matching the issue's "Type 0/1/2/3"). Verified against
reference/rtl88x2{c,e}u/hal/phydm/phydm_phystatus.{h,c}that jgr3 type1's byte layout is identical to jgr2 type1 for the surfaced fields (per-pathpwdb[4]@1-4,l/ht_rxsc@5, flags@7,s(8,1) rxevm[4]@16-19,rxsnr[4]@24-27), with vendor conversionspwdb-110/snr>>1. Addedparse_phy_sts_jgr3(dispatches onpage_num: CCK type0 vs OFDM type1), called in the RX loop gated on!C2H && drvinfo_size>=28— mirroring the Jaguar2 call site. Stores raw phy-status bytes (Jaguar1/Jaguar2 convention).Hardware-validated on 8822CU (ch6, 8812AU MCS1 beacon): 71 canonical-SA hits with plausible metrics —
rate=13, rssi=73,57, snr=43,25, evm=-43,-128(the-128is the 1SS no-second-stream sentinel).2. 8822e 2.4 GHz RXBB fix
Found while validating the EU: devourer's 8822e 20 MHz path set the RX baseband bandwidth via RF
0x3f=0x18— an 8822c-only register — and left RF0x1aunset (only written in the 40/80 branch). On the 8822e the RXBB/TXBB bandwidth lives in RF0x1a[14:10](config_phydm_switch_bandwidth_8822e:rf_reg1a &= ~0x7c00; 20M |= BIT11|BIT10). Kernel 2G ground truth (reference OpenHDrtl88x2eudriver via/proc .../read_reg): RF0x1a=0xc00, RF0x3f=0x2. Fixed to set RF0x1afor every bandwidth and drop the bogus RF0x3f. 5 GHz RX verified no-regression.Also ported the EU's missing 2G config that the shared 8822c path skipped for the 8822e, register-verified against the kernel: 2G AGC-table selection (
phydm_set_agc_table_8822eindices —0x18acnow0x8200, matching the kernel exactly), force-update-anapar (phydm_rstb_3wire_8822e, the #138 mechanism the BB-direct-window RF writes need), and CCK-RxIQ (identical across variants). The CU (8822c) path is byte-identical.Tests
tests/validate_jaguar3_physts.sh— CU+EU phy-status on-air validation (8812AU beacon → Jaguar3 RX, asserts non-zero rssi/snr).tests/eu_kernel_2g_groundtruth.sh— loads the reference kernel driver to rule 2.4 GHz RX hardware in/out.Build clean across the tree;
ctest100%.🤖 Generated with Claude Code