aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c11
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c9
2 files changed, 18 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}
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 42b803d5cfd3..c3dff8f02e33 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -4189,12 +4189,18 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter,
4189 if (ip_hdr(skb)->protocol == IPPROTO_TCP) 4189 if (ip_hdr(skb)->protocol == IPPROTO_TCP)
4190 type_tucmd_mlhl |= 4190 type_tucmd_mlhl |=
4191 IXGBE_ADVTXD_TUCMD_L4T_TCP; 4191 IXGBE_ADVTXD_TUCMD_L4T_TCP;
4192 else if (ip_hdr(skb)->protocol == IPPROTO_SCTP)
4193 type_tucmd_mlhl |=
4194 IXGBE_ADVTXD_TUCMD_L4T_SCTP;
4192 break; 4195 break;
4193 case cpu_to_be16(ETH_P_IPV6): 4196 case cpu_to_be16(ETH_P_IPV6):
4194 /* XXX what about other V6 headers?? */ 4197 /* XXX what about other V6 headers?? */
4195 if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) 4198 if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
4196 type_tucmd_mlhl |= 4199 type_tucmd_mlhl |=
4197 IXGBE_ADVTXD_TUCMD_L4T_TCP; 4200 IXGBE_ADVTXD_TUCMD_L4T_TCP;
4201 else if (ipv6_hdr(skb)->nexthdr == IPPROTO_SCTP)
4202 type_tucmd_mlhl |=
4203 IXGBE_ADVTXD_TUCMD_L4T_SCTP;
4198 break; 4204 break;
4199 default: 4205 default:
4200 if (unlikely(net_ratelimit())) { 4206 if (unlikely(net_ratelimit())) {
@@ -4718,6 +4724,9 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
4718 netdev->features |= NETIF_F_TSO6; 4724 netdev->features |= NETIF_F_TSO6;
4719 netdev->features |= NETIF_F_GRO; 4725 netdev->features |= NETIF_F_GRO;
4720 4726
4727 if (adapter->hw.mac.type == ixgbe_mac_82599EB)
4728 netdev->features |= NETIF_F_SCTP_CSUM;
4729
4721 netdev->vlan_features |= NETIF_F_TSO; 4730 netdev->vlan_features |= NETIF_F_TSO;
4722 netdev->vlan_features |= NETIF_F_TSO6; 4731 netdev->vlan_features |= NETIF_F_TSO6;
4723 netdev->vlan_features |= NETIF_F_IP_CSUM; 4732 netdev->vlan_features |= NETIF_F_IP_CSUM;