Skip to content

Commit 70e95fc

Browse files
snokvistclaude
andcommitted
rtl8733b: drop the dead _tssi_cck member, fix the doc drift
Review follow-ups on #396, all doc/consistency — no behavioural change. - `_tssi_cck` went write-only when `select_tssi_rate_table` was deleted: set in `configure_tx_power`, cleared in `Stop()`, read nowhere. Deleted rather than kept for a reader that does not exist. - The table-selection comment claimed vendor-equivalent keying without saying the canonical flow reaches it with no mode configured — txdemo calls `InitWrite` before `SetTxMode`, so `_tx_mode_default` is usually unset and a `DEVOURER_TX_RATE=1M` session loads the OFDM/HT table. Left as is (the two tables are the same bits below +18 and the part plateaus at +8), but the comment now says so instead of implying parity. - Root `CLAUDE.md` and `src/rtl8733b/CLAUDE.md` still placed the `disable_cca` warning at `InitWrite` after this PR moved it to `bring_up_to_phy`. - `docs/rtl8733b.md` narrated two runs in terms of per-frame TSSI table switching, a path this PR deletes and which cannot be reproduced on this tree. The rate-coverage and thermal evidence stays; the mechanism framing goes, with the tables' identity at those deltas stated instead. 53/53, RTL8733B-only ASan+UBSan 49/49. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent ba15a5d commit 70e95fc

5 files changed

Lines changed: 25 additions & 15 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ Behavioural traps the per-field docs can't carry:
334334
been located and measured there, so `SetCcaMode(true)` throws (loudly, but
335335
without tearing the session down) while `SetCcaMode(false)`, the state its
336336
MAC bring-up already leaves programmed, succeeds as a no-op; setting the
337-
config knob warns at `InitWrite` and airs with carrier-sense. Does NOT apply
337+
config knob warns once at bring-up (RX-only sessions included) and airs
338+
with carrier-sense. Does NOT apply
338339
the vendor BB CCA-off writes (they deafen the RX). RX-decode side is a
339340
separate null (`tests/dis_cca_onair.sh`).
340341

docs/rtl8733b.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ rather than in modulation. Treat the whole HT column as one flat band around
9494
90-100% until something moves it by more than the probe noise.
9595

9696
A mixed run alternating all eight rates (1/2/5.5/11 Mbps CCK, 6 Mbps OFDM,
97-
MCS0/4/7) submitted 250 frames through a CCK/OFDM TSSI table switch on every
98-
frame. The witness decoded all eight `rate_hw` values on air with valid FCS,
99-
every frame at 20 MHz with STBC and LDPC clear, matching the forced-BCC
97+
MCS0/4/7) submitted 250 frames, crossing the CCK/OFDM rate-class boundary on
98+
every frame. The witness decoded all eight `rate_hw` values on air with valid
99+
FCS, every frame at 20 MHz with STBC and LDPC clear, matching the forced-BCC
100100
contract.
101101

102102
RX aggregation is capped at 12 KiB (`rtl8733b::kRxAggregateBytes8733b`) because
@@ -120,10 +120,12 @@ the meter is a PA-bias tracking index rather than a calibrated junction
120120
temperature, so it is not sound input for a TX gate
121121
(`docs/warm-tx-degradation.md`). During the mixed CCK/OFDM witness run the raw
122122
code stayed at 32–33 against baseline 32 across 650 submitted frames; 636 were
123-
captured with valid FCS across all five requested rates. A separate
124-
transition-churn run submitted 1,000/1,000 frames through 118 CCK/OFDM TSSI
125-
table changes; the witness captured 660 canonical frames across both rates,
126-
all with valid FCS, while the same 32–33 thermal range held.
123+
captured with valid FCS across all five requested rates. A separate 1,000-frame
124+
run alternating CCK and OFDM submitted 1,000/1,000; the witness captured 660
125+
canonical frames across both rates, all with valid FCS, while the same 32–33
126+
thermal range held. Both runs are rate-coverage and thermal evidence only —
127+
neither says anything about TX-power tracking, and at these deltas (+0 to +1)
128+
the two thermal-compensation curves are the same bits anyway.
127129

128130
## TX power control
129131

src/rtl8733b/CLAUDE.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,11 @@ loudly — without tearing the session down, since an unported optional knob is
138138
not a hardware-safety event — while `false` succeeds as a no-op because that is
139139
the state MAC bring-up already leaves programmed.
140140

141-
`DeviceConfig::tuning::disable_cca` cannot be honoured either, and `InitWrite`
141+
`DeviceConfig::tuning::disable_cca` cannot be honoured either, and bring-up
142142
warns rather than dropping it — a config knob must not be the one door where a
143-
request the setter refuses loudly instead vanishes without a word.
143+
request the setter refuses loudly instead vanishes without a word. The warning
144+
sits in `bring_up_to_phy`, not `InitWrite`, so an RX-only session that set the
145+
knob is told too, and so it fires exactly once per bring-up.
144146

145147
## Validation status
146148

src/rtl8733b/Rtl8733bDevice.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ void Rtl8733bDevice::InitWrite(SelectedChannel channel) {
150150

151151
bool Rtl8733bDevice::configure_tx_power(SelectedChannel channel) {
152152
_tssi_tracking = false;
153-
_tssi_cck = false;
154153
/* Closed-loop TSSI is the TX-power control on a TSSI-offset PG unit, so it
155154
* is not optional there: the flat fallback index below is a conservative
156155
* bring-up value, and on-air it runs cold enough that HT rates do not
@@ -171,7 +170,16 @@ bool Rtl8733bDevice::configure_tx_power(SelectedChannel channel) {
171170
* 0..+17 and first differ at +18, while a five-minute max-duty MCS7 soak
172171
* plateaued at +8 after two minutes and stopped climbing. It is set from the
173172
* rate class anyway because that costs nothing and is what the vendor does —
174-
* but do not expect it to be measurable. */
173+
* but do not expect it to be measurable.
174+
*
175+
* Which is just as well, because this is weaker than the vendor's keying in
176+
* the canonical demo flow: txdemo calls InitWrite before SetTxMode, so
177+
* _tx_mode_default is usually unset here and the OFDM/HT table is what a
178+
* DEVOURER_TX_RATE=1M session loads — the CCK branch is reached only by a
179+
* caller that configures the mode first, or by a later SetMonitorChannel.
180+
* The vendor keys on the rate in flight at setup instead. Nothing chases
181+
* that gap, because closing it would buy a table identical to the one
182+
* already loaded at every delta this part reaches. */
175183
const bool cck_table = _tx_mode_default.has_value() &&
176184
_tx_mode_default->mode ==
177185
devourer::TxMode::Mode::Legacy &&
@@ -184,7 +192,6 @@ bool Rtl8733bDevice::configure_tx_power(SelectedChannel channel) {
184192
channel, _efuse, rtl8733b::kSafeTssiTargetQdbm8733b))
185193
return false;
186194
_tssi_tracking = true;
187-
_tssi_cck = cck_table;
188195
return true;
189196
}
190197

@@ -591,7 +598,6 @@ void Rtl8733bDevice::Stop() {
591598
}
592599
_tssi_tracking = false;
593600
}
594-
_tssi_cck = false;
595601
_phy_ready = false;
596602
if (_mac_ready) {
597603
_mac.stop();

src/rtl8733b/Rtl8733bDevice.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ class Rtl8733bDevice : public IRtlDevice {
6969
bool _phy_ready = false;
7070
bool _tx_ready = false;
7171
bool _tssi_tracking = false;
72-
bool _tssi_cck = false;
7372
std::atomic<bool> _rx_stop{false};
7473
std::atomic<bool> _rx_active{false};
7574
std::atomic<uint8_t> _rx_configured_bw{0};

0 commit comments

Comments
 (0)