Skip to content

Backport ieee80211_is_first_frag() fix from upstream#21

Merged
HiGarfield merged 1 commit into
masterfrom
copilot/backport-fixes-from-upstream
Jun 10, 2026
Merged

Backport ieee80211_is_first_frag() fix from upstream#21
HiGarfield merged 1 commit into
masterfrom
copilot/backport-fixes-from-upstream

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Backports necessary fixes from upstream openwrt/mt76 (latest 20 commits analyzed).

Changes

Applied 1 fix:

  • 03644ac1: Fix argument to ieee80211_is_first_frag() in CCMP PN validation

The function expects seq_ctrl but was incorrectly passed frame_control, causing potential validation errors:

// Before (incorrect)
if (ieee80211_is_frag(hdr) &&
    !ieee80211_is_first_frag(hdr->frame_control))

// After (correct)
if (ieee80211_is_frag(hdr) &&
    !ieee80211_is_first_frag(hdr->seq_ctrl))

19 commits not applicable:

  • mt7921/mt7925/mt7996/mt792x driver fixes (drivers not present in this repo)
  • mt76_register_debugfs_fops changes (this repo uses mt76_register_debugfs)
  • mt7915 tx_retries fix (code path not present in this repo's mt7915 implementation)

All commits retain original authorship and commit messages from upstream.

ieee80211_is_first_frag() operates on the seq_ctrl not the frame_control
header field. Pass the correct one in; otherwise the results may vary.

Sponsored by: The FreeBSD Foundation
Fixes: 30ce7f4456ae4 ("mt76: validate rx CCMP PN")
Link: https://cgit.freebsd.org/src/commit/sys/contrib/dev/mediatek/mt76/mac80211.c?id=c67fd35e58c6ee1e19877a7fe5998885683abedc
Signed-off-by: Bjoern A. Zeeb <bz@FreeBSD.org>
Link: https://patch.msgid.link/83s4psnr-popo-8789-757o-npr2n9n7rs2o@SerrOFQ.bet
Signed-off-by: Felix Fietkau <nbd@nbd.name>
@HiGarfield HiGarfield marked this pull request as ready for review June 10, 2026 15:31
Copilot AI review requested due to automatic review settings June 10, 2026 15:31
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backports an upstream mac80211 interoperability fix into this mt76 codebase by correcting the argument passed to ieee80211_is_first_frag() during CCMP PN validation, preventing fragment-handling misclassification.

Changes:

  • Fixes CCMP PN fragment validation by passing hdr->seq_ctrl (sequence control) to ieee80211_is_first_frag() instead of hdr->frame_control.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HiGarfield HiGarfield merged commit 2b57ce8 into master Jun 10, 2026
1 check passed
@HiGarfield HiGarfield deleted the copilot/backport-fixes-from-upstream branch June 10, 2026 15:36
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.

3 participants