Skip to content

nl80211: fix HE MCS set parsing#386

Merged
jow- merged 1 commit intojow-:masterfrom
nbd168:nl80211
Mar 23, 2026
Merged

nl80211: fix HE MCS set parsing#386
jow- merged 1 commit intojow-:masterfrom
nbd168:nl80211

Conversation

@nbd168
Copy link
Copy Markdown
Contributor

@nbd168 nbd168 commented Mar 21, 2026

The Channel Width Set bits occupy B1-B4 of byte 0 of he_cap_phy. Since this attribute is a byte array, not an integer, reading it via nla_get_u16() produces an endian-dependent result. The << 8 shift was correct on big-endian but wrong on little-endian.

Fix this by reading byte 0 directly as a uint8_t, making the check endian-neutral.

The Channel Width Set bits occupy B1-B4 of byte 0 of he_cap_phy.
Since this attribute is a byte array, not an integer, reading it via
nla_get_u16() produces an endian-dependent result. The << 8 shift was
correct on big-endian but wrong on little-endian.

Fix this by reading byte 0 directly as a uint8_t, making the check
endian-neutral.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
@jow- jow- merged commit 763d8c3 into jow-:master Mar 23, 2026
2 checks passed
@jow-
Copy link
Copy Markdown
Owner

jow- commented Mar 23, 2026

Merged, thanks!

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.

2 participants