Ieee80211 onwire layered fixes#1117
Open
mgonzalezlopezudc wants to merge 7 commits into
Open
Conversation
Added [Ieee80211OfdmSignalField.h](src/inet/physicallayer/wireless/ieee80211/packetlevel/Ieee80211OfdmSignalField.h) with shared `packIeee80211OfdmSignalField()` / `unpackIeee80211OfdmSignalField()` helpers for the 24-bit OFDM SIGNAL layout. Then updated: - [Ieee80211PhyHeaderSerializer.cc](src/inet/physicallayer/wireless/ieee80211/packetlevel/Ieee80211PhyHeaderSerializer.cc) to use the shared helper instead of its private `packOfdmSignal()` logic. - [Ieee80211OfdmRadio.cc](src/inet/physicallayer/wireless/ieee80211/bitlevel/Ieee80211OfdmRadio.cc) to use the same unpack helper in `decapsulate()` instead of duplicating the bit masks inline.
There was a problem hiding this comment.
🚩 Reassociation handler missing sendAssocNotification unlike association handler
In handleAssociationRequestFrame (Ieee80211MgmtAp.cc:233), when a STA transitions to ASSOCIATED, sendAssocNotification is called. However, handleReassociationRequestFrame (Ieee80211MgmtAp.cc:268-269) sets the station to ASSOCIATED without calling sendAssocNotification. This is a pre-existing inconsistency not introduced by this PR, but since the PR touched this function to add allocateAssociationId, it may be worth addressing in the same change for completeness.
(Refers to lines 268-269)
Was this helpful? React with 👍 or 👎 to provide feedback.
Contributor
Author
There was a problem hiding this comment.
Solved in the last commit added to the PR
…/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtAp.cc) and added the needed signal overload in [Ieee80211MgmtAp.h](src/inet/linklayer/ieee80211/mgmt/Ieee80211MgmtAp.h). The AP now waits for `frameSequenceFinishedSignal`, verifies the response frame was ACKed, then marks the STA associated. I removed the eager association/reassociation state writes and the TODO comments.
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.
Summary
This PR fixes several IEEE 802.11 on-wire encoding issues in legacy MAC/PHY serialization and aligns the layered/bitlevel OFDM receive path with the byte representation produced by the packet-level serializers.
Since this PR affects on-wire encoding, fingerprint tests do not PASS. If the PR is accepted, fingerprints should be updated.
The fixes cover:
Motivation
Several serialized IEEE 802.11 fields did not match the bit/octet layout defined by the standard. This affected packet bytes, PCAP output, and fingerprint tests that include packet data.
The affected cases are not model-level semantic changes; they are corrections to how existing MAC/PHY fields are represented on the wire.
Details
Sequence Control
The Sequence Control field is now packed as:
and serialized/deserialized using the MAC field octet order.
IEEE Std 802.11-2024 references:
Association/Reassociation Response AID
Association and Reassociation Responses now return a real AP-assigned AID instead of zero.
IEEE Std 802.11-2024 references:
This PR adds minimal AID tracking to the MIB, reuses the same AID for repeated association by the same STA, and releases it when the AP transitions the STA out of the associated state.
DSSS / HR-DSSS PHY header serialization
DSSS and HR-DSSS PHY headers are now serialized as the actual 48-bit PHY header:
This removes non-standard leading padding bytes from the serialized header.
IEEE Std 802.11-2024 references:
OFDM / ERP-OFDM PHY header serialization
The OFDM SIGNAL field is now packed as the 24-bit on-wire field:
The SERVICE field remains the following 16-bit field.
IEEE Std 802.11-2024 references:
Layered/bitlevel OFDM receive path
The layered OFDM receiver now reads RATE from the low nibble of the first SIGNAL byte, matching the corrected SIGNAL byte layout.
The bitlevel OFDM radio decapsulation path now handles byte-represented OFDM PHY headers by parsing the 5-byte header representation directly and stripping the trailer defensively.