ieee80211: defer radio commands until Tx becomes idle - #1280
Open
mgonzalezlopezudc wants to merge 1 commit into
Open
mgonzalezlopezudc wants to merge 1 commit into
mgonzalezlopezudc wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🔍 Devin Review: 2 flags
Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
mgonzalezlopezudc
force-pushed
the
fix/ieee80211-radio-command-deferral
branch
from
October 5, 2026 19:22
1ee0ed0 to
24e0400
Compare
A radio command can reach the radio before an accepted response starts transmission. This affects simulations that reconfigure IEEE 802.11 radios during a response. Medium access control (MAC) previously checked only the medium state, which cannot identify a response that waits to start. The MAC now keeps the command until Tx, its frame transmission component, releases the accepted transmission. The hybrid coordination function (HCF) accepts an acknowledgment (ACK) frame with a short interframe space (SIFS) delay. To reproduce, submit a radio command during that delay. The old MAC sends the command immediately when the medium is free. The focused module test requires the command to remain pending until the ACK completes. It checks ACK completion and command release through HCF. Custom implementations of ITx must implement hasTransmission(). The query returns true during the wait before transmission and during transmission. Tx clears its state before the completion callback, so the coordination function can release a pending command. HCF and the distributed coordination function (DCF) release pending commands after recipient responses complete. Hcf::sendUp() becomes virtual so the test can consume received frames without an upper protocol stack. The 30 approved fingerprint updates record the change in event order. Only tplx changes; the numerical fingerprints ~tNl and ~tND retain their base values. Change: src.ieee80211.mac | behavior.change.fix | test whatsnew migration fingerprint | radio-command-deferral
mgonzalezlopezudc
force-pushed
the
fix/ieee80211-radio-command-deferral
branch
from
October 5, 2026 21:50
24e0400 to
61bbe08
Compare
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.
A radio command can reach the radio before an accepted acknowledgment (ACK) frame starts transmission.
This affects simulations that reconfigure an IEEE 802.11 radio during a response.
The MAC previously checked only whether the medium was free, which cannot identify a response that waits to start.
The MAC now keeps the command until the accepted transmission completes.
Medium access control (MAC) controls channel access and exchanges frames.
Tx is the MAC component that transmits frames immediately or after a specified delay.
For example, Tx accepts an ACK and waits through the short interframe space (SIFS) before transmission.
A radio command arrives during SIFS, when the medium can still be free.
The MAC keeps that command until the ACK completes, so radio reconfiguration follows the response.
The focused module test exercises this condition and checks command deferral, ACK completion, and command release.
Custom implementations of
ITx, the interface for Tx, need the newhasTransmission()method to compile.Simulations that reconfigure radios can observe a later command and a different event order.
Commit and contracts
61bbe08306: Fix radio command deferral in the MAC and release pending commands after recipient responses.The query returns true while Tx retains an accepted transmission, including the wait before transmission starts.
Tx clears that state before it calls
ICallback::transmissionComplete(), the callback that reports completion to the coordination function.The callback must observe the cleared state so it can release a pending command.
The query returns false when Tx holds no accepted transmission.
The hybrid coordination function (HCF) and distributed coordination function (DCF) release pending commands after recipient responses complete.
Hcf::sendUp()becomes virtual so the focused test can consume received frames without an upper protocol stack.The test exercises HCF; it does not directly exercise DCF.
The release note and migration guide describe the user effect and the new query contract.
Validation
The following results apply to
61bbe08306331e72d9a2235a1f0197082c8c0d2d:tplx,~tNl, and~tNDin debug mode.The control result below applies to
24e04008315f2d0769a3bf55b91d132c51304726.The control removes the
!tx->hasTransmission()condition from both MAC guards while it keeps the rest of the fix.That control fails at
pendingRadioConfigMsg == commandbecause the MAC sends the radio command before the ACK.With both guards present, the same test passes.
Run the focused regression from the repository root:
Run the fingerprint cases from
tests/fingerprintafter the root environment setup.Create
radio-selection.csvwith the corresponding rows from the three tracked CSV files.Include exactly the 30 rows in the baseline table.
Global architecture, naming, and interface checks report existing violations in unchanged files.
The grouped
opp_replfingerprint helper remains unverified for this head.The 30-case result comes from
fingerprinttest.Statistical impact, graphical fingerprints, other seeds, and release-mode behavior remain unverified.
Baselines
The diff contains 30 approved updates: thirteen example rows, thirteen showcase rows, and four tutorial rows.
Only
tplx, the complete event fingerprint, changes from the PR merge base,03e927c18a2060ae147d2f736f3c03cd623477a3.The numerical fingerprints
~tNland~tNDretain their base values.The command follows the accepted response, which changes event order.
The following table shows the base and final values for four QoS configurations.
QoS means quality of service, the traffic treatment that distinguishes service needs.
tplxtplxexamples/wireless/qosMacQos3a58-19c0a686-bbedexamples/wireless/qosMacQosWithoutAggregation33e5-c3808ea1-98b9examples/wireless/qosMacQosWithRtsCts7f3b-72ca4686-3691showcases/wireless/qosQos8d7c-5091b214-9d7eThe next table names every changed configuration.
Each row uses run 0.
The file names refer to CSV files under
tests/fingerprint.examples.csvexamples/dhcpWirelessDHCPexamples.csvexamples/dhcpWireless2DHCPexamples.csvexamples/ipv6/mipv6Handoverexamples.csvexamples/ipv6/mipv6RouteOptimizationTwoCNsexamples.csvexamples/ipv6/mipv6roamingRoamingexamples.csvexamples/ipv6/pmipv6Generalexamples.csvexamples/wireless/handoverGeneralexamples.csvexamples/wireless/qosMacNonQosexamples.csvexamples/wireless/qosMacQosexamples.csvexamples/wireless/qosMacQosWithoutAggregationexamples.csvexamples/wireless/qosMacQosWithRtsCtsexamples.csvexamples/wireless/qosMacQosWithBlockAckexamples.csvexamples/wireless/wiredandwirelesshostswithapGeneralshowcases.csvshowcases/visualizer/canvas/ieee80211OneNetworkshowcases.csvshowcases/visualizer/canvas/ieee80211MultipleNetworksshowcases.csvshowcases/visualizer/canvas/ieee80211VisualizingHandovershowcases.csvshowcases/visualizer/canvas/ieee80211SignalLevelsshowcases.csvshowcases/visualizer/canvas/interfacetableAdvancedFeaturesshowcases.csvshowcases/visualizer/canvas/networkpathactivityChangingPathsshowcases.csvshowcases/visualizer/canvas/packetdropQueueOverflowshowcases.csvshowcases/visualizer/canvas/physicallinkactivityFilteringshowcases.csvshowcases/visualizer/canvas/stylingAnnotationshowcases.csvshowcases/wireless/handoverGeneralshowcases.csvshowcases/wireless/multiradioGeneralshowcases.csvshowcases/wireless/qosNonQosshowcases.csvshowcases/wireless/qosQostutorials.csvtutorials/configuratorStep8Atutorials.csvtutorials/configuratorStep8Btutorials.csvtutorials/configuratorStep9tutorials.csvtutorials/configuratorStep12