aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 529274824931..bd64387563f0 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -5006,7 +5006,18 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter,
5006 IXGBE_ADVTXD_DTYP_CTXT); 5006 IXGBE_ADVTXD_DTYP_CTXT);
5007 5007
5008 if (skb->ip_summed == CHECKSUM_PARTIAL) { 5008 if (skb->ip_summed == CHECKSUM_PARTIAL) {
5009 switch (skb->protocol) { 5009 __be16 protocol;
5010
5011 if (skb->protocol == cpu_to_be16(ETH_P_8021Q)) {
5012 const struct vlan_ethhdr *vhdr =
5013 (const struct vlan_ethhdr *)skb->data;
5014
5015 protocol = vhdr->h_vlan_encapsulated_proto;
5016 } else {
5017 protocol = skb->protocol;
5018 }
5019
5020 switch (protocol) {
5010 case cpu_to_be16(ETH_P_IP): 5021 case cpu_to_be16(ETH_P_IP):
5011 type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4; 5022 type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4;
5012 if (ip_hdr(skb)->protocol == IPPROTO_TCP) 5023 if (ip_hdr(skb)->protocol == IPPROTO_TCP)