diff options
Diffstat (limited to 'drivers/net/sfc/ethtool.c')
-rw-r--r-- | drivers/net/sfc/ethtool.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index 08a9db993743..0a79ec7d45ee 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c | |||
@@ -468,6 +468,19 @@ static void efx_ethtool_get_stats(struct net_device *net_dev, | |||
468 | } | 468 | } |
469 | } | 469 | } |
470 | 470 | ||
471 | static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable) | ||
472 | { | ||
473 | struct efx_nic *efx = netdev_priv(net_dev); | ||
474 | unsigned long features = efx->type->offload_features & NETIF_F_ALL_CSUM; | ||
475 | |||
476 | if (enable) | ||
477 | net_dev->features |= features; | ||
478 | else | ||
479 | net_dev->features &= ~features; | ||
480 | |||
481 | return 0; | ||
482 | } | ||
483 | |||
471 | static int efx_ethtool_set_rx_csum(struct net_device *net_dev, u32 enable) | 484 | static int efx_ethtool_set_rx_csum(struct net_device *net_dev, u32 enable) |
472 | { | 485 | { |
473 | struct efx_nic *efx = netdev_priv(net_dev); | 486 | struct efx_nic *efx = netdev_priv(net_dev); |
@@ -813,7 +826,8 @@ const struct ethtool_ops efx_ethtool_ops = { | |||
813 | .get_rx_csum = efx_ethtool_get_rx_csum, | 826 | .get_rx_csum = efx_ethtool_get_rx_csum, |
814 | .set_rx_csum = efx_ethtool_set_rx_csum, | 827 | .set_rx_csum = efx_ethtool_set_rx_csum, |
815 | .get_tx_csum = ethtool_op_get_tx_csum, | 828 | .get_tx_csum = ethtool_op_get_tx_csum, |
816 | .set_tx_csum = ethtool_op_set_tx_csum, | 829 | /* Need to enable/disable IPv6 too */ |
830 | .set_tx_csum = efx_ethtool_set_tx_csum, | ||
817 | .get_sg = ethtool_op_get_sg, | 831 | .get_sg = ethtool_op_get_sg, |
818 | .set_sg = ethtool_op_set_sg, | 832 | .set_sg = ethtool_op_set_sg, |
819 | .get_tso = ethtool_op_get_tso, | 833 | .get_tso = ethtool_op_get_tso, |