Skip to content

ieee80211: separate capability and BSS state ownership - #1216

Open
mgonzalezlopezudc wants to merge 3 commits into
inet-framework:masterfrom
mgonzalezlopezudc:refactor/ieee80211-htcapop-v3
Open

mgonzalezlopezudc wants to merge 3 commits into
inet-framework:masterfrom
mgonzalezlopezudc:refactor/ieee80211-htcapop-v3

Conversation

@mgonzalezlopezudc

@mgonzalezlopezudc mgonzalezlopezudc commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Refactor IEEE 802.11 capability preparation and BSS/peer-state ownership around explicit typed
contracts and deterministic initialization dependencies.

The MAC assembles an idempotent local capability profile from typed PHY contributors. Management
owns accepted BSS, operation and peer transitions, while the MIB stores the committed view and
publishes changes after the associated bookkeeping is complete. Catalog consumers use a narrow
read-only mode-set provider; management-only preparation is exposed through the extended MAC
configuration provider.

The series also preserves the simplified legacy-STA abstraction: a legacy STA associated with an
HT AP retains the BSS identity, channel and association state but does not install HT operation.

Review order

  1. common: change: prepare interface identity before link-layer users establishes the shared
    readiness prerequisite and identifies the implementation plan.
  2. ieee80211: change: separate capability and BSS state ownership introduces the typed contracts,
    migrates consumers, and includes the simplified legacy-STA capability gate and lifecycle tests.
  3. ieee80211: refactor: separate the read-only mode-set provider narrows catalog-only consumers.

No fingerprint or statistical baseline is changed.

Architectural and compatibility surface

The change affects the common initialization-stage graph, IEEE 802.11 MAC, management and MIB
ownership, PHY capability contracts, mode-set/catalog consumers, NED provider wiring, and the
corresponding unit, module and protocol fixtures. Public C++ and NED provider APIs change; the
release notes and migration guide document the provider and notification-lifetime changes.

The implementation does not change MSG inputs, on-air field serialization, packet representation,
feature descriptors, statistical baselines, or files under the sealed common/packet/ subtree.
The synthetic 20/40 MHz management and selection fixtures do not claim real 40 MHz packet-PHY
support, and the external-upper fixture does not claim real TAP I/O.

Validation

Validation across the series includes debug builds for the focused commit points and a release build
for the main implementation, followed by focused tests covering:

  • HT capability preparation, peer-mode selection and MIB association IDs;
  • capability-provider substitution, configuration contracts, BSS notifications, AP/STA lifecycle,
    simplified initialization, reassociation and channel changes;
  • association, HT association, reassociation and deauthentication protocol exchanges; and
  • the legacy MacNonQos and MacQos ad hoc fingerprints, run 0, 10 seconds, with unchanged
    tplx expectations, plus 18 unchanged Wi-Fi/Ethernet/VLAN/configurator fingerprint cases.

Scoped architecture checks for the IEEE 802.11 MAC and PHY paths pass. Interface checking reports
only the existing AV-CONTRACT-02 bodies. No recorded baseline changed.

The exact implementation plan and its evidence are tracked in
the implementation plan and
the evidence companion.

Validation is deterministic and uses the checked-in configurations, run 0 and seed 0/default where
applicable. The recorded evidence does not claim performance results, real TAP I/O, a complete
feature-disabled campaign, or a full repository-wide cross-protocol initialization campaign.

Reproducible local cleanup verification

Each of the three output commits passed make MODE=debug -j8 and the selected legacy fingerprints.
The common prerequisite passed three initialization/lifecycle module cases; both WLAN commit points
passed the following nine module and three unit cases. The final source tree is identical to the
previously audited 7058073ea84ba90394a7ee16a971b30de06433ef.

# Repository root, each commit:
make MODE=debug -j8
# Common prerequisite:
inet_run_module_tests -m debug -f 'Ieee80211(HtAssociation|MgmtStaSimplifiedInitialization|MgmtApLifecycle)_1\.test'
# Both WLAN commit points:
inet_run_module_tests -m debug -f 'Ieee80211(HtAssociation|HtCapabilityPreparation|ConfigurationContracts|MgmtStaBeaconUpdate|MgmtStaSimplifiedInitialization|MgmtApLifecycle|MgmtStaLifecycle|MgmtApReassociationSnapshot|MgmtApChannelChange)_1\.test'
inet_run_unit_tests -m debug -f 'Ieee80211(HtCapabilities|PeerModeSelection|MibAssociationId)_1\.test'

The two fingerprints were executed through opp_repl --load @opp -p inet after setting INET_ROOT
to the checkout, using this exact scoped call and a temporary JSON projection of the unchanged CSV
expectations (MacNonQos=5749-0281/tplx, MacQos=1486-cbae/tplx):

p = get_default_simulation_project()
p.fingerprint_store = "/tmp/pr1216-cleanup-v2/csv-expectations.json"
configs = [SimulationConfig(p, "examples/adhoc/qos", config=c, num_runs=1, sim_time_limit="10s")
           for c in ["MacNonQos", "MacQos"]]
r = run_fingerprint_tests(simulation_configs=configs, mode="debug", run_number=0,
                          ingredients_list=["tplx"], sim_time_limit="10s",
                          build=False, concurrent=False)

Both cases passed on the original head and every rewritten commit, with unchanged expectations.
Fixtures used run 0 and seed 0/default. No new release, feature-disabled, full-protocol or full
cross-protocol campaign was run during this cleanup; broader validation above is prior evidence.

@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the refactor/ieee80211-htcapop-v3 branch from b2bbc26 to 8a9a626 Compare September 18, 2026 18:37
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
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