e1000e: cleanup - shift indentation left by exiting early in e1000_tso
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
564ea9bba1
commit
3d5e33c978
@ -3725,7 +3725,9 @@ static int e1000_tso(struct e1000_adapter *adapter,
|
||||
u8 ipcss, ipcso, tucss, tucso, hdr_len;
|
||||
int err;
|
||||
|
||||
if (skb_is_gso(skb)) {
|
||||
if (!skb_is_gso(skb))
|
||||
return 0;
|
||||
|
||||
if (skb_header_cloned(skb)) {
|
||||
err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
|
||||
if (err)
|
||||
@ -3738,16 +3740,13 @@ static int e1000_tso(struct e1000_adapter *adapter,
|
||||
struct iphdr *iph = ip_hdr(skb);
|
||||
iph->tot_len = 0;
|
||||
iph->check = 0;
|
||||
tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr,
|
||||
iph->daddr, 0,
|
||||
IPPROTO_TCP,
|
||||
0);
|
||||
tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr,
|
||||
0, IPPROTO_TCP, 0);
|
||||
cmd_length = E1000_TXD_CMD_IP;
|
||||
ipcse = skb_transport_offset(skb) - 1;
|
||||
} else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) {
|
||||
ipv6_hdr(skb)->payload_len = 0;
|
||||
tcp_hdr(skb)->check =
|
||||
~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
|
||||
tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
|
||||
&ipv6_hdr(skb)->daddr,
|
||||
0, IPPROTO_TCP, 0);
|
||||
ipcse = 0;
|
||||
@ -3786,9 +3785,6 @@ static int e1000_tso(struct e1000_adapter *adapter,
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool e1000_tx_csum(struct e1000_adapter *adapter, struct sk_buff *skb)
|
||||
{
|
||||
struct e1000_ring *tx_ring = adapter->tx_ring;
|
||||
|
Loading…
Reference in New Issue
Block a user