aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_ethtool.c
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2009-04-27 18:36:35 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-28 04:53:15 -0400
commit45a5ead0220cc7cc70f6961879decffbd0a54cc0 (patch)
treeb9e038ea11b3fbfe0d5ed7ca4f38fc0fc1b7f0b2 /drivers/net/ixgbe/ixgbe_ethtool.c
parentb9473560c6d882e0fbd3a8817e906c847b11c722 (diff)
ixgbe: enable hardware offload for sctp
Inspired by: Vlad Yasevich <vladislav.yasevich@hp.com> This is the code to enable ixgbe for hardware offload support of CRC32c on both transmit and receive of SCTP traffic. only 82599 supports this offload, not 82598. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_ethtool.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index f0a20facc650..a499b6b31ca2 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -311,10 +311,17 @@ static u32 ixgbe_get_tx_csum(struct net_device *netdev)
311 311
312static int ixgbe_set_tx_csum(struct net_device *netdev, u32 data) 312static int ixgbe_set_tx_csum(struct net_device *netdev, u32 data)
313{ 313{
314 if (data) 314 struct ixgbe_adapter *adapter = netdev_priv(netdev);
315
316 if (data) {
315 netdev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM); 317 netdev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
316 else 318 if (adapter->hw.mac.type == ixgbe_mac_82599EB)
319 netdev->features |= NETIF_F_SCTP_CSUM;
320 } else {
317 netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM); 321 netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
322 if (adapter->hw.mac.type == ixgbe_mac_82599EB)
323 netdev->features &= ~NETIF_F_SCTP_CSUM;
324 }
318 325
319 return 0; 326 return 0;
320} 327}