ieee80211: correct wire encoding and receive behavior - #1189
Open
mgonzalezlopezudc wants to merge 3 commits into
Open
ieee80211: correct wire encoding and receive behavior#1189mgonzalezlopezudc wants to merge 3 commits into
mgonzalezlopezudc wants to merge 3 commits into
Conversation
Correct QoS Control bit positions and isolate non-QoS Data from the per-TID receive duplicate cache. Generate and validate OFDM SIGNAL parity and RATE, and preserve HR/DSSS and ERP PHY protocol identity. Normalize AP beacon scheduling to the advertised TU interval. Encode DSSS Current Channel using standard channel numbers and convert through the band API during discovery. Correct the mesh no-forwarding-information reason code to 62. Include focused tests and migration guidance. Validation: debug build, eight focused tests, and scoped architecture checks passed. Correct OFDM SIGNAL RATE/parity, QoS Control encoding, PHY identity and management frame bytes. Whole-TU beacon scheduling and the DSSS Current Channel element also change AP discovery and frame timing. The focused wire and beacon tests establish the corrected behavior; the 158 CI-selected configurations were compared with the parent at identical run selectors and time limits. Include 158 causally changed legacy fingerprint rows in this commit. Preserve graphical tyf expectations. The complete selected before/after results are recorded in ai-logs/executions/2026-09-11_ci-fingerprints.md.
Publish immutable band details with the existing channel index signal during initialization and channel changes. Use those observations for AP HT and DSSS advertisement without accessing the concrete transmitter. Give the receiver its own channel object to prevent shared ownership from causing a use-after-free on subsequent band changes. Cover initial and runtime notifications, missing details, HT state updates, and unavailable channels; use a valid beacon interval in the missing-channel fixture. Validation: debug build, two focused unit tests, two focused module tests, scoped architecture and NED naming checks passed. Publish AP band/channel observations during initialization and channel changes. The boundary comparison isolates the resulting advertised state and discovery behavior from the preceding wire corrections. The 158 selected legacy fingerprint rows retain the preceding commit's values.
Clear QoS Control bit 4 instead of unconditionally advertising EOSP or an empty queue. Document the modeling simplification and update byte expectations across all DS layouts, retaining decode coverage for both bit values. Document the valid interval requirement for custom Beacon and Probe Response producers and test serializer rejection of default-zero and out-of-range intervals. Validation: debug build, three focused unit tests, scoped architecture checks, and diff whitespace checks passed. Clear the unmodeled QoS Control bit 4. Only serialized packet bytes change at this boundary; the selected tplx and ~tNl trajectories remain identical. The independent QoS octet expectations cover the corrected zero bit. Include 18 causally changed legacy fingerprint rows in this commit. Preserve graphical tyf expectations. The complete selected before/after results are recorded in ai-logs/executions/2026-09-11_ci-fingerprints.md.
mgonzalezlopezudc
force-pushed
the
fix/ieee80211-wire-and-receive-correctness
branch
from
September 11, 2026 10:48
af71600 to
b0ae379
Compare
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.
What
Correct IEEE 802.11 wire byte encoding, parameter sets, parity generation and validation, PHY protocol identification, AP beacon interval normalization, standard channel advertisement, and receive duplicate handling for QoS Control, OFDM PHY, DSSS Parameter Sets, and Mesh Error codes.
Why
QoS Control bit positions:
Per IEEE Std 802.11-2024 Table 9-10, the 16-bit QoS Control field encodes TID in bits B0–B3, bit B4 as EOSP / subframe type depending on STA role, Ack Policy in bits B5–B6, and A-MSDU Present in bit B7. The serializer previously misarranged these bits. Both serialization and deserialization now match the standard wire bit mapping.
Non-QoS duplicate removal separation:
Per IEEE Std 802.11-2024 § 10.3.2.14.3 and Table 10-6, non-QoS Data (
ST_DATA) belongs to the shared/legacy duplicate cache (RC1), not the per-TID QoS Data cache (RC2). Previously, non-QoS Data aliased the QoS TID-0 duplicate cache entry, which could cause premature drop of valid non-QoS data frames following QoS data exchanges.OFDM SIGNAL parity and RATE validation:
Per IEEE Std 802.11-2024 § 17.3.4.4, bit 17 of the SIGNAL field provides even parity across bits 0–16. In accordance with §§ 17.3.4.2 and 17.3.12, all eight defined RATE codes are odd 4-bit values. The bit-level (
Ieee80211OfdmRadio) and packet-level (Ieee80211Radio) models now compute and insert the parity bit on transmission and validate parity and RATE validity on reception, marking frames with invalid parity or rates with bit errors.PHY protocol identity preservation for HR/DSSS and ERP:
ERP reuses OFDM's SIGNAL mode objects, whose factory creates a base OFDM header.
Ieee80211Radio::encapsulatenow ensures ERP transmissions retainIeee80211ErpOfdmPhyHeaderandProtocol::ieee80211ErpOfdmPhy, and orders HR/DSSS ahead of DSSS dispatch so transmissions carry their specific PHY protocol identities.AP Beacon scheduling and interval normalization:
Per IEEE Std 802.11-2024 § 9.4.1.3, Beacon Interval is a 16-bit field in Time Units (1 TU = 1024 µs), valid in the range 1 to 65535 TUs. AP beacon intervals are now normalized down to whole 1024-µs TUs during initialization for both target scheduling and frame advertisement (e.g., default
100msbecomes 97 TUs = 99.328 ms).DSSS Current Channel Parameter Set:
Per IEEE Std 802.11-2024 § 9.4.2.4 and Tables 9-62 / 9-69, Beacon and Probe Response frames advertise the DSSS Parameter Set Current Channel element for 2.4 GHz operation.
Ieee80211BeaconFrame::channelNumbernow represents the standard channel number (default-1when absent) instead of an internal channel index. The serializer reads and writes the 3-byte element.Ieee80211MgmtStaconverts standard channel numbers back to band indices during discovery and falls back to receive channel when absent.Mesh Reason Code correction:
RC_MESH_PATH_ERROR_NO_FORWARDING_INFORMATIONinIeee80211MgmtFrame.msgis corrected from 60 (which conflicted with invalid security capability) to 62 per IEEE Std 802.11-2024 Table 9-79.Release notes and migration documentation:
Documented in
WHATSNEWanddoc/src/migration-guide/index.rst.Reading Order
This pull request consists of a single self-contained commit:
715e140a63—ieee80211: correct wire encoding and receive behaviorWHATSNEWdoc/src/migration-guide/index.rstsrc/inet/linklayer/ieee80211/mac/Ieee80211MacHeaderSerializer.ccsrc/inet/linklayer/ieee80211/mac/duplicateremoval/QosDuplicateRemoval.ccsrc/inet/linklayer/ieee80211/mgmt/Ieee80211BeaconInterval.hsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtAp.ccsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtAp.nedsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtApBase.ccsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtApBase.hsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtFrame.msgsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtFrameSerializer.ccsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtSta.ccsrc/inet/physicallayer/wireless/ieee80211/bitlevel/Ieee80211OfdmRadio.ccsrc/inet/physicallayer/wireless/ieee80211/packetlevel/Ieee80211OfdmSignalField.hsrc/inet/physicallayer/wireless/ieee80211/packetlevel/Ieee80211Radio.cctests/unit/Ieee80211BeaconSchedule_1.testtests/unit/Ieee80211BeaconWire_1.testtests/unit/Ieee80211HtMgmtElements_1.testtests/unit/Ieee80211MgmtStaDiscovery_1.testtests/unit/Ieee80211OnWireBitCompliance_1.testtests/unit/Ieee80211QosDuplicateRemoval_1.testtests/unit/Ieee80211RadioWireIdentity_1.testArchitectural Surface
src/inet/linklayer/ieee80211/mac/Ieee80211MacHeaderSerializer.ccsrc/inet/linklayer/ieee80211/mac/duplicateremoval/QosDuplicateRemoval.ccsrc/inet/linklayer/ieee80211/mgmt/Ieee80211BeaconInterval.hsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtAp.ccsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtAp.nedsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtApBase.ccsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtApBase.hsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtFrameSerializer.ccsrc/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtSta.ccsrc/inet/physicallayer/wireless/ieee80211/bitlevel/Ieee80211OfdmRadio.ccsrc/inet/physicallayer/wireless/ieee80211/packetlevel/Ieee80211OfdmSignalField.hsrc/inet/physicallayer/wireless/ieee80211/packetlevel/Ieee80211Radio.ccIeee80211MacHeaderSerializer).QoSDuplicateRemoval).Ieee80211MgmtAp,Ieee80211MgmtApBase,Ieee80211MgmtSta).Ieee80211OfdmRadio,Ieee80211Radio).channelNumberinIeee80211BeaconFramerepresents standard channel number.RC_MESH_PATH_ERROR_NO_FORWARDING_INFORMATIONvalue corrected to 62.Ieee80211MgmtAp.ned:beaconIntervalparameter comment updated to clarify 1..65535 TUs range and integer TU normalization.src/inet/are unsealed (doc/project/enforcement/check-source-seals.shPASS).AV-*) or naming deviations (NV-*) introduced.Baselines
~tND), withtplxand~tNlretained.Verification Evidence
make -j$(nproc) MODE=debug: PASS (libINET_dbg.so).make -j$(nproc) MODE=release: PASS (libINET.so).doc/project/enforcement/check-commits.sh upstream/master..HEAD: PASS (1 commit, linear, valid subject/facts format, clean splits).doc/project/enforcement/check-source-seals.sh --base upstream/master: PASS (all touched files unsealed).doc/project/enforcement/check-architecture.sh src/inet/linklayer/ieee80211: PASS.doc/project/enforcement/check-architecture.sh src/inet/physicallayer/wireless/ieee80211: PASS.doc/project/enforcement/check-naming.sh --base upstream/master: PASS for changed files (0 naming candidates in changed files).doc/project/enforcement/check-interfaces.sh: PASS (no changed interfaces touched).. setenv -q && inet_run_unit_tests -m debug -f 'Ieee80211(BeaconSchedule|BeaconWire|HtMgmtElements|MgmtFrameSerializer|MgmtStaDiscovery|OnWireBitCompliance|QosDuplicateRemoval|RadioWireIdentity).*': PASS (8 passed in 1.702s).Ieee80211BeaconSchedule_1.test: PASS (0.943s)Ieee80211BeaconWire_1.test: PASS (0.698s)Ieee80211HtMgmtElements_1.test: PASS (0.672s)Ieee80211MgmtFrameSerializer_1.test: PASS (1.537s)Ieee80211MgmtStaDiscovery_1.test: PASS (0.643s)Ieee80211OnWireBitCompliance_1.test: PASS (0.621s)Ieee80211QosDuplicateRemoval_1.test: PASS (0.652s)Ieee80211RadioWireIdentity_1.test: PASS (0.726s)