]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mt76: fix argument to ieee80211_is_first_frag()
authorBjoern A. Zeeb <bz@FreeBSD.org>
Tue, 31 Mar 2026 22:05:47 +0000 (22:05 +0000)
committerFelix Fietkau <nbd@nbd.name>
Tue, 9 Jun 2026 10:15:22 +0000 (10:15 +0000)
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>
drivers/net/wireless/mediatek/mt76/mac80211.c

index dd09ef1bd0c25afe280cf4042fb56e2cce335df8..13c4e8abe281916c41ca8c7cd5c3378d24b3613d 100644 (file)
@@ -1323,7 +1323,7 @@ mt76_check_ccmp_pn(struct sk_buff *skb)
                 * All further fragments will be validated by mac80211 only.
                 */
                if (ieee80211_is_frag(hdr) &&
-                   !ieee80211_is_first_frag(hdr->frame_control))
+                   !ieee80211_is_first_frag(hdr->seq_ctrl))
                        return;
        }