diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2009-04-27 18:36:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-28 04:53:14 -0400 |
commit | b9473560c6d882e0fbd3a8817e906c847b11c722 (patch) | |
tree | e183dd56fc93e201c92e596b5603e6ebb99776a1 /drivers/net/igb/igb_ethtool.c | |
parent | 8dc92f7e2ecfd93f5c57da78594a7a5482e2c15e (diff) |
igb: Enable SCTP checksum offloading
Originally from: Vlad Yasevich <vladislav.yasevich@hp.com>
This patch, both the driver portion and the sctp code was
modified by Jesse Brandeburg and is
Copyright(c) 2009 Intel Corporation.
Thanks go to Vlad for starting this work.
Intel 82576 chipset supports SCTP checksum offloading. This
patch enables this functionality in the driver. A new NETIF
feature is introduced for SCTP checksum offload. If the driver
supports CRC32c checksum, it can set this feature flag. The
hardware can offload both transmit and receive.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.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/igb/igb_ethtool.c')
-rw-r--r-- | drivers/net/igb/igb_ethtool.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index 27eae49e79c2..b1367ce6586e 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c | |||
@@ -293,10 +293,16 @@ static u32 igb_get_tx_csum(struct net_device *netdev) | |||
293 | 293 | ||
294 | static int igb_set_tx_csum(struct net_device *netdev, u32 data) | 294 | static int igb_set_tx_csum(struct net_device *netdev, u32 data) |
295 | { | 295 | { |
296 | if (data) | 296 | struct igb_adapter *adapter = netdev_priv(netdev); |
297 | |||
298 | if (data) { | ||
297 | netdev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM); | 299 | netdev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM); |
298 | else | 300 | if (adapter->hw.mac.type == e1000_82576) |
299 | netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM); | 301 | netdev->features |= NETIF_F_SCTP_CSUM; |
302 | } else { | ||
303 | netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | | ||
304 | NETIF_F_SCTP_CSUM); | ||
305 | } | ||
300 | 306 | ||
301 | return 0; | 307 | return 0; |
302 | } | 308 | } |