45af898cf003b8039e9b9b433d034d6f804c510f
[openwrt/staging/pepe2k.git] /
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Thu, 27 Oct 2022 19:50:31 +0200
3 Subject: [PATCH] net: ethernet: mtk_eth_soc: account for vlan in rx
4 header length
5
6 The network stack assumes that devices can handle an extra VLAN tag without
7 increasing the MTU
8
9 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 ---
11
12 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
13 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
14 @@ -29,7 +29,7 @@
15 #define MTK_TX_DMA_BUF_LEN_V2 0xffff
16 #define MTK_DMA_SIZE 512
17 #define MTK_MAC_COUNT 2
18 -#define MTK_RX_ETH_HLEN (ETH_HLEN + ETH_FCS_LEN)
19 +#define MTK_RX_ETH_HLEN (VLAN_ETH_HLEN + ETH_FCS_LEN)
20 #define MTK_RX_HLEN (NET_SKB_PAD + MTK_RX_ETH_HLEN + NET_IP_ALIGN)
21 #define MTK_DMA_DUMMY_DESC 0xffffffff
22 #define MTK_DEFAULT_MSG_ENABLE (NETIF_MSG_DRV | \