-
Notifications
You must be signed in to change notification settings - Fork 527
Ieee80211 onwire layered fixes #1117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
levy
merged 7 commits into
inet-framework:master
from
mgonzalezlopezudc:ieee80211-onwire-layered-fixes
Jul 13, 2026
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
46187ae
fix(ieee80211): serialize sequence control little-endian
mgonzalezlopezudc bf07399
fix(ieee80211): allocate association response AID
mgonzalezlopezudc 00deeb5
fix(ieee80211): serialize legacy PHY headers on wire
mgonzalezlopezudc 5014277
fix(ieee80211): decode layered OFDM signal bytes
mgonzalezlopezudc 4e5a8c8
fix(ieee80211): track association IDs in MIB
mgonzalezlopezudc 8bae712
refactor(802.11): 24-bit OFDM SIGNAL layout helpers
mgonzalezlopezudc 1248c56
fix(802.11): ACK-gated association update in [Ieee80211MgmtAp.cc](sr…
mgonzalezlopezudc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
59 changes: 59 additions & 0 deletions
59
src/inet/physicallayer/wireless/ieee80211/packetlevel/Ieee80211OfdmSignalField.h
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| // | ||
| // Copyright (C) 2026 | ||
| // | ||
| // SPDX-License-Identifier: LGPL-3.0-or-later | ||
| // | ||
|
|
||
| #ifndef __INET_IEEE80211OFDMSIGNALFIELD_H | ||
| #define __INET_IEEE80211OFDMSIGNALFIELD_H | ||
|
|
||
| #include <cstdint> | ||
|
|
||
| namespace inet { | ||
|
|
||
| namespace physicallayer { | ||
|
|
||
| struct Ieee80211OfdmSignalField | ||
| { | ||
| uint8_t rate = 0; | ||
| bool reserved = false; | ||
| uint16_t length = 0; | ||
| bool parity = false; | ||
| uint8_t tail = 0; | ||
| }; | ||
|
|
||
| inline uint32_t packIeee80211OfdmSignalField(uint8_t rate, bool reserved, uint16_t length, bool parity, uint8_t tail) | ||
| { | ||
| // IEEE Std 802.11-2024 Figure 17-5 and 17.3.4: SIGNAL bit 0 is RATE bit | ||
| // R1 and the LSB is transmitted first. | ||
| return static_cast<uint32_t>(rate & 0xF) | | ||
| (reserved ? 0x10 : 0) | | ||
| (static_cast<uint32_t>(length & 0xFFF) << 5) | | ||
| (parity ? 0x20000 : 0) | | ||
| (static_cast<uint32_t>(tail & 0x3F) << 18); | ||
| } | ||
|
|
||
| inline Ieee80211OfdmSignalField unpackIeee80211OfdmSignalField(uint32_t signal) | ||
| { | ||
| Ieee80211OfdmSignalField field; | ||
| field.rate = static_cast<uint8_t>(signal & 0xF); | ||
| field.reserved = (signal & 0x10) != 0; | ||
| field.length = static_cast<uint16_t>((signal >> 5) & 0xFFF); | ||
| field.parity = (signal & 0x20000) != 0; | ||
| field.tail = static_cast<uint8_t>((signal >> 18) & 0x3F); | ||
| return field; | ||
| } | ||
|
|
||
| inline Ieee80211OfdmSignalField unpackIeee80211OfdmSignalField(uint8_t byte0, uint8_t byte1, uint8_t byte2) | ||
| { | ||
| uint32_t signal = static_cast<uint32_t>(byte0) | | ||
| (static_cast<uint32_t>(byte1) << 8) | | ||
| (static_cast<uint32_t>(byte2) << 16); | ||
| return unpackIeee80211OfdmSignalField(signal); | ||
| } | ||
|
|
||
| } // namespace physicallayer | ||
|
|
||
| } // namespace inet | ||
|
|
||
| #endif |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚩 Reassociation handler missing sendAssocNotification unlike association handler
In
handleAssociationRequestFrame(Ieee80211MgmtAp.cc:233), when a STA transitions to ASSOCIATED,sendAssocNotificationis called. However,handleReassociationRequestFrame(Ieee80211MgmtAp.cc:268-269) sets the station to ASSOCIATED without callingsendAssocNotification. This is a pre-existing inconsistency not introduced by this PR, but since the PR touched this function to addallocateAssociationId, 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved in the last commit added to the PR