Skip to content

jaguar2: a band change re-applies the coex antenna switch and RF18's 5G band bits - #612

Merged
josephnef merged 4 commits into
OpenIPC:masterfrom
snokvist:pr/band-change-antenna
Dec 2, 2026
Merged

josephnef merged 4 commits into
OpenIPC:masterfrom
snokvist:pr/band-change-antenna

Conversation

@snokvist

@snokvist snokvist commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

What this is

On the 8822B (RTL8812BU), the receive path followed the band the adapter was brought up in, not the band SetMonitorChannel tuned it to:

  • Brought up on ch 1, set to 36: master decodes nothing (0 frames in 8 s, 2 of 2 runs).
  • Brought up on 36, set to 1: the ch-1 AP's beacons read RSSI 61.6, against 75.3 after a ch-1 bring-up.

The firmware cross-band hop (FastRetune with fastretune_fw=2) has the same antenna-switch fault.

set_channel_bw, the pure tune that SetMonitorChannel uses, left two per-band writes to the bring-up:

  • the coex antenna switch: coex_wlan_only writes 0xcbc[9:8] (1 = 5G, 2 = 2.4G) once, for the bring-up band;
  • RF18's 5G band bits (16, 8): only kept from the RF18 read, which a 2.4G write had cleared.

Found in wifi-sdr and wsdr-studio, where a session started on 2.4 GHz showed a 5 GHz floor 12 dB high with a ~10 MHz hump around the centre.

What changed

  • coex_switch_antenna(is_5g): the switch half of coex_wlan_only. It records the band it set (_coex_ant_5g); coex_wlan_only calls it.
    • 8821C: the switch half of coex_wlan_only_8821c moved unchanged into coex_switch_antenna_8821c (0xcb4[29:28], RFE-dependent).
  • set_channel_bw: re-applies the switch when the central channel's band differs from the recorded one. It does this only once the bring-up granted the antenna: with skip_coex the recorded band stays -1 and nothing is written.
  • 8822B RF18 compose on 5G: writes RF18_BAND_5G (bits 16 and 8 set, bit 9 clear), as rtw88 and this HAL's 8821C path do. 2.4G is unchanged (& 0x00060cff).
  • fast_retune, firmware path: after the H2C on a band change, re-applies the switch the same way (8822B: after the existing 1 ms 0x838 wait).
  • tests/band_change_rxcheck.cpp: a one-adapter repro built by hand like width_relatch_rxcheck (BAND_CHANGE_SETTLE_S for Jaguar3's longer bring-up).
    • It brings up on one 20 MHz channel, switches with SetMonitorChannel (or FastRetune with fast), and listens 8 s.
    • It prints frames/s, 0xcbc[9:8] and RF18 A/B read back, and the beacon RSSI/SNR/EVM/CFO of the two most-heard APs.
  • src/jaguar2/CLAUDE.md: the facts, with the caveats below.

Cost: a same-band set_channel_bw or firmware hop writes nothing new; a band change adds one BB write on the 8822B (three on the 8821C). The software fast_retune refuses band changes, so it is untouched.

Verification

Frames and beacons (band_change_rxcheck)

One RTL8812BU (T4U), USB 3, 20 MHz; ambient APs on ch 1 (CCK beacons: RSSI only) and ch 36. Two to four runs per cell; master = bb801c3. Frame counts swing with the APs' traffic, so compare RSSI.

master this PR bring-up on the target
1 -> 36, SetMonitorChannel 0 frames/s, RF18 0x00c24, cbc=2 65-1777 frames/s, RF18 0x10d24, cbc=1, strong AP RSSI 57.4-60.1 / 61.3-63.1 62-1132 frames/s, RSSI 57.4-59.8 / 61.9-63.2
36 -> 1, SetMonitorChannel ch-1 AP RSSI 61.6-61.7, cbc=1 75.3-75.5, cbc=2 75.2-75.3
36 -> 1, firmware hop 61.8-61.9, cbc=1 75.1-75.3, cbc=2 75.2-75.3
1 -> 36, firmware hop RSSI 55.8-56.4 / 57.7-57.8, SNR A 48.5-51.8, cbc=2 RSSI 59.1-59.8 / 62.1-63.4, cbc=1 as above

On the firmware hop, master's RF18 already carries the 5G band bits; only the switch is wrong.

Noise floor (raw IQ)

Same adapter, fixed IGI 0x30, CCA off, 20 MHz, path A raw IQ via LA capture (wifi-sdr), 2 s per point. Floor = median over bins of the 10th-percentile PSD (DC and edges excluded), dB of 12-bit units. Each point: bring up on one channel, SetMonitorChannel to the other, settle, record, close.

bring-up -> measured master 0761c60 this PR on 0761c60 (2 rounds) this PR on bb801c3 (2 rounds)
ch 13 -> 13 69.4 69.3 / 69.7 69.6 / 69.6
ch 13 -> 116 62.8 45.1 / 45.2 44.9 / 44.9
ch 116 -> 13 62.9 69.6 / 69.7 69.5 / 69.5
ch 116 -> 116 45.1 45.2 / 45.1 45.0 / 44.9

Master repeated within 0.1 dB in a second round.

The two halves separately, using wifi-sdr's wsdr_probe bandswitch (path-A bank power, which includes the DC offset):

Bring-up After the retune Switch set for the new band Switch put back Native bring-up there
ch 13, retuned to 116 39.0 25.8 39.0 26.2
ch 116, retuned to 13 39.5 46.1 39.4 46.0
  • The switch alone did not close the gap. On the PSD floor, 13 -> 116 still sat ~5 dB under a native 116 bring-up (40.2 against 45.1).
  • A register diff (wsdr_probe bbdump) showed RF18 at 0x10c74 / 0x30c74 (A / B) against a native 0x30d74. With the band bits written, the gap closed (table above).

Path, not noise: at IGI 0x45, with an AP on ch 1, a 5 GHz bring-up retuned to ch 1 (master) read bursts 10.7 dB and the floor 12.7 dB under a 2.4 GHz bring-up.

In wsdr-studio with this fix, at 49 dB and 40 MS/s, both antennas:

  • 5580 retuned from 2412 reads the same as a bring-up on 5580 (about -55 dBFS);
  • 2412 retuned from 5580 matches a bring-up on 2412 (about -40 dBFS);
  • a 5 GHz -> 2.4 GHz -> 5 GHz map sweep returns to the same levels.

ctest: 95 tests, 0 failures (2 skipped), on this branch.

Calibration after a band change

The IQK is still the bring-up band's, and that costs something on 36 after a ch-1 bring-up. Strong AP (RSSI ~59), beacon EVM in raw phy-status units:

EVM A SNR A
bring-up on 36 -58.2 .. -58.6 (6 runs) median 60.2 (56.0-62.8)
same band: 44 -> 36, 149 -> 36 -58.3 .. -58.9 (4 runs) 57.1-65.3
1 -> 36, this PR (sw or fw path) -54.9 .. -56.0 (8 runs) median 52.3 (50.4-63.8)
1 -> 36 + IQK re-run (experiment, not in this PR) -58.5 .. -58.8 (2 runs) 58.2-64.6
  • The IQK re-run was an experiment. It ran iqk_trigger(new band) + config_trx_mode() in SetMonitorChannel on a band change and took 43-45 ms.
  • It recovered EVM/SNR, but is not safe with RX running. Into 2.4 GHz it left RX deaf (0 frames in 8 s) in 4 of 7 runs, against 0 of 5 without it; into 5 GHz it was fine in 7 of 7. So it is recorded in CLAUDE.md and not done.
  • LCK: the CFO tail matched the bring-up's (37.0 on the strong AP) in every case, sw and fw, so nothing points at the LO.

Not verified

  • The IQK gap above stays open. There is no safe re-run yet: one that pauses RX around it, or runs it only into 5 GHz, is a follow-up. Something (e.g. a sweep) that changes band often and needs EVM should bring up in the band it works in.
  • Not measured on 2.4 GHz: SNR/EVM, because the APs here send CCK beacons with no OFDM phy-status.
  • 8821C: the set_channel_bw re-apply and the firmware-hop write run on it too. Not measured; no 8811CU/8821CU here.
  • 8822C (RTL8812CU, Jaguar3) is not affected and not touched. band_change_rxcheck with BAND_CHANGE_SETTLE_S=6, 2 runs each: 36 -> 1 and 1 -> 36, via SetMonitorChannel and the firmware hop, match a bring-up on the target.
    • ch-1 AP RSSI: 62.5-62.7 against 62.4-62.6.
    • On 36, strong AP: SNR A 56.0-56.7 against 56.7-56.9; EVM -56.0 .. -59.4 against -56.9 .. -57.4.
    • No IQK gap either.
  • Scope: one adapter and one unit. 20 MHz only, except the wsdr-studio check at 40 MS/s; 5/10 MHz and 80 MHz not checked across bands.

🤖 Generated with Claude Code

https://claude.ai/code/session_011dRefzq1jjxHVRwtAWjJqL

…5G band bits

set_channel_bw (the pure tune SetMonitorChannel uses) left two per-band
writes to the bring-up: coex_wlan_only's antenna switch (8822B 0xcbc[9:8],
8821C 0xcb4[29:28]) stayed on the bring-up band, and the 8822B's RF18 5G
band bits (16, 8) were only kept from the read, which a 2.4G write had
cleared. A retune across bands then received through the other band's
path. One 8812BU (T4U, USB 3, IGI 0x30, CCA off, 20 MHz, LA capture),
floor by open band 13 / 116, measured on 13 / 116: before 69.4 / 62.8 vs
62.9 / 45.1; after 69.3-69.7 / 45.1-45.2 vs 69.6-69.7 / 45.1-45.2.

coex_switch_antenna() is the switch half of coex_wlan_only (8821C:
coex_switch_antenna_8821c, the same code moved), remembering the band it
set; set_channel_bw re-applies it on a band change, only once the bring-up
granted the antenna (skip_coex: never). RF18 on 5G now writes
RF18_BAND_5G as rtw88 and the 8821C path do.

Not covered (src/jaguar2/CLAUDE.md): IQK/LCK still from the bring-up band,
the 8821C half and the firmware cross-band hop are unmeasured.

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

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

Copy link
Copy Markdown

PR Summary by Qodo

jaguar2: re-apply coex antenna switch and RF18 5G bits on band change

🐞 Bug fix ✨ Enhancement 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Band changes via set_channel_bw now re-apply the coex antenna switch for the new band.
• The 8822B RF18 compose now writes the 5G band bits on 5G, as rtw88 does.
• Retuning across bands no longer receives through the bring-up band's front-end path; CLAUDE.md
 records the caveats.
Merge Risk 🟡 Medium

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • The changed antenna selection, RF18 composition, full channel path and firmware fast-retune path all determine one end-to-end outcome: RX/TX operation on the selected Jaguar2 channel.
  • They are implementation hops within the same radio-tuning integration, not independent capabilities.
Behavioral complexity 🟡 Medium 🧩 Interacting branches, Compatibility cases

  • Before: coex antenna state was established at bring-up and RF18 5 GHz bits were retained from readback.
  • After: retunes conditionally update state and compose variant-specific antenna/RF settings.
  • New correctness conditions: the grant lifecycle must distinguish pre-grant bring-up from active retunes, band transitions must update both software and firmware paths, and 8822B versus 8821C register semantics must remain correct without disturbing same-band tuning.
  • The added branches are not merely extracted helpers because they coordinate state across initialization, full retune and firmware offload paths.
Sources

src/jaguar2/RtlJaguar2Device.cpp[81-81]

  _hal.coex_forget();

src/jaguar2/RtlJaguar2Device.cpp[256-259]

  if (!_cfg.tuning.skip_coex)
    _hal.coex_wlan_only(channel.Channel > 14);
  else
    _logger->info("Jaguar2: coex WL grant SKIPPED (tuning.skip_coex)");
Potential damage 🟡 Medium 🩹 Temporary loss

  • If the new band-specific writes regress, the selected RF/antenna path can be mismatched or the 5 GHz synthesizer can remain in the wrong band, causing missed frames, degraded RX, or failed TX on the target channel.
  • The consequence is confined to the retuned Jaguar2 radio capability; no persistent application data or external financial effect is created.
  • Reverting the code prevents new occurrences, while a live device can generally recover by a successful retune or full bring-up; frames missed during the fault are not recovered.
  • Code rollback restores the prior behavior, and a fresh bring-up or successful subsequent channel set can restore volatile RF state.
  • Frames lost while the radio is deaf require higher-layer retransmission; no automatic repair worker was identified.
Assessed commit 80f0284
Diagram

graph TD
  A["SetMonitorChannel"] --> B["set_channel_bw"] --> C["Band differs from _coex_ant_5g?"] --> D["coex_switch_antenna"] --> E["0xcbc 8822B / 0xcb4 8821C"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Unconditional switch write on every set_channel_bw
  • ➕ No state to track (_coex_ant_5g) and no band comparison
  • ➕ Trivially correct regardless of previous band
  • ➖ Adds a BB write on every same-band tune, including ones that currently write nothing new
  • ➖ Must still respect skip_coex, so it needs a grant check anyway

Recommendation: The PR's approach is sound: it re-applies the antenna switch only on a band change, and only after the bring-up granted the antenna, so same-band tunes write nothing new. The simpler alternative, writing the switch on every set_channel_bw, is correct but adds a BB write to every tune. The recorded-band check avoids that cost and keeps the skip_coex path untouched. The software fast_retune already refuses band changes, so it needs no change.

Files changed (3) +49 / -2

Bug fix (1) +28 / -2
HalJaguar2.cppRe-apply coex antenna switch on band change; write RF18 5G band bits +28/-2

Re-apply coex antenna switch on band change; write RF18 5G band bits

• set_channel_bw calls coex_switch_antenna when the central channel's band differs from the recorded one and the antenna was granted. The 8822B RF18 compose now sets bits 16 and 8 and clears bit 9 on 5G. coex_wlan_only and coex_wlan_only_8821c route through the new switch helper.

src/jaguar2/HalJaguar2.cpp

Refactor (1) +7 / -0
HalJaguar2.hDeclare coex_switch_antenna and track the recorded coex band +7/-0

Declare coex_switch_antenna and track the recorded coex band

• Adds the coex_switch_antenna and coex_switch_antenna_8821c declarations and the _coex_ant_5g member, initialized to -1 so that no grant means no re-apply.

src/jaguar2/HalJaguar2.h

Documentation (1) +14 / -0
CLAUDE.mdDocument band-change antenna and RF18 findings with measured caveats +14/-0

Document band-change antenna and RF18 findings with measured caveats

• Adds a section on the two per-band writes that a band change needs, with the measured floors and hardware setup. It also lists what is unverified: IQK/LCK state, the 8821C half, and the firmware cross-band hop.

src/jaguar2/CLAUDE.md

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

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can hide the parts of a finding you never read, like the evidence or the agent prompt

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

snokvist and others added 3 commits November 30, 2026 22:40
…o; band_change_rxcheck

The firmware's SINGLE_CHANNELSWITCH_V2 (FastRetune, fastretune_fw=2)
retunes across bands but leaves the coex antenna switch (0xcbc[9:8]) on
the old band, as set_channel_bw did. fast_retune re-applies it after the
H2C on a band change. One 8812BU: 36 -> 1 read the ch-1 AP's beacons at
RSSI 61.8 against 75.3 after a ch-1 bring-up; with the write 75.1-75.3.

tests/band_change_rxcheck.cpp brings up on one 20 MHz channel, switches
(SetMonitorChannel, or FastRetune), and reports frames/s, the switch and
RF18 read back, and the beacon RSSI/SNR/EVM/CFO of the two most-heard
APs. With it on master, 1 -> 36 via SetMonitorChannel decoded nothing
(0 frames in 8 s, 2 of 2).

It also measured what the first commit left: after a band change the
IQK is the bring-up band's. Strong-AP beacon EVM on 36 after a ch-1
bring-up -54.9..-56.0 against -58.2..-58.6 native, while same-band
retunes read -58.3..-58.9. Re-running IQK on the band change recovers
it but left RX deaf in 4 of 7 changes into 2.4 GHz, so it is recorded
in src/jaguar2/CLAUDE.md and not done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dRefzq1jjxHVRwtAWjJqL
The 8812CU's bring-up outlasts the 2 s settle. With 6 s, the RTL8822C
(Jaguar3, a separate HAL this PR leaves alone) shows no band-change
fault: 36 -> 1 and 1 -> 36, SetMonitorChannel and the firmware hop,
match a bring-up on the target (ch-1 AP RSSI 62.5 against 62.4-62.6;
on 36 the strong AP's SNR A 56.0-56.7 against 56.7-56.9, EVM -56.0..
-59.4 against -56.9..-57.4), 2 runs each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dRefzq1jjxHVRwtAWjJqL
…s at debug

- A re-Init on the same object in another band kept _coex_ant_5g from the
  last session, so the bring-up's set_channel_bw wrote the switch before
  the coex grant and IQK. bring_up now starts with it at -1 (coex_forget).
- coex_switch_antenna_8821c runs on every band change: its log lines are
  debug; coex_wlan_only_8821c logs the grant once at info, as the 8822B
  path does.
- band_change_rxcheck switches only after the first frame (bring-up done)
  and says its register readouts are the 8822B's.
- Comments: IGI 0x45 (not "10 dB"); after a 2.4G bring-up RF18 lacks bit 8
  (and on some reads bit 16); CLAUDE.md's 13->116 range is 44.9-45.2.

Rechecked on the 8812BU: 36->1 cbc[9:8]=2, ch-1 AP RSSI 74.2 against 74.1
for a native ch-1 open; 1->36 cbc[9:8]=1, RF18 0x10d24; 36->1 FastRetune
(sw path) 74.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dRefzq1jjxHVRwtAWjJqL
snokvist added a commit to snokvist/wifi-sdr that referenced this pull request Dec 1, 2026
…f0284

- bandswitch and bbdump retune at 20 MHz: they now refuse another --bw
  instead of comparing a 40 MHz open with 20 MHz retunes.
- bandswitch's comment: the pinned devourer already re-applies the
  switch, so the command is an A/B of it. On the 8812BU with 80f0284,
  13 -> 116 at IGI 0x30: retuned 26.2, +ant 26.2, ant_back 26.3 (dB): with
  RF18's band bits right, putting the 2.4G switch back no longer moved the
  5G floor (FINDINGS' 39.0 for it was without the RF18 fix).
- devourer 80f0284 (OpenIPC/devourer#612 review fixes): bring-up forgets
  the switch's band; 8821C switch logs at debug; test and comment fixes.

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

@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.

Reproduced on a second 8812BU and checked against the vendor source. Approving; the comments are non-blocking.

Against the vendor driver (reference/rtl88x2bu):

  • The RF18 write is config_phydm_switch_band_8822b's: clear bits 16, 9, 8, then set 16 and 8 on 5G.
  • The antenna switch on a band change is ex_hal8822b_wifi_only_switchbandnotify, which calls the same hal8822b_wifi_only_switch_antenna as the bring-up.

On hardware: TP-Link Archer T3U (RTL8812BU, 2357:012d, USB high speed), band_change_rxcheck built from this branch against master bb801c3 and against this head, 20 MHz, ambient APs, two rounds per cell.

master this PR bring-up on the target
1 -> 36, SetMonitorChannel 0 frames, RF18 0x00c24, cbc=2 (2 of 2) 200-640 frames/s, RF18 0x10d24, cbc=1, RSSI 78.7-79.6 / 76.2-76.8 RSSI 77.8-79.5 / 76.3-76.7
36 -> 1, SetMonitorChannel ch-1 AP RSSI 33.8-34.7, cbc=1 46.5-47.3, cbc=2 45.1-46.6
1 -> 36, firmware hop RSSI 76.9-78.2 / 73.0-73.5, cbc=2 79.1-79.7 / 76.2-76.8, cbc=1 as above
36 -> 1, firmware hop 33.4-34.7, cbc=1 46.4-46.6, cbc=2 as above
44 -> 36 (same band) RSSI as bring-up RSSI as bring-up
  • The calibration gap shows here too, smaller than on your unit: after 1 -> 36, SNR A 56.2-58.9 against 61.6-63.2 for a ch-36 bring-up, and EVM A -46.7..-47.6 against -47.5..-47.8.
  • One thing I did not chase: on master after 36 -> 1 a second, weak ch-1 AP was heard in 62-67 of ~80 beacon slots with mean RSSI readings of 174-195, against 0-57 slots at RSSI 25-28 with this PR and after a ch-1 bring-up.

Limits: one unit, 20 MHz, beacons only, no SDR. I did not measure the 8821C half, the noise floor, or TX after a band change.

Comment thread src/jaguar2/HalJaguar2.cpp Resolved
Comment thread src/jaguar2/HalJaguar2.cpp Resolved
@josephnef
josephnef merged commit aa669e8 into OpenIPC:master Dec 2, 2026
32 checks passed
josephnef pushed a commit that referenced this pull request Dec 3, 2026
…owband tune; RF18 comment credits the vendor (#615)

## What this is

This PR addresses the two non-blocking comments from the review of #612.

1. **CCK after a 5G narrowband tune** (the comment at
`HalJaguar2.cpp:979`). On the 8822B, `set_channel_bw` writes the CCK
trio (`0x808[28]`, `0x454[7]`, `0xa80[18]`) and the CCA mask
(`0x814[15:10]`) in its 5/10 MHz branch only. A 5G 5/10 MHz tune turns
CCK off, and a later 20 MHz change to 2.4G kept it off. CCK frames and
CCK beacons were then lost. It reproduces as predicted.
2. **RF18 provenance** (the comment at `HalJaguar2.cpp:1155`). The
band-bit comment now cites `config_phydm_switch_band_8822b` in
`reference/rtl88x2bu/hal/phydm/rtl8822b/phydm_hal_api8822b.c`, not
rtw88. The paragraph on keeping the 5G bits from the read, which
described the behaviour before #612, is gone.

## What changed

- **`set_channel_bw`, 8822B, 2.4G at 20/40/80:** writes `0x808[28]` = 1,
`0x454[7]` = 0, `0x814[15:10]` = 15. These are the values a 2.4G
bring-up leaves (read back on this unit after `1 1`), so outside this
state the writes change nothing. 5G at 20/40/80 keeps the bring-up's CCK
block, as before.
- **The 2.4G narrowband branch** also resets `0x814` to 15, as the
vendor routine does. After a 5G narrowband tune it had been left at 34.
- **`tests/band_change_rxcheck.cpp`:**
- accepts `CH/5` and `CH/10` channels, and stops between `from` and `to`
(e.g. `36 36/5 1`);
- prints the CRC-good CCK frames (`data_rate` 0-3) and the CCK block
registers after the switch.
  - The existing `from to [fast]` form is unchanged.
- **`src/jaguar2/CLAUDE.md`:** the fact, with its counterparts.

**Cost:** three BB writes per 2.4G `set_channel_bw` at 20/40/80, and one
more in the 2.4G narrowband branch.

## Verification

One RTL8812BU (T4U), USB 3. On ch 1 there are two CCK-beaconing APs.
`band_change_rxcheck`, 2 runs per cell. Base: master `c7e96fe`.

| cell | master | this PR |
|---|---|---|
| `1 1` (bring-up on ch 1) | 127 / 133 CCK frames, both APs, RSSI
74.5-74.7 | 140 / 138, RSSI 74.5-74.6 |
| `36 1` | 172 / 199, RSSI 74.8-74.9 | 184 / 158, RSSI 74.8 |
| `36 36/5 1` (5 MHz tune on 36, then ch 1) | **0 / 0 CCK frames, no
beacons**; `808[28]`=0 `454[7]`=1 `814`=34 | 177 / 177, both APs, RSSI
74.7-74.8; `808[28]`=1 `454[7]`=0 `814`=15 |
| `36/5 1` (bring-up at 5 MHz on 36) | **0 / 0, no beacons** | 153 /
170, RSSI 74.8-74.9 |
| `36 36/10 1` | not run | 164 / 156, RSSI 74.9 |
| `1 36` | not run | ch-36 AP RSSI 60.9-61.0 / 64.6-64.8, `cbc`=1, RF18
0x10d24, as #612 |

**2.4G narrowband, with a 5 MHz transmitter.** An RTL8812CU ran `txdemo`
with `DEVOURER_NB_BW=5` on ch 1, at 100 frames/s:

| cell | master | this PR |
|---|---|---|
| `1/5 1/5` (bring-up) | 88-96 frames/s, `814`=15 | 91-97 frames/s,
`814`=15 |
| `36 36/5 1/5` | 90-97 frames/s, `814`=34 | 88-98 frames/s, `814`=15 |

The CCA mask change made no difference to reception here.

`ctest`: 99 of 99 pass (`build`, Linux, GCC 15).

## Against it / not verified

- **`0xa80[18]` (BB CCK check) is left alone.** A 2.4G bring-up leaves
it at 1, where `config_phydm_switch_band_8822b` writes 0, and CCK
receives with it at 1 in every cell above. Writing 0 would change the
normal 2.4G state, so this PR doesn't.
- **Not measured:**
  - 40 MHz on 2.4G;
  - reaching this state through `FastRetune` or `fast_bw`;
  - TX after it;
  - more than one unit.
- **8821C:** not affected. `set_channel_bw_8821c` writes its CCK block
at every width.

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

https://claude.ai/code/session_011dRefzq1jjxHVRwtAWjJqL

---------

Co-authored-by: Claude Opus 5.5 <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.

2 participants