0400-eth-fix-rx-vlan-hw-offload.patch 804 Bytes
Newer Older
Petr Štetiar's avatar
Petr Štetiar committed
1
2
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
Petr Štetiar's avatar
Petr Štetiar committed
3
@@ -1306,7 +1306,7 @@ static int mtk_poll_rx(struct napi_struc
John Crispin's avatar
John Crispin committed
4
5
6
7
8
9
10
11
 		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);
Petr Štetiar's avatar
Petr Štetiar committed
12
13
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
John Crispin's avatar
John Crispin committed
14
15
16
17
18
19
20
21
@@ -293,6 +293,7 @@
 #define RX_DMA_LSO		BIT(30)
 #define RX_DMA_PLEN0(_x)	(((_x) & 0x3fff) << 16)
 #define RX_DMA_GET_PLEN0(_x)	(((_x) >> 16) & 0x3fff)
+#define RX_DMA_VTAG		BIT(15)
 
 /* QDMA descriptor rxd3 */
 #define RX_DMA_VID(_x)		((_x) & 0xfff)