aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/ethtool.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-06-23 07:31:28 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-25 01:13:24 -0400
commit39c9cf07077146b14ab077a0e27c869c6f0e6199 (patch)
treee30b746b36ebb36af8776658e8ce3f8bcd4e118d /drivers/net/sfc/ethtool.c
parent2822235278c6385191a590c63098e728d0062987 (diff)
sfc: Record hardware RX hash on each skb where possible
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/ethtool.c')
-rw-r--r--drivers/net/sfc/ethtool.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index dde21a890855..7693cfbf9cf4 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -546,6 +546,17 @@ static u32 efx_ethtool_get_rx_csum(struct net_device *net_dev)
546 return efx->rx_checksum_enabled; 546 return efx->rx_checksum_enabled;
547} 547}
548 548
549static int efx_ethtool_set_flags(struct net_device *net_dev, u32 data)
550{
551 struct efx_nic *efx = netdev_priv(net_dev);
552 u32 supported = efx->type->offload_features & ETH_FLAG_RXHASH;
553
554 if (data & ~supported)
555 return -EOPNOTSUPP;
556
557 return ethtool_op_set_flags(net_dev, data);
558}
559
549static void efx_ethtool_self_test(struct net_device *net_dev, 560static void efx_ethtool_self_test(struct net_device *net_dev,
550 struct ethtool_test *test, u64 *data) 561 struct ethtool_test *test, u64 *data)
551{ 562{
@@ -888,6 +899,7 @@ const struct ethtool_ops efx_ethtool_ops = {
888 /* Need to enable/disable TSO-IPv6 too */ 899 /* Need to enable/disable TSO-IPv6 too */
889 .set_tso = efx_ethtool_set_tso, 900 .set_tso = efx_ethtool_set_tso,
890 .get_flags = ethtool_op_get_flags, 901 .get_flags = ethtool_op_get_flags,
902 .set_flags = efx_ethtool_set_flags,
891 .get_sset_count = efx_ethtool_get_sset_count, 903 .get_sset_count = efx_ethtool_get_sset_count,
892 .self_test = efx_ethtool_self_test, 904 .self_test = efx_ethtool_self_test,
893 .get_strings = efx_ethtool_get_strings, 905 .get_strings = efx_ethtool_get_strings,