wifi: mt76: mt7996: fix header translation logic
authorRyder Lee <ryder.lee@mediatek.com>
Wed, 26 Apr 2023 23:05:15 +0000 (07:05 +0800)
committerFelix Fietkau <nbd@nbd.name>
Tue, 25 Jul 2023 19:59:40 +0000 (21:59 +0200)
commitc55b4e788f1dd6ca89cc97cf291d2a03b0b96de1
tree975beba6db1666261ea0bf82db3c7c2cb8b9d541
parent98c4d0abf5c478db1ad126ff0c187dbb84c0803c
wifi: mt76: mt7996: fix header translation logic

When header translation failure is indicated, the hardware will insert
an extra 2-byte field containing the data length after the protocol
type field. This happens either when the LLC-SNAP pattern did not match,
or if a VLAN header was detected.

The previous commit accidentally breaks the logic, so reverts back.

Fixes: 27db47ab1f47 (wifi: mt76: mt7996: enable mesh HW amsdu/de-amsdu support)
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/mac.c