Skip to content

IEEE 802.11: add HT Greenfield mode set, transmission handling, and control-response rate selection - #1146

Open
mgonzalezlopezudc wants to merge 33 commits into
inet-framework:masterfrom
mgonzalezlopezudc:cleanup/feat-ht-greenfield
Open

mgonzalezlopezudc wants to merge 33 commits into
inet-framework:masterfrom
mgonzalezlopezudc:cleanup/feat-ht-greenfield

Conversation

@mgonzalezlopezudc

@mgonzalezlopezudc mgonzalezlopezudc commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Note

This PR depends on #1145 (cleanup/fix-ht-gi) and should be merged after it. The feature series consists of seven commits on top of that branch.

Summary

Add IEEE 802.11n HT Greenfield transmission and reception support, including control responses and interoperability with peers that support only HT-mixed reception. A Greenfield-capable station can transmit Greenfield data to a compatible peer and fall back to the corresponding HT-mixed mode for other HT peers.

PHY modes and capabilities

  • Register n(greenfield-2.4Ghz) with selectable MCS 0–31 modes at 20/40 MHz and both long and short guard intervals.
  • Separate selectable operational modes (containsMode()) from supported PHY capabilities (supportsMode()). Greenfield profiles support legacy and HT-mixed control responses without making those modes selectable as their persistent data mode.
  • Precompute control-response lookups and make the mode-set registry thread-local.
  • Check per-packet transmission and reception against supported PHY modes.
  • Correct HT/VHT preamble, header, and data duration decomposition, including short-GI timing and SIG fields represented within the preamble.

Peer negotiation and control responses

  • Advertise and negotiate Greenfield receiver capability, and select the HT-mixed equivalent when the destination cannot receive Greenfield.
  • Accept supported HT-mixed CTS modes in a Greenfield profile.
  • Select non-HT ACK and Basic BlockAck responses for ordinary HT exchanges, and HT-mixed CTS responses to HT RTS frames.
  • Map configured HT CTS rates to their HT-mixed equivalents while preserving MCS, channel width, spatial streams, and guard interval. Reject configured legacy CTS rates in HT profiles. Explicit HT CTS overrides retain the documented ability to bypass automatic response-rate constraints.
  • Reject missing mode sets during link-layer initialization and integrate response-mode selection with the prerequisite branch's transactional mode-set changes and fixed-rate rebuilding.

Integration and review order

The architectural surface is the IEEE 802.11 PHY mode contract and catalog, radio/transmitter/receiver capability checks, MAC and QoS rate selection, and MIB HT capabilities. The change exposes the Greenfield profile through interface/MAC/radio NED configuration and documents response-rate parameter semantics in NED and WHATSNEW. It includes a ping example in examples/wireless/lan80211/omnetpp-ht-greenfield.ini.

Read the commits in order: PHY mode support; MAC/control-response integration; peer capability negotiation; HT-mixed CTS acceptance; peer-fallback tests; short-GI duration correction; TXOP fingerprint baseline. No sealed source paths or new architecture/naming exception entries are involved.

Validation

Validated the final tree at 469912e263 from the repository root using debug mode. Tests use their embedded configurations and runner defaults, with no run/seed overrides.

make MODE=debug -j$(nproc)

inet_run_unit_tests -m debug -f 'Ieee80211(HtGreenfield|HtGuardInterval|HtModeSet|HtCapabilities|PeerModeSelection)_1\.test'
inet_run_unit_tests -m debug -f 'Ieee80211PeerModeSelection_1\.test'

inet_run_module_tests -m debug -f '(Ieee80211(HtGreenfieldRuntime|HtMixedRuntime|HtHeterogeneousGreenfieldRuntime|ConfiguredResponseRateSelection|LegacyResponseRateSelection|InvalidConfiguredCtsRate|ModeSetTransition_1)|(Qos)?RateSelectionNullModeSetInitialization)\.test'
inet_run_module_tests -m debug -f 'Ieee80211InvalidConfiguredCtsRate\.test'
  • Debug library build passed (exit 0).
  • All five selected unit tests passed: four passed in the initial invocation; the peer-mode test passed its focused rerun after adapting its helper references to the prerequisite API.
  • All nine selected module tests passed: eight passed in the initial invocation; the invalid-CTS test passed its focused rerun after adapting its wrapper to applyModeSet().
  • Both test adaptations are folded into their original commits. Production sources did not change after the successful library build.
  • Focused MAC/PHY architecture checks, source-seal checks, and git diff --check cleanup/fix-ht-gi..HEAD passed. Independent rebase-preservation review found no remaining defects.

Fingerprint baseline

The series includes the existing tests/fingerprint/showcases.csv update for /showcases/wireless/txop/, configuration General, run 0, duration 5 s. It records the timing/control-response trajectory change: tplx changes from d2b6-a5d1 to 1ecd-df80, and ~tNl from 3a6f-4c28 to 86dd-208d; tyf remains c87d-3f3a. This baseline commit was replayed during the rebase; fingerprints were not regenerated or rerun in the validation above.


Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Devin Review

Comment thread src/inet/linklayer/ieee80211/mac/rateselection/Ieee80211PeerModeSelection.cc Outdated
@mgonzalezlopezudc

Copy link
Copy Markdown
Contributor Author

Asked Devin to write a report on the remaining informational items and the two threads above.

Confirmed: ALL OK

Summary

The four informational Bug Catcher items describe correct, intentional behavior. Both unresolved review threads on src/inet/linklayer/ieee80211/mac/rateselection/Ieee80211PeerModeSelection.cc are stale and safe to resolve — the underlying issues were fixed at head. All six items are verified directly against head commit 2b6333151d02c5168c538c35d8a95f8c891477fa. No code changes are required.


Part A — Informational items (correct behavior)

1. Drop callbacks retain valid packets — verified

CompoundPacketQueueBase::pushPacket in src/inet/queueing/queue/CompoundPacketQueueBase.cc:60-69:

if (packetDropperFunction != nullptr) {
    while (isOverloaded()) {
        auto packet = packetDropperFunction->selectPacket(this);
        EV_INFO << "Dropping packet" << EV_FIELD(packet) << EV_ENDL;
        removePacket(packet);
        take(packet);                     // reclaim ownership
        notifyPacketDropped(packet);      // callback sees intact chunks/tags
        dropPacket(packet, QUEUE_OVERFLOW); // deletion happens after
    }
}

Ordering confirmed: take → notifyPacketDropped → dropPacket. The callback runs while the packet is still valid. setPacketDropCallback (src/inet/queueing/queue/CompoundPacketQueueBase.cc:75-83) propagates the callback to child IPacketQueue submodules, so drops inside inner queues carry the same guarantee.

2. Stale association completions ignored — verified

Ieee80211MgmtAp::getAssociationResponseDisposition in src/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtAp.cc binds each MAC completion to a 64-bit transaction token:

  • transactionTag == nullptr || transactionTag->getTransactionId() != pendingTransactionId (or zero token) → IGNORE
  • Non-final acknowledged fragment → RETAIN
  • Otherwise → COMPLETE

A late callback for a superseded attempt returns IGNORE, so it cannot commit an AID, install stale HT state, or emit false notifications for a newer request.

3. Unknown elements remain skippable — verified

readHtElements in src/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtFrameSerializer.cc:343-375:

while (stream.getRemainingLength() != b(0)) {
    if (stream.getRemainingLength() < B(2))
        throw cRuntimeError("Malformed IEEE 802.11 management element header");
    int elementId = stream.readByte();
    int length = stream.readByte();
    if (stream.getRemainingLength() < B(length))
        throw cRuntimeError("Malformed IEEE 802.11 management element: ...");
    if (elementId == SUPPORTED_RATES_ELEMENT_ID) { throw ...; }
    else if (elementId == EXTENDED_SUPPORTED_RATES_ELEMENT_ID) { ...gated... }
    else if (elementId == HT_CAPABILITIES_ELEMENT_ID) { ...gated... }
    else if (elementId == HT_OPERATION_ELEMENT_ID) { ...gated... }
    else
        for (int i = 0; i < length; i++)   // skip unmodeled IE by length
            stream.readByte();
}

Header/bounds are validated first (src/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtFrameSerializer.cc:346-352); modeled-but-disallowed IDs throw via the allowedElements mask; unrecognized IDs are consumed by length. Vendor/future IEs are tolerated without blocking supported exchanges.

4. Mode rebinding commits atomically — verified, unqualified

RateSelection::updateModes (src/inet/linklayer/ieee80211/mac/rateselection/RateSelection.cc:72-100) resolves every configured mode into local variables (lines 76-88) before assigning any member (lines 92-99), then clears lastTransmittedFrameMode.

The guarantee depends on lookups throwing (not returning nullptr) on failure — confirmed at head:

  • Ieee80211ModeSet::getMode(bps, Hz, int, simtime_t) (src/inet/physicallayer/wireless/ieee80211/mode/Ieee80211ModeSet.cc:1000-1008) throws cRuntimeError when no mode matches.
  • Range overload (src/inet/physicallayer/wireless/ieee80211/mode/Ieee80211ModeSet.cc:1010-1018) throws when findMode(...) returns nullptr.
  • resolveConfiguredResponseCtsFrameMode (src/inet/linklayer/ieee80211/mac/rateselection/RateSelection.cc:24-39) throws on a legacy CTS rate in an HT mode set.

The dataFrameMode path (src/inet/linklayer/ieee80211/mac/rateselection/RateSelection.cc:79) uses the throwing GI overload. Any failed resolution unwinds before member mutation, leaving prior cached state intact. Scope: atomicity is internal to the rate-selection module's cached pointers, not a full-stack multi-module rollback.


Part B — Review threads on src/inet/linklayer/ieee80211/mac/rateselection/Ieee80211PeerModeSelection.cc

Thread 1 (lines 93-95): "Greenfield CTS responses abort transmission" — stale, fully addressed

The comment claims selectPeerCompatibleMode uses containsMode(), which would reject a supported-only HT-mixed CTS mode. Current code uses supportsMode() at src/inet/linklayer/ieee80211/mac/rateselection/Ieee80211PeerModeSelection.cc:98-100:

if (!modeSet->supportsMode(mode))
    throw cRuntimeError(...);

Supported-only HT-mixed CTS modes pass. Thread is marked outdated; matches the Bug Catcher's own "resolved bugs" record.

Thread 2 (lines 41-48): "Greenfield capability negotiation ignored" — stale, fully addressed

All three sub-points handled; negotiation path traced end-to-end:

a. isCompatibleHtMode rejects Greenfield to non-GF peers — src/inet/linklayer/ieee80211/mac/rateselection/Ieee80211PeerModeSelection.cc:52-53:

if (mode->isHtGreenfield() && !receiverCapabilities.receiverGreenfield)
    return false;

b. Local capability advertises Greenfield per mode set — src/inet/linklayer/ieee80211/mib/Ieee80211Mib.cc:

localHtCapabilities.greenfield = modeSet->isHtGreenfieldSupported();

c. Negotiated state retains peer receiver's GF bit — src/inet/linklayer/ieee80211/mib/Ieee80211HtCapabilities.h:123-124:

negotiated.localTxPeerRx.receiverGreenfield = peer.greenfield;
negotiated.localRxPeerTx.receiverGreenfield = local.greenfield;

End-to-end flow (verified):

  1. Wire → element: src/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtFrameSerializer.cc — capabilities.greenfield = information & (1 << 4)
  2. Element → struct: src/inet/linklayer/ieee80211/mgmt/Ieee80211HtMgmtElements.h — capabilities.greenfield = element.greenfield
  3. STA extract + install: src/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtSta.cc — makeHtCapabilities(...) → mib->setPeerHtCapabilities(...)
  4. Negotiate: src/inet/linklayer/ieee80211/mib/Ieee80211Mib.cc → negotiateHtCapabilities (src/inet/linklayer/ieee80211/mib/Ieee80211HtCapabilities.h:90-142)
  5. Consume: src/inet/linklayer/ieee80211/mac/rateselection/Ieee80211PeerModeSelection.cc:52,106,115

Directional correctness: the our-Tx/peer-Rx view (localTxPeerRx) keys off peer.greenfield (src/inet/linklayer/ieee80211/mib/Ieee80211HtCapabilities.h:123), so when we send a Greenfield PPDU the gate correctly checks the peer's receiver capability — matching the IEEE 802.11-2024 19.1.1/19.1.4 rule cited at src/inet/linklayer/ieee80211/mac/rateselection/Ieee80211PeerModeSelection.cc:50-51.

HT Capabilities Info bit layout (spec-aligned): in src/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtFrameSerializer.cc, write/read use B4=Greenfield, B5=Short GI 20 MHz, B6=Short GI 40 MHz. The adjacent SM-Power-Save comment (B2-B3, Table 9-224) confirms this is the real HT Capabilities Info field, so B4=HT-Greenfield is spec-aligned, not merely round-trip-symmetric.


Disposition

Item Verdict Action
Info 1 — drop callbacks Correct behavior Accept as informational
Info 2 — stale completions Correct behavior Accept as informational
Info 3 — unknown elements Correct behavior Accept as informational
Info 4 — atomic rebinding Correct, unqualified Accept as informational
Thread 1 — GF CTS abort Stale (fixed via supportsMode) Resolve
Thread 2 — GF negotiation Stale (fixed end-to-end) Resolve

Verification status

All six items verified directly against head commit 2b6333151d02c5168c538c35d8a95f8c891477fa:

  • Info 1 — src/inet/queueing/queue/CompoundPacketQueueBase.cc:60-69: take → notifyPacketDropped → dropPacket ordering confirmed.
  • Info 2 — src/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtAp.cc: getAssociationResponseDisposition token binding (IGNORE/RETAIN/COMPLETE) confirmed.
  • Info 3 — src/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtFrameSerializer.cc:343-375: length-based skip of unmodeled element IDs confirmed, with bounds-check and allowed-element gating.
  • Info 4 — src/inet/linklayer/ieee80211/mac/rateselection/RateSelection.cc:72-100 + throwing getMode overloads at `src/inet/physicallayer/wireless/ieee80211/mode/Ieee80211ModeSet.cc:1000-1

Keep the implementation contracts available before the first commit that
references them. These drafts state planned work; the owning implementation
and closure commits record their completed plans and verification evidence.

Change: plan | behavior.add | -
Link-layer initialization may resolve peer interfaces by their configured
addresses. Declare network-interface configuration as a prerequisite so these
queries see initialized identities regardless of module declaration order.
The physical-layer prerequisite remains in place.

This ordering supplies the shared readiness contract used by simplified
wireless association before network configuration.

No fingerprint or statistical baseline is changed. The selected regression
contract covers MacNonQos and MacQos, run 0, in examples/adhoc/qos, plus
simplified association and AP lifecycle module tests in debug mode.

Plan: plan/done/80211htcapop-refactor-v3.md
Change: src.common.InitStages | behavior.change | test | ieee80211-htcapop-v3
Capability preparation previously depended on initialization broadcasts and
mixed local PHY support with active BSS operation. Make the MAC prepare an
idempotent profile through typed PHY contributors, and let management own
accepted BSS transitions and simplified peer installation.

Keep directional peer capabilities immutable and evaluate operation and HT
eligibility separately. Publish committed MIB changes after management
bookkeeping, guard state mutation, and replace modesetChanged listeners
with explicit configuration providers. Prepare simplified associations
before network configuration, independently of node declaration order.

Keep simplified legacy STAs associated without accepting HT operation from
an HT AP. Cover both declaration orders and shutdown/crash restart, while
retaining BSS identity and channel and removing AP-side peer resources on stop.

Migrate dependent consumers and regression fixtures together with the
contracts. Document public API migration and the notification lifetime.

Validation scope: debug build; 3 focused unit and 9 module cases covering
capability preparation, provider wiring, association, lifecycle, beacon and
channel updates; MacNonQos and MacQos run 0 fingerprints at 10s with unchanged
tplx expectations. No fingerprint or statistical baseline changes.

Plan: plan/done/80211htcapop-refactor-v3.md
Change: src.ieee80211 | behavior.change | test expected whatsnew migration | ieee80211-htcapop-v3
Catalog-only consumers should not require capability preparation. Introduce
a paired C++/NED IIeee80211ModeSetProvider contract and make MAC
configuration extend it with the preparation operation used by management.
ModeSetModuleBase now depends only on the read-only provider.

Migrate the replacement-provider fixture to the narrow contract, removing
its throwing preparation stub. Update architecture, migration guidance and
release notes to identify the contract custom catalog providers implement.

Validation of the integrated changes: debug build, 5 focused module tests,
3 unit tests and 18 unchanged Wi-Fi/Ethernet/VLAN/configurator fingerprint
cases pass. Scoped architecture checks pass; interface checking reports
only the existing AV-CONTRACT-02 bodies. No recorded baseline changes.

Plan: plan/done/80211htcapop-refactor-v3.md
Change: src.ieee80211 | refactor | whatsnew migration | ieee80211-htcapop-v3
Remove redundant blank lines from the affected IEEE 802.11 sources so subsequent functional changes contain no incidental whitespace cleanup.

Change: src.ieee80211 | format | -
Rate selection needs to distinguish equal-bitrate modes with different
guard intervals. Require an explicit data-mode query, retaining a negative
sentinel for PHYs without one. Reject unknown VHT guard-interval types
instead of interpreting them as short GI. Document the external API.

Change: src.ieee80211 | behavior.add | test whatsnew migration
The optional HT entries encode the wrong stream count or modulation. Use
one BPSK stream for MCS 32, 16-QAM on stream 4 for MCS 76 at 20 MHz, and
16-QAM on stream 3 for MCS 73 at 40 MHz.

Direct optional-MCS assertions cover stream count, per-stream modulation,
bitrate for both guard intervals and long-GI symbol duration; these entries are
not exercised by the selectable MCS 0-31 catalog.

Change: src.ieee80211.Ieee80211HtmcsTable | behavior.change.fix | test whatsnew
Band and preamble affect mode behavior but were absent from cache identity.
Include them in HT/VHT cache keys and reject unsupported VHT greenfield
requests before cache lookup, including after mixed-format cache use.

Change: src.ieee80211 | behavior.change.fix | test whatsnew
Short GI applies to data symbols while signal fields retain long-GI timing.
Round mixed HT and VHT data airtime to long-symbol boundaries; retain raw
short-GI timing for HT greenfield. Expose consistent PPDU phase durations
and use them in both transmitter paths.

Duration-component operations remain pure virtual on IIeee80211Mode;
Ieee80211ModeBase supplies the shared defaults, with HT/VHT overrides
retaining their format-specific calculations. Document the implementation
contract for external modes.

Plan: plan/done/ht-gi-devin-comment-closure.md

Change: src.ieee80211 | behavior.change.fix | test whatsnew migration
Equal-rate catalog entries can differ in GI and are not distinct adaptation
steps. Qualify bitrate lookups by GI and traverse adjacent rates by bitrate.
Compatibility remapping preserves exact bitrate, bandwidth, NSS and GI;
GI absence is an exact tuple property, not the public lookup wildcard.
Cover exact versus tolerant matching and GI presence in both directions.

Change: src.ieee80211.Ieee80211ModeSet | behavior.add+change | test whatsnew migration
A fixed bitrate alone can select the wrong guard interval. Apply the
configured dataFrameGuardInterval to interface-wide and per-receiver
data-mode lookup in both selectors. Negative values leave GI unspecified;
explicit values must match the modeled interval.

Change: src.ieee80211 | behavior.add | test whatsnew
A mandatory response can use the same bitrate as a nonmandatory request.
Select the highest mandatory bitrate at or below the request instead of
stepping strictly to a lower rate.

Change: src.ieee80211.RateSelection | behavior.change.fix | test whatsnew
Mixed HT catalogs place mandatory HT entries above legacy rates, so the
fastest mandatory mode makes Beacons invisible to legacy stations. Both
selectors must use a mandatory legacy operational mode when the basic
legacy set is nonempty (IEEE 802.11-2024, 10.6.5.4).

Preserve eligible configured basic rates, including equivalent external
mode tuples. Otherwise select the fastest basic legacy rate. Unit checks
cover membership, equivalent tuples and fallback; mixed-HT discovery
checks legacy association through both DCF and HCF access points.

The group-rate restriction changes broadcast airtime in these run-0
configurations, whose CSV and matching JSON expectations travel here:
- examples/wireless/lan80211ac: Ping1;
- examples/manetrouting/multiradio: SingleRadio and MultiRadio;
- showcases/general/pcaprecording: PcapRecording;
- showcases/visualizer/canvas/statistic: PacketErrorRate;
- showcases/visualizer/canvas/submoduleinfo: MACStates and PacketCounts;
- showcases/wireless/analogmodel: Distance;
- showcases/wireless/power: General;
- showcases/wireless/qos: NonQos and Qos;
- tutorials/configurator: Step9 and Step10C.

For example, a configured 54 Mbps group rate falls back to 24 Mbps,
changing airtime and the subsequent event trajectory. The expectations
are measured on parent cbbba4d, which includes corrected wire encoding
and beacon scheduling. Bypassing only selectGroupAddressedMode restores
that parent's fingerprints for the ten showcase/tutorial configurations,
while ordinary production execution matches the corrected values.
Retain existing limits, run numbers and fingerprint ingredients.

PingRtt, analogmodel/Routing and Noise, and configurator/Step8A and Step8B
retain the parent values: no group-rate baseline movement is observed in
those five controls. The Ping1 expectations here describe group-rate
selection before the subsequent VHT peer-negotiation change.

The STA discovery regression checks this same rule: an HT association still
uses a legacy basic mode for multicast, while unicast remains HT-eligible.

Plan: plan/done/ht-gi-devin-comment-closure.md

Change: src.ieee80211 | behavior.change.fix | test whatsnew migration fingerprint
Runtime catalog changes must complete before observers see the new state.
Coordinate them through the MAC simple module and declared provider paths;
the containing interface supplies wiring without owning protocol state.
Apply local capabilities, management operation and dependent algorithms in
that order. Reject missing membership before PHY mutation; failures after
mutation remain fatal without rollback.

Keep ordinary preparation idempotent and reuse HT compatibility caches when
their capability inputs are unchanged. Explicit profile replacement refreshes
those results while retaining relationship-scoped peer advertisements;
selection still checks current eligibility and BSS operation. Reapplying the
same catalog neither resets algorithms nor publishes a catalog change.
Initialization uses typed queries rather than a mode-set broadcast.

Refresh fixed rates, advertisements and active contention on changed catalogs.
Retain whole remaining backoff slots and bounded retry windows without a new
random draw. Resolve default TXOP limits at each start while preserving active
TXOPs and configured overrides. Cover replacement providers, registration,
retained frames, AP edge channels, both radio setters and fatal failure paths.

Preflight catalog-only transmitter compatibility before setting either
transition guard. Rejecting a 40 MHz HT-to-legacy request leaves state and
notifications unchanged, allowing an explicit compatible-mode retry. Reuse
the read-only resolver in the transmitter setter and preserve virtual
setter dispatch; failures after PHY mutation remain fatal.

Plan: plan/done/ht-gi-devin-comment-closure.md

Change: src.ieee80211 | behavior.add+change | test whatsnew migration
Reapplying an unchanged channel or changing only the transmit mode must not
interrupt a compatible incoming frame. Evaluate the actual incoming mode
against listening created from the new receiver configuration; preserve
compatible reception without drawing another error decision.

Abort incompatible reception through the normal cleanup path before
configuration notifications. Clearing only the reception pointer left the
radio reporting RECEIVING until a later signal boundary. Retain arrival
timers for cleanup and give receiver and transmitter separate channel
objects. Cover whole and separate reception parts, unchanged settings,
transmit-only changes, incompatible configurations, cleanup and subsequent
reception.

Plan: plan/done/ht-gi-devin-comment-closure.md

Change: src.ieee80211 | behavior.change.fix | test whatsnew migration
SSID elements contain at most 32 octets. Use shared wire helpers to reject
overlength values and truncated input consistently across management
frames. Cover zero, one, 32 and 33 octets and truncated payloads.

Change: src.ieee80211.Ieee80211MgmtFrameSerializer | behavior.change.fix | test whatsnew
Invalid wire AIDs in association and reassociation responses should mark
the frame incorrect while allowing parsing to finish. Substitute zero and
preserve status, rates, trailing elements and stream position. Cover
missing markers, out-of-range success AIDs and nonzero failure AIDs.

Change: src.ieee80211.Ieee80211MgmtFrameSerializer | behavior.change.fix | test whatsnew
Consumers need a typed VHT MCS identity independent of the HT bitmap and
concrete PHY classes. Add getVhtMcsIndex() to the mode contract, return the
VHT index from VHT modes and provide a non-VHT default in the common base.
Document the requirement for external mode implementations.

Change: src.ieee80211 | behavior.add | test whatsnew migration
Provide both guard intervals for all 310 legal supported VHT tuples.
Prefer historical entries for unqualified lookups so floating-point rate
ties preserve previous choices. Retain mandatory/basic flags and reference
choices. Cover tuple exclusions, qualified lookup, timing and historical
selection in the catalog test.

Change: src.ieee80211.Ieee80211ModeSet | behavior.add | test whatsnew
VHT requests previously bypassed negotiated receive limits. Exchange typed
VHT capability and operation elements through detailed AP/STA management,
commit peer state at association completion, and invalidate it on loss or
mode-set application. Constrain DCF/HCF choices by local Tx and peer Rx
maps, operating width, GI eligibility and long-GI rate limits.

Missing negotiation falls back to legacy rates. Detailed operation remains
primary-20 with long GI; document the retained VHT-only profile limitations.

Update only lan80211ac/Ping1, run 0, 100s in examples.csv and the matching
JSON entries: 8180-0d11/tplx becomes e382-0a32/tplx and
a5d5-2820/~tNl becomes 45db-b12b/~tNl. Without negotiated VHT state, the
first unicast now uses 24 Mbps OFDM, reducing airtime from 72 us to 44 us.
The isolated catalog-only run preserves the old fingerprints, identifying
peer filtering as the cause. The new values were explicitly approved.

The migration guide references the MIB parameter definitions and retains
a directional MCS-map example instead of duplicating defaults.

Expose virtual VHT advertisement helpers so inherited AP/STA builders honor
management subclass overrides. Apply subtype permissions independently to
HT and VHT presence bits in both serializer directions; association requests
must not carry a VHT operation element. Cover both contracts in focused
fixtures and document the normative limits used by the peer selector.

Plan: plan/done/ht-gi-devin-comment-closure.md

Change: src.ieee80211 | behavior.add+change | test whatsnew migration fingerprint
Tie the focused build, unit, module, protocol and fingerprint evidence to
the pinned base and exact source/test patch. Preserve the initial fixture
failures and their corrected reruns, and record the existing full-interface
gate findings separately. Mark the earlier V3 report as historical.

Debug/release builds, nine unit cases, 28 module cases, four protocol cases
and two legacy fingerprints pass in the final source tree. Both scoped
architecture checks and the mode-interface check pass.

Change: plan | behavior.add+change | -
…on support

Register the n(greenfield-2.4Ghz) mode set and distinguish selectable operational modes (containsMode) from supported PHY capabilities (supportsMode). HT Greenfield profiles now explicitly support non-HT and HT-mixed response modes without making them selectable for data transmissions.

Precompute immutable control-response mappings in Ieee80211ModeSet and make the mode-set registry thread-local to ensure thread safety.

In the physical layer, validate per-packet transmission requests and reception feasibility against supported mode capabilities. Decompose transmission duration into preamble, header, and data intervals, correctly accounting for HT/VHT SIG field integration in the preamble. Publish modesetChangedSignal upon radio mode set transitions.

Add unit test coverage for HT Greenfield compliant modes, duration decomposition, transmitter transition invariants, and ERP mode isolation.
…Greenfield integration

Apply IEEE 802.11-2024 control-response rules in DCF and QoS rate selection: ordinary HT ACK and Basic BlockAck responses use mandatory non-HT rates, and CTS responses to HT-carried RTS frames use the HT-mixed format. Translate configured CTS response rates to their corresponding HT-mixed counterparts while preserving MCS, bandwidth, NSS, and guard interval.

Enforce mode set initialization invariants by failing fast if RateSelection has no mode set at link-layer initialization, and rebuild configured modes atomically on dynamic mode-set changes via modesetChangedSignal.

Add "n(greenfield-2.4Ghz)" to wireless interface and MAC module NEDs, and provide an end-to-end Greenfield ping simulation example in omnetpp-ht-greenfield.ini.

Document backward compatibility notes in WHATSNEW regarding 802.11n control-response rate selection. Add comprehensive unit and module test coverage for rate selection, dynamic mode-set rebinding, and HT Greenfield and Mixed runtime exchanges.
…T-mixed for mixed peers

- Mode & physical layer introspection:
  - Add virtual isHtGreenfield() query to IIeee80211Mode and override it in Ieee80211HtMode to identify Greenfield preamble modes.
  - Track htGreenfieldSupported in Ieee80211ModeSet constructor and expose isHtGreenfieldSupported() accessor.
  - Expose findHtMixedMode() on Ieee80211ModeSet to resolve the HT-mixed equivalent of any HT mode based on precomputed response tables.

- MIB & directional capability negotiation:
  - Populate localHtCapabilities.greenfield from modeSet->isHtGreenfieldSupported() in Ieee80211Mib::updateLocalHtCapabilities.
  - Add receiverGreenfield to Ieee80211HtDirectionalCapabilities and populate directional flags during negotiateHtCapabilities().

- Rate selection peer filtering & HT-mixed fallback:
  - In isCompatibleHtMode(), reject candidate Greenfield modes when the negotiated receiver did not advertise Greenfield support.
  - In selectPeerCompatibleMode(), dynamically map Greenfield candidate modes to their legal HT-mixed equivalents, allowing Greenfield stations to communicate with mixed-format peers at high throughput before falling back to legacy rates.

- Testing:
  - Update tests/unit/Ieee80211HtCapabilities_1.test with directional Greenfield capability assertions.
  - Add tests/module/Ieee80211HtHeterogeneousGreenfieldRuntime.test verifying bidirectional unicast data delivery and dynamic HT-mixed frame format selection in a heterogeneous Greenfield/Mixed BSS.
… peer mode selection

- Rate selection peer filtering:
  - In selectPeerCompatibleMode(), use modeSet->supportsMode(mode) instead of modeSet->containsMode(mode) to validate candidate modes.
  - While containsMode() verifies persistent selectable operating modes (which for Greenfield mode sets only include Greenfield PPDUs), supportsMode() correctly covers supported supplementary modes, such as mandatory HT-mixed CTS responses required by IEEE 802.11-2024 subclauses 10.6.6.1 and 10.6.6.5.7.
  - This prevents runtime simulation aborts when Greenfield stations respond to HT RTS frames in infrastructure networks.

- Testing:
  - Add assertions in tests/unit/Ieee80211PeerModeSelection_1.test verifying that selectPeerCompatibleMode() accepts HT-mixed CTS modes for n(greenfield-2.4Ghz) mode sets while still rejecting unsupported MCS indices.
  - Update tests/module/Ieee80211HtHeterogeneousGreenfieldRuntime.test with RTS/CTS enabled (rtsThreshold = 1B) to verify end-to-end HT-mixed CTS generation and transmission by Greenfield stations.
…d HT-mixed fallback

- Peer mode selection testing:
  - Add optional greenfield receiver capability parameter to makePeerState() helper in Ieee80211PeerModeSelection_1.test.
  - Verify selectPeerCompatibleMode() selects HT-Greenfield modes when communicating with a Greenfield-capable peer.
  - Verify isCompatibleHtMode() rejects HT-Greenfield modes when the destination station did not advertise Greenfield reception, causing selectPeerCompatibleMode() to fall back to the compatible HT-mixed equivalent mode.
  - Verify candidate HT-mixed modes remain unaffected regardless of the destination station's Greenfield reception capability.
… GI HT and VHT modes

- Physical layer transmission duration decomposition:
  - In Ieee80211Transmitter::createTransmission(), compute dataDuration using transmissionMode->getDataDuration(B(phyHeader->getLengthField())) instead of raw transmissionMode->getDataMode()->getDuration(...).
  - For HT mixed format and VHT modes configured with Short Guard Interval (Short GI / 400 ns), standard IEEE 802.11 symbol-boundary rounding (IEEE Std 802.11-2024, Eq. 19-90 and Eq. 21-109) rounds data airtime up to the 4 us symbol boundary.
  - Comparing duration == preambleDuration + dataDuration now correctly evaluates to true for HT/VHT Short GI transmissions, setting headerDuration to zero (since SIG fields are included in the preamble) and preventing negative dataDuration calculation and runtime simulation errors.
  - For legacy PHY modes with standalone PLCP headers (OFDM, ERP, DSSS, HR-DSSS), duration == preambleDuration + dataDuration remains false, preserving the header duration allocation.

- Testing:
  - Update assertTransmitterDurationDecomposition() helper in tests/unit/Ieee80211HtGreenfield_1.test to verify duration decomposition with getDataDuration() and accept zero-header HT/VHT modes.
  - Add test assertions covering VHT Short GI, HT Mixed Short GI, and HT Greenfield Short GI modes with both 0-byte and 64-byte payloads.
Scalar signal models forwarded header and data durations to their base
constructor in reverse order. Preserve chronological phase boundaries
for both transmission and reception analog models.

Add direct TX/RX coverage with distinct preamble, header and data durations.
Using the full PHY prefix as the preamble left HT and VHT transmissions
with no timed header phase. Use the mode's chronological duration
accessors while retaining the exact total-duration check.

Check positive HT header durations in mixed and Greenfield runtime cases,
and verify packet and analog phase boundaries across HT, VHT and legacy
catalog variants.
Optional multicast requests such as 9 and 18 Mb/s could select the fastest
mandatory legacy rate and exceed the requested bitrate. Select the
highest mandatory legacy rate within the ceiling, preserving exact
mandatory requests.

Report an error when mandatory legacy modes exist but none meets the
bound. Preserve the request when the mandatory legacy set is empty.
Cover optional rates, exact requests and both fallback boundaries.
A response bitrate can identify multiple HT MCS, bandwidth, stream-count
and guard-interval combinations. Expose matching qualifiers for DCF/QoS
ACK and CTS, plus QoS BlockAck, and reject ambiguous configured matches
instead of silently depending on catalog order.

Mode-set lookup enforces uniqueness only when requested. Automatic
responses and other lookup callers retain their existing behavior.
Verify qualified CTS conversion, invalid and automatic configurations,
and configured multicast ceilings through both production selectors.
The HT catalog can represent 40 MHz modes, but the packet-level
transmitter and receiver advertise only 20 MHz operation. Clarify that
nonzero secondary-channel offsets require PHY width support and are
rejected by these providers.
The GI base now coordinates mode transitions explicitly and gates HT data on a committed BSS relationship. Exercise those production paths in the Greenfield fixtures, including infrastructure exchanges and null catalog providers. Match the chronological PHY phases and preserve ownership of catalog preambles in synthetic mode tests.

Keep the upstream null-request group-mode fallback while applying the topic rate ceiling to explicit requests. Update the group-selection assertions to cover both contracts.

Final-tree validation: debug INET build, 9 focused unit tests, 11 focused module tests, MAC/PHY architecture checks, and TXOP tplx/~tNl fingerprints pass. The graphical tyf fingerprint differs and is not updated. No intermediate commit was built or tested.
@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the cleanup/feat-ht-greenfield branch from 2782671 to bea61f5 Compare September 21, 2026 13:56

This branch had an error being deployed

1 failed (outdated) deployment
sealed-source-change — 69353757 Deployed Sep 5, 2026 by mgonzalezlopezudc via Approve sealed source #32
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.

1 participant