aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sfc/ethtool.c')
-rw-r--r--drivers/net/sfc/ethtool.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index 5492b6336602..f6981216f1fc 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -471,6 +471,23 @@ static void efx_ethtool_get_stats(struct net_device *net_dev,
471 } 471 }
472} 472}
473 473
474static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable)
475{
476 struct efx_nic *efx __attribute__ ((unused)) = netdev_priv(net_dev);
477 unsigned long features;
478
479 features = NETIF_F_TSO;
480 if (efx->type->offload_features & NETIF_F_V6_CSUM)
481 features |= NETIF_F_TSO6;
482
483 if (enable)
484 net_dev->features |= features;
485 else
486 net_dev->features &= ~features;
487
488 return 0;
489}
490
474static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable) 491static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable)
475{ 492{
476 struct efx_nic *efx = netdev_priv(net_dev); 493 struct efx_nic *efx = netdev_priv(net_dev);
@@ -834,7 +851,8 @@ const struct ethtool_ops efx_ethtool_ops = {
834 .get_sg = ethtool_op_get_sg, 851 .get_sg = ethtool_op_get_sg,
835 .set_sg = ethtool_op_set_sg, 852 .set_sg = ethtool_op_set_sg,
836 .get_tso = ethtool_op_get_tso, 853 .get_tso = ethtool_op_get_tso,
837 .set_tso = ethtool_op_set_tso, 854 /* Need to enable/disable TSO-IPv6 too */
855 .set_tso = efx_ethtool_set_tso,
838 .get_flags = ethtool_op_get_flags, 856 .get_flags = ethtool_op_get_flags,
839 .set_flags = ethtool_op_set_flags, 857 .set_flags = ethtool_op_set_flags,
840 .get_sset_count = efx_ethtool_get_sset_count, 858 .get_sset_count = efx_ethtool_get_sset_count,