提交 4067caba 编写于 作者: F françois romieu 提交者: David S. Miller

atl1: remove open-coded skb_cow_head.

Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
Cc: Chris Snook <chris.snook@gmail.com>
Cc: Jay Cliburn <jcliburn@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c3f0dd38
......@@ -2122,14 +2122,13 @@ static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb,
{
u8 hdr_len, ip_off;
u32 real_len;
int err;
if (skb_shinfo(skb)->gso_size) {
if (skb_header_cloned(skb)) {
err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
if (unlikely(err))
return -1;
}
int err;
err = skb_cow_head(skb, 0);
if (err < 0)
return err;
if (skb->protocol == htons(ETH_P_IP)) {
struct iphdr *iph = ip_hdr(skb);
......@@ -2175,7 +2174,7 @@ static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb,
return 3;
}
}
return false;
return 0;
}
static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册