Repository navigation
jaguar2: 2.4G at 20/40/80 turns the CCK block back on after a 5G narrowband tune; RF18 comment credits the vendor - #615
Conversation
…owband tune; RF18 comment credits the vendor The two non-blocking review comments on OpenIPC#612. set_channel_bw (8822B) wrote 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 narrowband tune turned CCK off, and a later 20 MHz change to 2.4G kept it off: one 8812BU, `band_change_rxcheck 36 36/5 1` and `36/5 1`, 0 CCK frames and no beacons on ch 1 (2 of 2 runs each), against 153-199 CCK frames with the fix. 2.4G at 20/40/80 now writes the values a 2.4G bring-up leaves (0x808[28] 1, 0x454[7] 0, 0x814 15); the 2.4G narrowband branch also resets 0x814 to 15, as the vendor routine does. The RF18 band-bit comment now cites config_phydm_switch_band_8822b in reference/rtl88x2bu, and the paragraph on keeping the 5G bits from the read (the behaviour before OpenIPC#612) is gone. band_change_rxcheck: CH/5 and CH/10 channels, stops between from and to, CRC-good CCK frames and the CCK block registers after the switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dRefzq1jjxHVRwtAWjJqL
PR Summary by Qodo8822B: restore 2.4G CCK block after 5G narrowband tune; fix RF18 comment
AI Description
Merge Risk
|
Code Review by Qodo
1.
|
…the CCK count before counting starts Both from the Qodo review on OpenIPC#615. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dRefzq1jjxHVRwtAWjJqL
|
Both Qodo findings were valid; both are fixed in the test tool in a937f6b:
Re-run after the change: |
josephnef
left a comment
There was a problem hiding this comment.
Approving. The fix reproduces on a second 8812BU, and the three writes are the 2.4G values of the vendor's config_phydm_switch_band_8822b.
Checked on hardware (Archer T3U, 2357:012d, USB 2, head a937f6b against master c7e96fe, the PR's band_change_rxcheck built against both libraries; two CCK-beaconing APs on ch 1; CCK frames in the 8 s after the switch):
| cell | master | this PR |
|---|---|---|
1 1 |
256 / 235 | 240 / 175 / 270 |
36 1 |
234 / 260 | 224 / 244 |
36 36/5 1 |
0 / 0, no beacons; 808[28]=0 454[7]=1 814=34 |
262 / 247; 1 / 0 / 15 |
36/5 1 |
0 / 0, no beacons | 233 / 287 |
36 36/10 1 |
0, no beacons | 271 |
AP RSSI on ch 1 is the same in every cell that receives (52.3-54.3 for the stronger AP).
Cells the description lists as not measured (one run each):
- Firmware cross-band hop (
DEVOURER_FASTRETUNE_FW=2,36 36/5 36 1 fast): 287 CCK frames on master, 261 here. The firmware writes the band block itself (808[28]=1,454[7]=0,a80[18]=0,814=15 after the hop, the same as its36 1 fastcontrol), so that path never had the fault. a80[18]= 0 (1 1/5 1, the state a 2.4G narrowband tune leaves): 252 CCK frames on master, 302 here. CCK receives with the bit at either value, which supports leaving it alone.- 5G after 2.4G (
1 36,1 1/5 36): beacon RSSI 82-84 / 74-76 and SNR 55-59 / 52-55 on both builds,cbc=1, RF18 0x10d24. No change from master.
ctest on the head: 99 of 99, with the MediaTek generator checks skipped.
Non-blocking
fast_set_bandwidth's 2.4G narrowband branch says "exactly as the full narrowband branch" and now differs from it by the0x814write. It is harmless: the fast toggle needs a full set on the same channel first, and that set now leaves 15. The comment could say so.- CI:
build (macos-latest, Release, gcc)was cancelled, not failed; the other 28 jobs are green.
Limits: one unit, one run per cell beyond the first four, RX only. I did not measure 40 MHz on 2.4G or TX after the switch either.
…write From the review on OpenIPC#615. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dRefzq1jjxHVRwtAWjJqL
|
Thanks for the second unit and the extra cells. The |
josephnef
left a comment
There was a problem hiding this comment.
Approving again at 1751f90. The push dismissed the approval at a937f6b; the delta since then is the fast_set_bandwidth comment only, so the hardware results from that review still apply and I did not re-run them.
The comment is right: a fast toggle needs the cache a full set_channel_bw primes, and a full set on 2.4G now leaves 0x814[15:10] at 15 at every width.
Non-blocking
- The comment ends with
#615. Code comments here carry no PR or issue numbers; git has the provenance. - The clause on the firmware cross-band hop is true but does not bear on this branch: the firmware hop sets
_fbw_cache_valid = false, so the fast toggle is declined until the next full set.
CI: 28 jobs green. build (macos-latest, Release, clang) was cancelled because no hosted runner picked it up; I have re-run it. It passed at a937f6b.
What this is
This PR addresses the two non-blocking comments from the review of #612.
HalJaguar2.cpp:979). On the 8822B,set_channel_bwwrites 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.HalJaguar2.cpp:1155). The band-bit comment now citesconfig_phydm_switch_band_8822binreference/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 jaguar2: a band change re-applies the coex antenna switch and RF18's 5G band bits #612, is gone.What changed
set_channel_bw, 8822B, 2.4G at 20/40/80: writes0x808[28]= 1,0x454[7]= 0,0x814[15:10]= 15. These are the values a 2.4G bring-up leaves (read back on this unit after1 1), so outside this state the writes change nothing. 5G at 20/40/80 keeps the bring-up's CCK block, as before.0x814to 15, as the vendor routine does. After a 5G narrowband tune it had been left at 34.tests/band_change_rxcheck.cpp:CH/5andCH/10channels, and stops betweenfromandto(e.g.36 36/5 1);data_rate0-3) and the CCK block registers after the switch.from to [fast]form is unchanged.src/jaguar2/CLAUDE.md: the fact, with its counterparts.Cost: three BB writes per 2.4G
set_channel_bwat 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: masterc7e96fe.1 1(bring-up on ch 1)36 136 36/5 1(5 MHz tune on 36, then ch 1)808[28]=0454[7]=1814=34808[28]=1454[7]=0814=1536/5 1(bring-up at 5 MHz on 36)36 36/10 11 36cbc=1, RF18 0x10d24, as #6122.4G narrowband, with a 5 MHz transmitter. An RTL8812CU ran
txdemowithDEVOURER_NB_BW=5on ch 1, at 100 frames/s:1/5 1/5(bring-up)814=15814=1536 36/5 1/5814=34814=15The 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, whereconfig_phydm_switch_band_8822bwrites 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.FastRetuneorfast_bw;set_channel_bw_8821cwrites its CCK block at every width.🤖 Generated with Claude Code
https://claude.ai/code/session_011dRefzq1jjxHVRwtAWjJqL