Repository navigation
IEEE 802.11: receive HT aggregates with implicit Block Ack - #1425
Draft
mgonzalezlopezudc wants to merge 19 commits into
Draft
mgonzalezlopezudc wants to merge 19 commits into
mgonzalezlopezudc wants to merge 19 commits into
Conversation
Before this commit, the branch has no plan for HT aggregate reception or implicit Block Ack integration. After this commit, the plans define separate PHY and MAC duties, staged changes, required evidence, and acceptance limits. Both plans use the integrated master base. Their first stages define wire representation, bounded member ranges, and cached PHY outcomes. MAC acceptance remains separate. This commit changes no runtime behavior. Plan: plan/pending/ieee80211-ampdu-phy-reception.md Change: plan | behavior.add | - | ieee80211-ampdu-phy-reception
Before this commit, a VHT signal mode creates an HT header. The transmission has the wrong typed header and can enter later HT validation without an HT MCS. After this commit, the VHT signal mode creates the existing VHT header. Its selected length remains unchanged. This prerequisite adds no VHT serializer or aggregate profile. WifiVhtHeaderIdentity.test sends an ordinary PSDU through the production radio and checks the header at transmission start. On the parent, the factory supplies an HT object, so the assertion that requires Ieee80211VhtPhyHeader fails. With this commit, the factory supplies a VHT object. The VHT assertion succeeds, the HT exclusion succeeds, and the header length matches the selected mode. The driver then emits its required completion event. Both guard intervals use these assertions. Protocol verification: tests/protocol/wifi/vht-header-identity.md Protocol comparison: tests/protocol/wifi/vht-header-identity-comparison.md Plan: plan/pending/ieee80211-ampdu-phy-reception.md Change: src.ieee80211 | behavior.change.fix | test whatsnew | ieee80211-ampdu-phy-reception
Before this commit, the shared loop stops at an invalid delimiter. In a three-member aggregate, the middle delimiter declares 2000 octets where only 124 remain. The deaggregator returns the first member but loses the later complete member. After this commit, the same loop examines delimiter candidates at four-octet intervals. Explicit byte reinterpretation permits the search to cross typed MAC headers. A later valid delimiter supplies the final complete MPDU without an intermediate layout. WifiMpduDeaggregation.test from this commit requires two outputs for the malformed input: the first and final complete members. On the immediate parent, the bounds check stops extraction after the first member. The two-member count assertion therefore fails. With this commit, the search finds the final delimiter and extracts its twenty-octet member. The count, length, and byte-content assertions succeed, so the driver emits its required completion event. Complete input still returns all three members. The fixture applies these assertions to typed chunks and reconstructed bytes. The unit fixture also compares callback order and offsets across both representations. Extraction alone grants no MAC acceptance. Protocol verification: tests/protocol/wifi/mpdu-deaggregation.md Protocol comparison: tests/protocol/wifi/mpdu-deaggregation-comparison.md Plan: plan/pending/ieee80211-ampdu-phy-reception.md Change: src.ieee80211 | behavior.change.fix | test whatsnew | ieee80211-ampdu-phy-reception
Before this commit, HT header conversion supplies no HT-SIG bytes. A singleton aggregate cannot retain its aggregate identity through byte conversion. The preceding VHT prerequisite already supplies the correct VHT header type. After this commit, the radio assigns HT-SIG fields and CRC from the selected mode and aggregate identity. The serializer preserves all 48 bits. Validation rejects invalid CRC, unsupported fields, and insufficient content before length-based trailer removal. Ordinary valid HT duration inputs remain unchanged. WifiHtAmpduWire.test sends a 104-octet singleton through the production radio. It requires the independent HT-SIG vector 00 68 00 0F B4 01. On the parent, the HT serializer writes zero bits for a 48-bit header. The serialization-length check fails before the expected-byte assertion can succeed. With this commit, serialization produces those six octets. Independent decode also satisfies the Length, Aggregation, MCS, guard-interval, and CRC assertions. Typed and raw-byte transmission use the same checks. The fixture reads new fields through descriptors, so it can compile with the parent's header API. MAC aggregate acceptance remains outside this commit. Protocol verification: tests/protocol/wifi/ampdu-ht-sig-wire.md Protocol comparison: tests/protocol/wifi/ampdu-ht-sig-wire-comparison.md Plan: plan/pending/ieee80211-ampdu-phy-reception.md Change: src.ieee80211 | behavior.add | test whatsnew migration | ieee80211-ampdu-phy-reception
Before this commit, the public error-model interface offers whole-packet corruption only after a failed reception decision. The common corruption function repeats its samples until some error occurs. That contract cannot represent one unconditional DATA result with correct and incorrect chunks. After this commit, computeReceivedData() samples each existing DATA chunk once. It returns content of the same length and bytes. Failed chunks receive local incorrect flags; transmitted chunks remain unchanged. An entirely correct result needs no retry. The common probability calculation uses DATA BER. Models can override that calculation with their existing PHY functions. Zero and unit probabilities consume no random number. Invalid probabilities cause a runtime error. DataChunkCorruption_1.test checks correct content, local errors, unchanged bytes, duplication, extraction, and invalid probabilities without a MAC format. The receiver integration follows in the next commit. Existing whole-packet callers retain their current path. Plan: plan/pending/ieee80211-ampdu-phy-reception.md Change: src.physicallayer | behavior.add | test whatsnew | ieee80211-ampdu-phy-reception
Before this commit, the receiver samples an HT aggregate as one packet. It cannot preserve an incorrect payload chunk beside correct content. Rx can inspect that container as a standalone MAC frame and request an invalid header. After this commit, the receiver validates HT-SIG and PSDU bounds before DATA corruption. The IEEE 802.11 error-model base supplies chunk probabilities through its existing DATA calculation. The common error-model operation samples each chunk once without delimiter or MPDU knowledge. The DATA decision retains the received chunks. WHOLE and result queries reuse them. Failed chunks retain local incorrect flags without a change to the transmitted content. For three typed members with an incorrect middle payload, the received packet retains that error beside correct first and final members. Byte conversion removes those boundaries, so raw input has one DATA outcome. The protocol fixture checks both cases at the production Rx drop. A later CTS must still set its 50-microsecond NAV. On the parent, the required indication is absent and the fixture fails at the drop. Fresh parent execution remains separate from final-HEAD verification. Rx rejects aggregate containers before standalone checks. The indication retains header and content facts; chunk flags retain errors. Aggregate error-rate estimates remain unknown with a present model. Ordinary reception keeps its current path. Member acceptance and implicit Block Ack remain separate work. Protocol verification: tests/protocol/wifi/ampdu-partial-reception.md Protocol comparison: tests/protocol/wifi/ampdu-partial-reception-comparison.md Plan: plan/pending/ieee80211-ampdu-phy-reception.md Change: src.ieee80211 | behavior.add+change | test whatsnew migration | ieee80211-ampdu-phy-reception
Before this commit, deterministic fixtures fix selected chunk failures but do not compare production model probabilities and random draws. A receiver could repeat DATA samples without those fixtures detecting every difference. After this commit, the receiver fixture compares NIST and Yans chunk probabilities with their existing DATA calculations. Fixed seeds verify the sampled chunk flags, retained packet content, cache reuse, and the next random value. Scalar and dimensional radios cover both guard intervals and both reception-part modes. Each existing chunk receives one outcome, including padding. For an intermediate probability, the reference generator consumes one draw per chunk. Repeated PREAMBLE, HEADER, DATA, WHOLE, and result queries must preserve the recorded flags and draw count. Header failure and insufficient content must prevent DATA draws. A generic BER model needs no aggregation role for initialization. The fixture also checks pure PHY calculations across 64 HT20 modes, six lengths, and seven SNIR values. Production code and stored fingerprint expectations remain unchanged. Plan: plan/pending/ieee80211-ampdu-phy-reception.md Change: tests | behavior.add | - | ieee80211-ampdu-phy-reception
Before this commit, ordinary reception controls lack a fixture that compiles unchanged on the pinned parent and the feature branch. The earlier receiver fixture cannot provide that independent compatibility comparison. After this commit, one fixture records ordinary reception with identical inputs on both revisions. NIST, Yans, absent-model, and non-HT custom controls cover three noise levels and seeds 0, 1, and 2. The campaign uses scalar and dimensional radios with whole and separate signal parts. Each record includes outcomes, duration, metadata, draw counts, and subsequent random values. For example, a failed ordinary reception must retain the same metadata and next random value as its parent control. The migration guide states the independent-range abstraction and its limits. MAC aggregate receipt and implicit Block Ack remain pending. BerTable retains its documented parent crash, which supplies no successful reception evidence. The additional fixture and records change no production contract or stored expectation. Execution results belong in the PR description and execution record. Plan: plan/pending/ieee80211-ampdu-phy-reception.md Change: tests | behavior.add | - | ieee80211-ampdu-phy-reception
Before this commit, the plans describe aggregate-specific probability roles and separate range outcomes. They also describe bounded deaggregation as a prerequisite in the same visible PR. These descriptions obscure the responsibilities of the PHY error model and the MAC parser. After this commit, the plans assign chunk corruption to the common PHY interface. The receiver caches the received chunks. Error models use PHY conditions and bit lengths without MAC format knowledge. MAC extraction retains delimiter parsing and member validation. Raw byte input has one DATA outcome because byte conversion removes its original chunk boundaries. The plans also separate the deaggregation prerequisite from recovery and partial PHY reception. Master supplies bounded extraction. The dependent work adds delimiter recovery and cached chunk errors. Member acceptance and implicit Block Ack remain separate future work. Expected results and retained historical evidence remain distinct. Plan: plan/pending/ieee80211-ampdu-phy-reception.md Change: plan | behavior.change | - | ieee80211-ampdu-phy-reception
Before this commit, valid sequence arithmetic can produce an intermediate value of minus one. The shared helper rejects that value, so 0 - 1 fails instead of returning sequence 4095. After this commit, the helper reduces every valid intermediate modulo 4096. Constructors and arithmetic operators still reject an unspecified source. The unit fixture checks every sequence value with positive and negative offsets. Aggregate reorder advancement needs this correction at sequence wrap. Plan: plan/pending/ieee80211-ampdu-implicit-blockack.md Change: src.ieee80211 | behavior.change.fix | test | ieee80211-implicit-blockack
Before this commit, negotiated HT state lacks the receiver's minimum MPDU start spacing. An aggregate builder therefore cannot apply that receiver limit. After this commit, full and simplified management preserve the encoded spacing in each negotiated direction. The MIB exposes the local receiver setting. The transmitter can obtain the peer receiver's limit before aggregate construction. Capability fixtures check asymmetric limits, encoding, initialization, and reset. Plan: plan/pending/ieee80211-ampdu-implicit-blockack.md Change: src.ieee80211 | behavior.add | test whatsnew migration | ieee80211-implicit-blockack
Before this commit, aggregate construction cannot preview spacing at the selected DATA mode while it preserves the source MPDUs. It also lacks the complete HT duration admission calculation. After this commit, the builder borrows source references and copies their data and region tags. Alignment padding and zero-length delimiters satisfy negotiated spacing. Construction checks the receiver byte limit, PPDU duration, and L-SIG length. Singleton aggregates retain their delimiter. Construction tests use the existing chunk walker without an intermediate layout. The wire, traversal, and construction fixtures check serialization, spacing boundaries, source ownership, and malformed input. These operations prepare the later exchange without enabling the default MPDU policy. Plan: plan/pending/ieee80211-ampdu-implicit-blockack.md Change: src.ieee80211 | behavior.add+change | test whatsnew migration | ieee80211-implicit-blockack
Before this commit, Rx excludes a decoded aggregate from standalone FCS checks. A failed common header can lack that decoded property, so its container can reach an unsafe MAC peek. After this commit, Rx also checks common-header success and complete content before standalone parsing. The boundary fixture supplies malformed containers and proves refusal before the FCS predicate. Correct standalone reception retains its existing path. Plan: plan/pending/ieee80211-ampdu-implicit-blockack.md Change: src.ieee80211 | behavior.change.fix | test | ieee80211-implicit-blockack
Before this commit, the QoS service can prepare one DATA transmission but cannot retain independent previews beside canonical retry members. An aggregate selection must preserve sources until actual submission. After this commit, the HT policy selects borrowed members under supplied peer, window, mode, spacing, and length limits. The service gives each queued member an independent preview. Batch commitment validates every source before extraction. Canonical members retain their sequence numbers and deadlines. Forwarded previews use the local transmitter address without changing queued headers or ordinary A-MSDU construction. HCF rejects aggregate opt-in with a rate-control submodule at initialization. The default Basic policy remains disabled. Preparation fixtures check refusal, wrap, deadlines, limits, retained members, and both AARF rejection configurations. Plan: plan/pending/ieee80211-ampdu-implicit-blockack.md Change: src.ieee80211 | behavior.add | test whatsnew migration | ieee80211-implicit-blockack
Before this commit, extension authors lack documentation for HT construction and reversible batch preparation. The MAC still cannot transmit aggregates. After this commit, the migration guide describes receiver spacing, builders that retain sources, policy selection, batch commitment, and safe Rx rejection. The release note states the available capabilities and limits. This commit changes no runtime behavior. Change: doc | comment | - | ieee80211-implicit-blockack
Before this commit, byte conversion can omit original chunk error flags during A-MPDU traversal. A converted delimiter or member can therefore appear correct despite a cached PHY failure in its original region. After this commit, traversal checks the original chunk region before it accepts a delimiter. It marks an extracted member incorrect when the original region failed. The checks follow nested sequence and slice chunks without another PHY error draw. For example, an incorrect raw DATA region contains bytes that resemble valid delimiters. The original region must prevent their acceptance. The added Ieee80211MpduDeaggregation_1 assertions fail on the parent and check this boundary after the fix. They also cover front offsets and errors across chunk boundaries. These checks establish extraction semantics, not a complete MAC exchange. Plan: plan/pending/ieee80211-ampdu-implicit-blockack.md Change: src.ieee80211 | behavior.change.fix | test | ieee80211-implicit-blockack
Before this commit, the bitmap builder and response-mode calculation require a received BAR, although their calculations use the agreement and eliciting mode. The later implicit response needs those calculations without an explicit BAR. After this commit, the recipient procedure builds the bitmap from the agreement, peer, and TID. Rate selection calculates the Compressed response mode from the eliciting mode. Existing explicit BAR paths call these helpers with the same inputs as before. For example, an explicit Compressed BAR still produces the same receipt bitmap and response mode. The Compressed record, rate, response-mode, and exchange fixtures serve as compatibility controls. This commit enables no aggregate sender or recipient receive path. Plan: plan/pending/ieee80211-ampdu-implicit-blockack.md Change: src.ieee80211 | refactor | test migration | ieee80211-implicit-blockack
Before this commit, Rx refuses aggregate content at the MAC boundary. Correct independent members cannot update receipt state, enter the reorder buffer, or request an implicit Compressed response. After this commit, Rx checks each member against cached PHY outcomes and its FCS. HCF validates addresses, TID, profile, and agreement before it updates receipt state. The recipient sends one Compressed Block Ack after SIFS. One failed member does not invalidate a correct neighbor or cause EIFS when another member is correct. For example, a fixture sends three MPDUs with a failed middle member through real radios. Rx accepts the two correct members independently. The recipient records those members and returns their bitmap when its agreement permits the implicit response. The reorder fixture also supplies physical SIFS intervals and delimiter gaps. Rx retains delimiter and interval facts across its local Block Ack so release uses actual reception evidence. The receipt record remains the acknowledgment-state owner. The boundary, reorder, and Compressed input module fixtures check this receiver without a production aggregate sender. WifiHtAmpduPartialReception preserves cached PHY assertions before member extraction. WifiLocalInterframeInputs checks ordinary interval evidence and clears stale aggregate context when timing evidence is absent. The partial-reception fixture uses invalid MAC content, so it establishes no successful member delivery by itself. Fresh parent execution of the new receive API remains unavailable because the parent lacks that API. The receive callback, receipt context, and reorder consumers enter together because each accepted member needs the complete release contract. Local aggregate selection, DATA submission, and sender recovery remain disabled until sender integration. Plan: plan/pending/ieee80211-ampdu-implicit-blockack.md Change: src.ieee80211 | behavior.add | test whatsnew migration | ieee80211-implicit-blockack
Before this commit, the documentation covers aggregate preparation but lacks the recipient contracts. Custom components lack instructions for member validation and an implicit response. After this commit, the user guide explains eligible recipient agreements, independent member acceptance, and the SIFS response. The migration guide describes Rx ownership, receipt context, agreement inactivity, response construction, and response rates. The release note distinguishes recipient support from local aggregate transmission, which remains unavailable. This commit changes no runtime behavior. Change: doc | comment | - | ieee80211-implicit-blockack
This was referenced Nov 5, 2026
This branch has not been deployed
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.
Rx cannot accept correct members from an HT aggregate through the complete MAC receipt path. This PR adds independent member validation and one implicit Compressed Block Ack response after SIFS.
Hypothetical example: the PHY marks MPDU 41 incorrect in an aggregate with MPDUs 40, 41, and 42. Rx preserves the PHY outcome and checks each member's FCS. HCF accepts 40 and 42 under an eligible agreement. The recipient reports those members in one bitmap. One correct member prevents EIFS for that PPDU.
The recipient also passes delimiter positions and physical interval facts to the reorder buffer. It retains that evidence across its own Block Ack transmission. Receipt state stays with its existing owner.
This PR depends on the HT aggregate preparation branch. Local aggregate transmission remains unavailable. The physical fixtures supply aggregates without the new production sender.
The commits preserve original chunk errors during extraction, extract response and rate helpers, and integrate the recipient. The changed contracts cover Rx, HCF dispatch, recipient services, agreement inactivity, interframe indications, and reorder context. Custom components need the migration changes in this PR.
The extraction fixture checks original error flags. Physical boundary and reorder fixtures check independent acceptance and release. The Compressed input fixture checks receipt and response behavior. The partial-reception fixture checks cached PHY outcomes before extraction. Its invalid MAC content does not establish successful member delivery. The interval fixture checks local evidence and clears stale context when timing metadata is absent.
Implicit DATA without an eligible agreement creates no receipt state or response. An active Basic agreement causes a profile-conflict diagnostic. Both peers must select compatible Block Ack profiles because ADDBA does not negotiate this selector.
No baseline changes form part of this PR. Some inherited behavior commits lack separate protocol reviewer documents. Exact parent execution of the new receiver fixture remains unavailable because the parent lacks its receive API. This split preserves those limits.
This cumulative draft targets upstream
master. Its own stage contains 4 commits. The stage comparison excludes prerequisite commits. Earlier commits remain visible until their prerequisite PRs merge.If those merges change commit IDs, the dependent branches need a rebase.
Review the PRs in this order: #1363, preparation, reception, #1364.
Merge the preparation PR first. The final transmission stage retains PR #1364.
Commits in this stage
Ieee80211MpduDeaggregation_1.testchecks the original error flags.Prerequisite commits in review order
Ieee80211SequenceNumberCyclic_1.testchecks that operation.Ieee80211AmpduRxBoundary_1.testsupplies malformed containers.Ieee80211AmpduPreparation_1.testchecks ownership, refusal, deadlines, and sequence wrap.Fresh verification
The PR head is
015be5c071. Tests and compilation ran at501ab1e655. The PR head differs only in documentation. Production code and test fixtures are identical. Verification uses OMNeT++ 6.4.0aipre2, Clang, and the retained workspace. Fixture definitions supply configurations and seeds. Counts below identify fixtures, not simulation repetitions.Whole-tree architecture and interface checks retain existing findings. Their reports match the previous published feature reports. Naming checks retain the same violation lines. These checks remain FAIL. Mechanical series and source protection checks pass. C++ lint remains unverified without a compilation database.
All 176 physical reorder cases pass. Fresh execution of the exact receiver fixture on its immediate parent remains unavailable because that parent lacks the receive API. Ordinary refactor controls retain their assertions and pass. These results do not establish complete standards conformance.
Commands and local evidence
Evidence is under
audit/ampdu-pr-split-20261105/. The execution record isai-logs/executions/2026-11-05_ampdu-pr-split.md. Each source commit in the MAC split has a fresh debug build and focused test record. The prerequisite PHY commits retain their historical evidence. The temporary compatible descriptor omits only the unsupportedcoverage.reportmetadata. The checked-in descriptor remains unchanged.Raw logs, JSON results, output archives, source comparisons, and file hashes retain the evidence and preservation checks.