diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-04-23 08:20:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-23 23:31:57 +0300 |
commit | 3f57d8c40fea9b20543cab4da12f4680d2ef182c (patch) | |
tree | 61a5a245c7117cfc6c4bbc810554d5909037b433 /drivers/net/ethernet/mediatek/mtk_eth_soc.c | |
parent | d90a94680bc0a8069d93282bc5f2966d00b9c4a4 (diff) | |
download | linux-3f57d8c40fea9b20543cab4da12f4680d2ef182c.tar.xz |
net: ethernet: mtk_eth_soc: fix RX VLAN offload
The VLAN ID in the rx descriptor is only valid if the RX_DMA_VTAG bit is
set. Fixes frames wrongly marked with VLAN tags.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
[Ilya: fix commit message]
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mediatek/mtk_eth_soc.c')
-rw-r--r-- | drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 6b00c12c6c43..b2175ec451ab 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -1319,7 +1319,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget, skb->protocol = eth_type_trans(skb, netdev); if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX && - RX_DMA_VID(trxd.rxd3)) + (trxd.rxd2 & RX_DMA_VTAG)) __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), RX_DMA_VID(trxd.rxd3)); skb_record_rx_queue(skb, 0); |