diff options
Diffstat (limited to 'drivers/net/sfc/ethtool.c')
-rw-r--r-- | drivers/net/sfc/ethtool.c | 45 |
1 files changed, 2 insertions, 43 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index 8a15be6548d2..ccd82f12456c 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c | |||
@@ -32,8 +32,6 @@ const char *efx_loopback_mode_names[] = { | |||
32 | [LOOPBACK_NETWORK] = "NETWORK", | 32 | [LOOPBACK_NETWORK] = "NETWORK", |
33 | }; | 33 | }; |
34 | 34 | ||
35 | static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable); | ||
36 | |||
37 | struct ethtool_string { | 35 | struct ethtool_string { |
38 | char name[ETH_GSTRING_LEN]; | 36 | char name[ETH_GSTRING_LEN]; |
39 | }; | 37 | }; |
@@ -442,45 +440,6 @@ static void efx_ethtool_get_stats(struct net_device *net_dev, | |||
442 | } | 440 | } |
443 | } | 441 | } |
444 | 442 | ||
445 | static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable) | ||
446 | { | ||
447 | int rc; | ||
448 | |||
449 | /* Our TSO requires TX checksumming, so force TX checksumming | ||
450 | * on when TSO is enabled. | ||
451 | */ | ||
452 | if (enable) { | ||
453 | rc = efx_ethtool_set_tx_csum(net_dev, 1); | ||
454 | if (rc) | ||
455 | return rc; | ||
456 | } | ||
457 | |||
458 | return ethtool_op_set_tso(net_dev, enable); | ||
459 | } | ||
460 | |||
461 | static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable) | ||
462 | { | ||
463 | struct efx_nic *efx = netdev_priv(net_dev); | ||
464 | int rc; | ||
465 | |||
466 | rc = ethtool_op_set_tx_csum(net_dev, enable); | ||
467 | if (rc) | ||
468 | return rc; | ||
469 | |||
470 | efx_flush_queues(efx); | ||
471 | |||
472 | /* Our TSO requires TX checksumming, so disable TSO when | ||
473 | * checksumming is disabled | ||
474 | */ | ||
475 | if (!enable) { | ||
476 | rc = efx_ethtool_set_tso(net_dev, 0); | ||
477 | if (rc) | ||
478 | return rc; | ||
479 | } | ||
480 | |||
481 | return 0; | ||
482 | } | ||
483 | |||
484 | static int efx_ethtool_set_rx_csum(struct net_device *net_dev, u32 enable) | 443 | static int efx_ethtool_set_rx_csum(struct net_device *net_dev, u32 enable) |
485 | { | 444 | { |
486 | struct efx_nic *efx = netdev_priv(net_dev); | 445 | struct efx_nic *efx = netdev_priv(net_dev); |
@@ -701,11 +660,11 @@ struct ethtool_ops efx_ethtool_ops = { | |||
701 | .get_rx_csum = efx_ethtool_get_rx_csum, | 660 | .get_rx_csum = efx_ethtool_get_rx_csum, |
702 | .set_rx_csum = efx_ethtool_set_rx_csum, | 661 | .set_rx_csum = efx_ethtool_set_rx_csum, |
703 | .get_tx_csum = ethtool_op_get_tx_csum, | 662 | .get_tx_csum = ethtool_op_get_tx_csum, |
704 | .set_tx_csum = efx_ethtool_set_tx_csum, | 663 | .set_tx_csum = ethtool_op_set_tx_csum, |
705 | .get_sg = ethtool_op_get_sg, | 664 | .get_sg = ethtool_op_get_sg, |
706 | .set_sg = ethtool_op_set_sg, | 665 | .set_sg = ethtool_op_set_sg, |
707 | .get_tso = ethtool_op_get_tso, | 666 | .get_tso = ethtool_op_get_tso, |
708 | .set_tso = efx_ethtool_set_tso, | 667 | .set_tso = ethtool_op_set_tso, |
709 | .get_flags = ethtool_op_get_flags, | 668 | .get_flags = ethtool_op_get_flags, |
710 | .set_flags = ethtool_op_set_flags, | 669 | .set_flags = ethtool_op_set_flags, |
711 | .self_test_count = efx_ethtool_self_test_count, | 670 | .self_test_count = efx_ethtool_self_test_count, |