]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mt76: mt7996: fix FCS error flag check in RX descriptor
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Mon, 13 Oct 2025 09:08:24 +0000 (02:08 -0700)
committerFelix Fietkau <nbd@nbd.name>
Mon, 23 Mar 2026 09:22:52 +0000 (09:22 +0000)
The mt7996 driver currently checks the MT_RXD3_NORMAL_FCS_ERR bit in
rxd1 whereas other Connac3-based drivers(mt7925) correctly check this
bit in rxd3.

Since the MT_RXD3_NORMAL_FCS_ERR bit is defined in the fourth RX
descriptor word (rxd3), update mt7996 to use the proper descriptor
field. This change aligns mt7996 with mt7925 and the rest of the
Connac3 family.

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20251013090826.753992-1-alok.a.tiwari@oracle.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/mac.c

index 0ca908b87a467e2171a2bc03afbe49336ee52b27..9c1715f4a3b8252827c963ed1efaa5451bef5606 100644 (file)
@@ -488,7 +488,7 @@ mt7996_mac_fill_rx(struct mt7996_dev *dev, enum mt76_rxq_id q,
            !(csum_status & (BIT(0) | BIT(2) | BIT(3))))
                skb->ip_summed = CHECKSUM_UNNECESSARY;
 
-       if (rxd1 & MT_RXD3_NORMAL_FCS_ERR)
+       if (rxd3 & MT_RXD3_NORMAL_FCS_ERR)
                status->flag |= RX_FLAG_FAILED_FCS_CRC;
 
        if (rxd1 & MT_RXD1_NORMAL_TKIP_MIC_ERR)