Commit 4d4c3783 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

net: atheros: use new helper tcp_v6_gso_csum_prep

Use new helper tcp_v6_gso_csum_prep in additional network drivers.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8b19c68c
...@@ -1416,10 +1416,7 @@ static int alx_tso(struct sk_buff *skb, struct alx_txd *first) ...@@ -1416,10 +1416,7 @@ static int alx_tso(struct sk_buff *skb, struct alx_txd *first)
0, IPPROTO_TCP, 0); 0, IPPROTO_TCP, 0);
first->word1 |= 1 << TPD_IPV4_SHIFT; first->word1 |= 1 << TPD_IPV4_SHIFT;
} else if (skb_is_gso_v6(skb)) { } else if (skb_is_gso_v6(skb)) {
ipv6_hdr(skb)->payload_len = 0; tcp_v6_gso_csum_prep(skb);
tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
&ipv6_hdr(skb)->daddr,
0, IPPROTO_TCP, 0);
/* LSOv2: the first TPD only provides the packet length */ /* LSOv2: the first TPD only provides the packet length */
first->adrl.l.pkt_len = skb->len; first->adrl.l.pkt_len = skb->len;
first->word1 |= 1 << TPD_LSO_V2_SHIFT; first->word1 |= 1 << TPD_LSO_V2_SHIFT;
......
...@@ -2025,10 +2025,8 @@ static int atl1c_tso_csum(struct atl1c_adapter *adapter, ...@@ -2025,10 +2025,8 @@ static int atl1c_tso_csum(struct atl1c_adapter *adapter,
"IPV6 tso with zero data??\n"); "IPV6 tso with zero data??\n");
goto check_sum; goto check_sum;
} else } else
tcp_hdr(skb)->check = ~csum_ipv6_magic( tcp_v6_gso_csum_prep(skb);
&ipv6_hdr(skb)->saddr,
&ipv6_hdr(skb)->daddr,
0, IPPROTO_TCP, 0);
etpd->word1 |= 1 << TPD_LSO_EN_SHIFT; etpd->word1 |= 1 << TPD_LSO_EN_SHIFT;
etpd->word1 |= 1 << TPD_LSO_VER_SHIFT; etpd->word1 |= 1 << TPD_LSO_VER_SHIFT;
etpd->pkt_len = cpu_to_le32(skb->len); etpd->pkt_len = cpu_to_le32(skb->len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment