Skip to content

Fix unused airtime reservations after Wi-Fi group frames - #1481

Open
mgonzalezlopezudc wants to merge 1 commit into
inet-framework:masterfrom
mgonzalezlopezudc:fix/ieee80211-group-frame-reservation
Open

mgonzalezlopezudc wants to merge 1 commit into
inet-framework:masterfrom
mgonzalezlopezudc:fix/ieee80211-group-frame-reservation

Conversation

@mgonzalezlopezudc

@mgonzalezlopezudc mgonzalezlopezudc commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

With Block Ack enabled, a Wi-Fi sender can reserve airtime for a broadcast it will send in a later transmission opportunity (TXOP). In the BD-25 regression, the first broadcast advertises 96 µs for the next frame. That frame still has to contend for the channel, so other stations can defer during an unused reservation.

For the last group frame, the hybrid coordination function leaves the queued successor out of the single-protection calculation. The group frame advertises 0 µs in Duration/ID, as required by IEEE Std 802.11-2024, 9.2.5.2 a) 9). The next frame contends for a new TXOP.

flowchart LR
    subgraph Before
        A["Broadcast in TXOP 1"] --> B["96 µs advertised for a frame outside this TXOP"]
        B --> C["New channel access"] --> D["Next broadcast in TXOP 2"]
    end
    subgraph After
        E["Broadcast in TXOP 1"] --> F["0 µs advertised after the frame"]
        F --> G["New channel access"] --> H["Next broadcast in TXOP 2"]
    end
Loading

Commit

  • 73b0d13837 applies the existing group TXOP boundary to the Block Ack-enabled path, cites the IEEE clause at the decision, and adds a regression.

Tests

On rebased commit 73b0d13837, the debug and release builds passed. Both modes passed the group-duration test, WifiBlockAckDataRetry, WifiBasicBlockAckMissingData, and N_CompressedBa. The debug module control also passed.

WifiSingleProtectionGroupDuration · Reservation ends with the group frame

The fixture queues two broadcast QoS Data fragments with a positive TXOP limit. It checks that the sender opens two separate frame sequences and reads the Duration/ID field on both transmitted frames. Before the original fix, the parent produced 96 µs, 0 µs with either Basic or Compressed Block Ack enabled and 0 µs, 0 µs with Block Ack disabled. The fixed build produces 0 µs, 0 µs in all three modes and passes in debug and release. The fixture uses INET’s group fragmentation to populate the queue. IEEE Std 802.11-2024, 10.2.7, prohibits group fragmentation. Fixture and parent comparison

flowchart TD
    A["Queue two broadcast DATA fragments"] --> B["Check two distinct frame sequences"]
    B --> N["Block Ack disabled"]
    B --> BA["Basic enabled"]
    B --> CA["Compressed enabled"]
    N --> X["Parent and fix both advertise 0 µs, 0 µs"]
    BA --> Y["Parent advertises 96 µs, 0 µs. Fix advertises 0 µs, 0 µs"]
    CA --> Z["Parent advertises 96 µs, 0 µs. Fix advertises 0 µs, 0 µs"]
Loading
Control tests and fingerprints

Ieee80211SingleProtectionGroup_1 · Single broadcast

The module fixture checks that a single group frame has zero Duration/ID and completes its sequence without querying an ACK mode for that frame. A separate call exercises the legacy protection arithmetic with a supplied successor and expects 176 µs. The module control passed in debug. Fixture

flowchart TD
    A["Module fixture"] --> B["Transmit a lone broadcast"]
    B --> C["0 µs, one sequence completion, no ACK wait"]
    A --> D["Call duration helper with an explicit successor"]
    D --> E["176 µs and one ACK-mode query for the successor"]
Loading

WifiBasicBlockAckMissingData · Missing unicast remains eligible for retry

The station’s first Basic Block Ack DATA is dropped by the radio tap. The AP returns a clear bit for the missing fragment and the station retries the same sequence and TID. The group replacement cases also exercise broadcast isolation. The protocol control passed in debug. Fixture

sequenceDiagram
    participant S as Station
    participant R as AP
    S--xR: First unicast DATA lost at the radio tap
    S->>R: Basic BAR
    R-->>S: Missing fragment bit is 0
    S->>R: Original sequence and TID with Retry set
Loading

N_CompressedBa · Valid feedback exchange

The protocol control checks the 24-byte request, 32-byte reply, non-HT mode, and a positive receipt in the 64-bit bitmap. It passed in debug. Fixture

sequenceDiagram
    participant S as Station
    participant R as AP
    S->>R: Compressed BAR, 24 bytes, non-HT
    R-->>S: Compressed Block Ack, 32 bytes, non-HT
    Note over S: Check 64-bit bitmap with a positive receipt
Loading

Fingerprint comparisons

All seven selected run-0 fingerprints matched the stored values in debug on rebased commit 73b0d13837.

flowchart TD
    A["Compare parent and fixed run 0 against each stored fingerprint"]
    A --> B["HCFfragblockack"]
    A --> C["OnlyPacketSizeHCFfragblockack"]
    A --> D["PacketSizeHCFfragblockack"]
    A --> E["ThresholdHCFfragblockack"]
    A --> F["TxPowerHCFfragblockack"]
    A --> G["MacQosWithBlockAck"]
    A --> H["Ieee80211MacV2X"]
Loading

Baseline changes

BD-25 carries no baseline updates.

Build and test commands
source .envrc
for mode in debug release; do
  make MODE="$mode" -j6
  opp_run_protocol_tests --load . -p inet -m "$mode" --no-build \
    -w '^tests/protocol/wifi$' \
    -f '/(WifiSingleProtectionGroupDuration|WifiBlockAckDataRetry|WifiBasicBlockAckMissingData|N_CompressedBa)\.test$'
done
opp_run_module_tests --load . -p inet -m debug --no-build \
  -f 'Ieee80211SingleProtectionGroup_1\.test$'
opp_run_fingerprint_tests --load . -p inet -m debug --no-build \
  -w '^(showcases/wireless/fragmentation|examples/wireless/qos|examples/wireless/nic)$' \
  -c '^(HCFfragblockack|OnlyPacketSizeHCFfragblockack|PacketSizeHCFfragblockack|ThresholdHCFfragblockack|TxPowerHCFfragblockack|MacQosWithBlockAck|Ieee80211MacV2X)$' \
  -r '^0$'

@mgonzalezlopezudc
mgonzalezlopezudc marked this pull request as ready for review November 23, 2026 21:17

@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 1 potential issue.

2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the fix/ieee80211-group-frame-reservation branch 7 times, most recently from 7994bab to 8c1945c Compare November 24, 2026 00:48
@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the fix/ieee80211-group-frame-reservation branch 6 times, most recently from 0430434 to ffb4501 Compare November 24, 2026 18:00
When a group frame ends a transmission opportunity (TXOP), stations should be able to contend for the channel as soon as the normal waiting period allows. With Block Ack support enabled, the sender can advertise airtime for a second frame that is ready in the queue. That frame needs its own channel access, so the extra reservation can make other stations wait for airtime the sender will leave idle.

The hybrid coordination function now leaves the queued successor out of the single-protection calculation for group Data and Management frames. The final group frame advertises zero Duration/ID, as required by IEEE Std 802.11-2024, 9.2.5.2 a) 9).

WifiSingleProtectionGroupDuration makes two group frames ready by using the model's existing fragmentation behavior. In both Block Ack profiles, the first frame used to advertise 96 µs even though the second frame transmitted in a separate TXOP. The test now observes zero on both frames, as it already does with Block Ack disabled. The fixture exercises the reservation calculation and the TXOP boundary. IEEE 802.11 prohibits fragmenting group traffic.

Reviewer: tests/protocol/wifi/single-protection-group-duration.md
Plan: plan/pending/baseline-catch-up-defects.md
Change: src.ieee80211 | behavior.change.fix | test whatsnew
@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the fix/ieee80211-group-frame-reservation branch from ffb4501 to 73b0d13 Compare November 24, 2026 20:41

This branch has not been deployed

No deployments
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