ieee80211: fix beacon-loss interface scoping and AARF/Onoe rate adaptation - #1176
Open
mgonzalezlopezudc wants to merge 9 commits into
Open
Conversation
mgonzalezlopezudc
force-pushed
the
fix/ieee80211-agent-rate-control
branch
4 times, most recently
from
September 10, 2026 15:30
00e2b95 to
6d7b49c
Compare
Keep incidental end-of-file changes separate from the rate-control fixes so their functional diffs contain only the behavior being reviewed. Remove surplus final blank lines from the affected MAC files and terminate the migration guide with a newline.
Host-level beacon-loss subscriptions receive notifications from other WLANs. Scanning in response disassociates healthy interfaces and can interrupt an existing scan. Match the notification payload to the containing NIC. Cover independent beacon timeouts and overlapping scans on two WLANs.
Elapsed-time probing and failure handling diverged from INRIA RR-5208, Appendix A. Failed attempts preserved success streaks, triggered fallback too early or ended recovery before a successful transmission. Advance the timer from packet feedback and space ordinary fallback using the MAC retry count. Keep recovery until success, adapt the packet timeout with the success threshold, and cap threshold growth. Only an actual rate increase starts a probe; idle queries cannot change adaptation state. Replace interval with packet-timer parameters and document migration. Cover DCF/HCF feedback, receiver isolation, recovery, timer boundaries and rate bounds, and adapt the showcase configuration to the packet timer. AarfRateControl and InstrumentShowcase both use the corrected controller. Their existing tplx, ~tNl and ~tND expectations in showcases.csv and store.json belong with this correction: the packet-feedback transitions change adaptation and delivery trajectories. Module assertions cover the intended state transitions. Graphical expectations remain unchanged.
Counting individual retries mixed unfinished packets into samples and could count a failure again at success. Small samples earned credit too quickly, and failed-only intervals could leave the controller at an unusable rate. Follow MadWifi ath_rate/onoe/onoe.c at revision a7531fd223a1f454d3fd74a975b4581cde5411bb for completed normal-ACK feedback. Consume terminal recovery counts once before evaluating a due sample. Require ten completions for ordinary decisions, compare retries directly with successes, prohibit upward credit after errors, and retain small samples unless the rate changes. Failed-only samples can lower the rate. Preserve integer truncation and bounded credit, suppress false rate-change signals, and keep queries from consuming deadlines. Cover arithmetic and sample boundaries, receiver isolation, mode resets and real DCF/HCF completion counts, including interleaved HCF retries.
Lost CTS responses were absent from Onoe retry samples, and RTS exhaustion did not report a completed error. Supply the protected packet's short-plus- long retry total through DCF and HCF before recovery cleanup so each terminal outcome is counted once. Retire both recovery counters at completion to avoid stale totals when identities are reused. RateControlBase adapters preserve legacy data-attempt feedback, including AARF behavior. Document the new hooks, overload visibility and migration requirements for direct IRateControl implementations. Cover mixed RTS/data failures, both exhaustion paths, recovery cleanup and protected management frames.
QoS sequence numbers are allocated per receiver and TID, so different peers can have identical sequence and fragment numbers. Include the receiver in the shared retry key to prevent interleaved feedback and completion cleanup from reading or erasing another peer's counters. Cover clean reads, short and long counters, retry limits and terminal cleanup with interleaved peers in the recovery module test.
Use the MadWifi startup ceiling for automatic local OFDM/ERP selection, so the built-in 11a/11g sets start at 36 Mbps. HR-DSSS starts at its fastest rate. Explicit initialRate values retain precedence, and HT/VHT retain the fastest-mandatory default. The contract supplies local modes without negotiated legacy peer rates; document that limit while preserving shared RateControlBase behavior. Cover defaults, overrides, invalid rates, peer initialization, signals and mode-set resets.
HCF discarded packets at the internal-collision retry limit without reporting a completed sample to Onoe. Notify rate control before recovery clears the short and long counters so Onoe records the give-up and its full retry total. Use a distinct terminal-drop hook with a no-op RateControlBase default to preserve legacy AARF attempt feedback. Document internal-collision accounting as an INET modeling choice and cover QoS data and management drops with pure and mixed recovery histories.
Record the Onoe alignment plan and its multirate retry design so attempt ownership, retry-limit precedence and PHY-rate verification requirements are reviewable before implementation.
mgonzalezlopezudc
force-pushed
the
fix/ieee80211-agent-rate-control
branch
from
September 10, 2026 20:15
d14bf02 to
9dcd62d
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.
Overview and Motivation
This pull request resolves defects and specification divergences across IEEE 802.11 STA management (
Ieee80211AgentSta) and rate control modules (OnoeRateControlandAarfRateControl):Ieee80211AgentStabeacon-loss interface scoping:Beacon loss notifications were received host-wide instead of being scoped to the emitting interface. On multi-interface WLAN hosts, beacon losses on one interface incorrectly triggered disassociation and scan procedures on other interfaces, interrupting active connections or scans. The notification is now filtered against the containing NIC interface ID.
OnoeRateControlfailed-only interval adaptation and minimum rate guard:OnoeRateControlrequired a successful transmission before evaluating sample intervals. When all transmissions in an interval failed, Onoe never triggered a rate reduction, leaving the station stuck at a rate that could not deliver packets. The fix evaluates completed failed-only samples, lowers the rate, and clears counters without dividing by zero while preserving idle and unfinished intervals. Furthermore, when already at the minimum rate, the sample and credit are reset without reporting a rate transition, keepingdatarateChangednotifications tied to actual decreases.OnoeRateControlretry feedback accounting:A failed attempt and its subsequent successful retry both carry positive recovery counts. Counting both callbacks doubled the retry estimate, causing premature rate reduction when every frame needed only one retry. Unsuccessful feedback is now counted once, and give-up callbacks are excluded from total attempts since their final failure is already counted.
AarfRateControlcanonical RR-5208 recovery and packet feedback semantics:Elapsed wall-clock timers and retry failure counter handling diverged from the canonical INRIA RR-5208 Appendix A specification:
maxSuccessThreshold.AarfRateControl.ned, deprecatedintervalin favor ofpacketTimer(default: false),packetTimeoutInterval(default: 60s), andpacketTimeoutMaxInterval(default: 60s), documented indoc/src/migration-guide/index.rst.showcases/wireless/ratecontrol/andshowcases/visualizer/canvas/instrumentfigures/.Series Reading Order
a6b030e3dbieee80211agentsta: scope beacon loss to the emitting interfaceFilters incoming beacon-loss notifications against the containing NIC interface ID.
Adds two-WLAN regression test
tests/module/Ieee80211AgentStaBeaconLoss_1.test.cf01b231baonoeratecontrol: lower the rate after failed-only intervalsEvaluates completed sample intervals even when success count is zero, preventing rate deadlock on failed links. Suppresses false
datarateChangednotifications and logging when already at the minimum rate.Adds regression test
tests/module/OnoeRateControlFailureInterval_1.test.a3e28558f1onoeratecontrol: count each failed attempt onceFixes duplicate callback accounting by counting unsuccessful feedback once and excluding give-up callbacks from total attempts.
Adds regression tests
tests/module/OnoeRateControlRetryAccounting_1.testandtests/module/OnoeRateControlRetryFeedback_1.test.00e2b95b02aarfratecontrol: follow RR-5208 packet feedback semanticsAligns recovery, probe arming, per-receiver tracking, and timer behavior with RR-5208 Appendix A. Deprecates
intervalin favor of packet timer parameters with migration documentation. Covers DCF/HCF feedback, receiver isolation, recovery, timer boundaries, and rate bounds, and adapts the showcase configuration to the packet timer.Adds/updates 14 regression tests:
tests/module/AarfRateControlFailureStreak_1.test,tests/module/AarfRateControlFreshFrameFeedback_1.test,tests/module/AarfRateControlGroupAddressed_1.test,tests/module/AarfRateControlMaximumRate_1.test,tests/module/AarfRateControlPerReceiver_1.test,tests/module/AarfRateControlRecovery_1.test,tests/module/AarfRateControlRetryFeedback_1.test,tests/module/AarfRateControlSuccessStreak_1.test,tests/module/AarfRateControlThresholdCap_1.test,tests/module/AarfRateControlThresholdOne_1.test,tests/module/AarfRateControlTimerFeedback_1.test,tests/module/AarfRateControlTimerProbe_1.test,tests/module/AarfRateControlTimerSuccessStreak_1.test, andtests/module/Ieee80211HtAntennaRateControl_1.test.Carries recorded fingerprint expectations for
showcases/wireless/ratecontrol/andshowcases/visualizer/canvas/instrumentfigures/.Architectural Surface
• Modules touched:
•
src/inet/linklayer/ieee80211/mgmt/Ieee80211AgentSta.cc•
src/inet/linklayer/ieee80211/mac/ratecontrol/OnoeRateControl.cc•
src/inet/linklayer/ieee80211/mac/ratecontrol/OnoeRateControl.h•
src/inet/linklayer/ieee80211/mac/ratecontrol/AarfRateControl.cc•
src/inet/linklayer/ieee80211/mac/ratecontrol/AarfRateControl.h•
src/inet/linklayer/ieee80211/mac/ratecontrol/AarfRateControl.ned•
doc/src/migration-guide/index.rst•
showcases/wireless/ratecontrol/omnetpp.ini•
tests/fingerprint/showcases.csv• Contracts and protocols: IEEE 802.11 MAC rate adaptation (
IRateControl/RateControlBase) and STA management lifecycle (Ieee80211AgentSta).• Packet representation: No changes to packet structures, headers, chunks, or tags.
• Configuration surface:
• In
AarfRateControl.ned, deprecatedintervalin favor ofpacketTimer(default: false),packetTimeoutInterval(default: 60s), andpacketTimeoutMaxInterval(default: 60s), documented indoc/src/migration-guide/index.rst.• Parameters
decreaseThreshold,increaseThreshold, andmaxSuccessThresholdnow operate strictly per specification.• Feature descriptors: None touched.
• Seals and audit exceptions: All modified source files under
src/inet/are unsealed. No new architectural deviations (AV-*) or naming deviations (NV-*) introduced.Verification Evidence
Compilation:
make -j$(nproc) MODE=debug && make -j$(nproc) MODE=releaseStatus: Clean build in both debug and release modes (
libINET_dbg.soandlibINET.so).Mechanical gates:
•
doc/project/enforcement/check-commits.sh upstream/master..HEAD(PASS)•
doc/project/enforcement/check-source-seals.sh --base upstream/master(PASS)•
doc/project/enforcement/check-naming.sh --base upstream/master(PASS)•
doc/project/enforcement/check-architecture.sh src/inet/linklayer/ieee80211(PASS)Direct module tests against fresh library:
•
tests/module/Ieee80211AgentStaBeaconLoss_1.test: PASS•
tests/module/OnoeRateControlFailureInterval_1.test: PASS•
tests/module/OnoeRateControlRetryAccounting_1.test: PASS•
tests/module/OnoeRateControlRetryFeedback_1.test: PASS•
tests/module/AarfRateControlFailureStreak_1.test: PASS•
tests/module/AarfRateControlFreshFrameFeedback_1.test: PASS•
tests/module/AarfRateControlGroupAddressed_1.test: PASS•
tests/module/AarfRateControlMaximumRate_1.test: PASS•
tests/module/AarfRateControlPerReceiver_1.test: PASS•
tests/module/AarfRateControlRecovery_1.test: PASS•
tests/module/AarfRateControlRetryFeedback_1.test: PASS•
tests/module/AarfRateControlSuccessStreak_1.test: PASS•
tests/module/AarfRateControlThresholdCap_1.test: PASS•
tests/module/AarfRateControlThresholdOne_1.test: PASS•
tests/module/AarfRateControlTimerFeedback_1.test: PASS•
tests/module/AarfRateControlTimerProbe_1.test: PASS•
tests/module/AarfRateControlTimerSuccessStreak_1.test: PASS•
tests/module/Ieee80211HtAntennaRateControl_1.test: PASSBaselines:
•
showcases/wireless/ratecontrol/omnetpp.iniandtests/fingerprint/showcases.csvupdated for AarfRateControl showcase changes per RR-5208 packet timer semantics (in commit00e2b95b02).•
tests/fingerprint/showcases.csvupdated forshowcases/visualizer/canvas/instrumentfigures/(InstrumentShowcaseusesAarfRateControlwithdecreaseThreshold = 4) whose trajectory shifted per RR-5208 packet timer semantics (in commit00e2b95b02).