ramips: remove legacy ethernet driver components for mt7621
[openwrt/.git] / target / linux / ramips / files / drivers / net / ethernet / ralink / mtk_eth_soc.c
index 358a8fc16dcc214f39038ec26059000cea994a0b..62c186dbd6167b8676a161ae268db1e65c705fed 100644 (file)
@@ -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)