Commit fd30333d authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by David S. Miller

[TG3]: fixup tot_len calculation

Turning struct iphdr::tot_len into __be16 added sparse warning.
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b5e5fa5e
...@@ -3651,7 +3651,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -3651,7 +3651,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
TXD_FLAG_CPU_POST_DMA); TXD_FLAG_CPU_POST_DMA);
skb->nh.iph->check = 0; skb->nh.iph->check = 0;
skb->nh.iph->tot_len = ntohs(mss + ip_tcp_len + tcp_opt_len); skb->nh.iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len);
if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) { if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) {
skb->h.th->check = 0; skb->h.th->check = 0;
base_flags &= ~TXD_FLAG_TCPUDP_CSUM; base_flags &= ~TXD_FLAG_TCPUDP_CSUM;
......
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