diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-03-23 14:29:00 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-04-03 10:40:09 +0200 |
commit | c9262a96d1fc0a7fb1ba0806acb3b7aae00b1ecf (patch) | |
tree | 4aa71736956430fc63331ec1fed9c0ff5860caf4 /target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7621.c | |
parent | 701b8d0050b4d12907ee751fcd4ed6496b9f10fc (diff) | |
download | upstream-c9262a96d1fc0a7fb1ba0806acb3b7aae00b1ecf.tar.gz upstream-c9262a96d1fc0a7fb1ba0806acb3b7aae00b1ecf.tar.bz2 upstream-c9262a96d1fc0a7fb1ba0806acb3b7aae00b1ecf.zip |
ramips: implement vlan rx offload on MT7621
Avoids the overhead of software VLAN untagging in the network stack
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7621.c')
-rw-r--r-- | target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7621.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7621.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7621.c index 392e0ea2e5..26a198fa2b 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7621.c +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7621.c @@ -122,7 +122,7 @@ static int mt7621_fwd_config(struct fe_priv *priv) /* mt7621 doesn't have txcsum config */ mt7621_rxcsum_config((dev->features & NETIF_F_RXCSUM)); - mt7621_rxvlan_config(priv->flags & FE_FLAG_RX_VLAN_CTAG); + mt7621_rxvlan_config(dev->features & NETIF_F_HW_VLAN_CTAG_RX); return 0; } @@ -142,7 +142,8 @@ static void mt7621_init_data(struct fe_soc_data *data, FE_FLAG_HAS_SWITCH | FE_FLAG_JUMBO_FRAME; netdev->hw_features = NETIF_F_IP_CSUM | NETIF_F_RXCSUM | - NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_SG | NETIF_F_TSO | + NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX | + NETIF_F_SG | NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_IPV6_CSUM | NETIF_F_TSO_MANGLEID; } |