提交 e2b4e216 编写于 作者: A Alexander Duyck 提交者: Jeff Kirsher

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: NAlexander Duyck <alexander.h.duyck@intel.com>
Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 bd508178
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册