From 734a8c46e7037075d712e3d3844467672d0f91c9 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 14 Aug 2020 12:01:31 +0200 Subject: ramips: remove legacy ethernet driver components for mt7621 The mt7621 subtarget has been switched to DSA quite a while ago and seems to run sufficiently fine. Build with older kernels than 5.4 has been disabled directly during the kernel bump, so our local ethernet driver is unused in master since then. Therefore, let's remove the mt7621-specific parts of "our" ethernet driver, so we don't have to maintain them and it's obvious to everybody that they are not used anymore. This also drops the offloading components as this was specifically implemented to depend on mt7621. Signed-off-by: Adrian Schmutzler --- .../drivers/net/ethernet/ralink/mtk_eth_soc.c | 42 +++------------------- 1 file changed, 4 insertions(+), 38 deletions(-) (limited to 'target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c') diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c index 358a8fc16d..62c186dbd6 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c @@ -960,18 +960,11 @@ static int fe_poll_rx(struct napi_struct *napi, int budget, __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), RX_DMA_VID(trxd.rxd3)); -#ifdef CONFIG_NET_RALINK_OFFLOAD - if (mtk_offload_check_rx(priv, skb, trxd.rxd4) == 0) { -#endif - stats->rx_packets++; - stats->rx_bytes += pktlen; + stats->rx_packets++; + stats->rx_bytes += pktlen; + + napi_gro_receive(napi, skb); - napi_gro_receive(napi, skb); -#ifdef CONFIG_NET_RALINK_OFFLOAD - } else { - dev_kfree_skb(skb); - } -#endif ring->rx_data[idx] = new_data; rxd->rxd1 = (unsigned int)dma_addr; @@ -1308,9 +1301,6 @@ static int fe_open(struct net_device *dev) napi_enable(&priv->rx_napi); fe_int_enable(priv->soc->tx_int | priv->soc->rx_int); netif_start_queue(dev); -#ifdef CONFIG_NET_RALINK_OFFLOAD - mtk_ppe_probe(priv); -#endif return 0; } @@ -1347,10 +1337,6 @@ static int fe_stop(struct net_device *dev) fe_free_dma(priv); -#ifdef CONFIG_NET_RALINK_OFFLOAD - mtk_ppe_remove(priv); -#endif - return 0; } @@ -1511,23 +1497,6 @@ static int fe_change_mtu(struct net_device *dev, int new_mtu) return fe_open(dev); } -#ifdef CONFIG_NET_RALINK_OFFLOAD -static int -fe_flow_offload(enum flow_offload_type type, struct flow_offload *flow, - struct flow_offload_hw_path *src, - struct flow_offload_hw_path *dest) -{ - struct fe_priv *priv; - - if (src->dev != dest->dev) - return -EINVAL; - - priv = netdev_priv(src->dev); - - return mtk_flow_offload(priv, type, flow, src, dest); -} -#endif - static const struct net_device_ops fe_netdev_ops = { .ndo_init = fe_init, .ndo_uninit = fe_uninit, @@ -1545,9 +1514,6 @@ static const struct net_device_ops fe_netdev_ops = { #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = fe_poll_controller, #endif -#ifdef CONFIG_NET_RALINK_OFFLOAD - .ndo_flow_offload = fe_flow_offload, -#endif }; static void fe_reset_pending(struct fe_priv *priv) -- cgit v1.2.3