From: Alexander Duyck Date: Wed, 17 Nov 2010 03:27:04 +0000 (-0800) Subject: ixgbe: cleanup ixgbe_set_tx_csum ethtool flags configuration X-Git-Url: https://bbs.cooldavid.org/git/?p=net-next-2.6.git;a=commitdiff_plain;h=e2b4e216b7e9da09175c76887c754489681533b9 ixgbe: cleanup ixgbe_set_tx_csum ethtool flags configuration This change makes it so that we always disable SCTP regardless of mac type since we shouldn't need to check mac type before disabling a feature that isn't supported on a given piece of hardware. Signed-off-by: Alexander Duyck Tested-by: Ross Brattain Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 9483faf91ea..f61a8ce908e 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c @@ -425,13 +425,12 @@ static int ixgbe_set_tx_csum(struct net_device *netdev, u32 data) struct ixgbe_adapter *adapter = netdev_priv(netdev); if (data) { - netdev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM); + netdev->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; if (adapter->hw.mac.type == ixgbe_mac_82599EB) netdev->features |= NETIF_F_SCTP_CSUM; } else { - netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM); - if (adapter->hw.mac.type == ixgbe_mac_82599EB) - netdev->features &= ~NETIF_F_SCTP_CSUM; + netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | + NETIF_F_SCTP_CSUM); } return 0;