Commit 4067caba authored by françois romieu's avatar françois romieu Committed by David S. Miller

atl1: remove open-coded skb_cow_head.

Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
Cc: Chris Snook <chris.snook@gmail.com>
Cc: Jay Cliburn <jcliburn@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3f0dd38
...@@ -2118,18 +2118,17 @@ static u16 atl1_tpd_avail(struct atl1_tpd_ring *tpd_ring) ...@@ -2118,18 +2118,17 @@ static u16 atl1_tpd_avail(struct atl1_tpd_ring *tpd_ring)
} }
static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb,
struct tx_packet_desc *ptpd) struct tx_packet_desc *ptpd)
{ {
u8 hdr_len, ip_off; u8 hdr_len, ip_off;
u32 real_len; u32 real_len;
int err;
if (skb_shinfo(skb)->gso_size) { if (skb_shinfo(skb)->gso_size) {
if (skb_header_cloned(skb)) { int err;
err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
if (unlikely(err)) err = skb_cow_head(skb, 0);
return -1; if (err < 0)
} return err;
if (skb->protocol == htons(ETH_P_IP)) { if (skb->protocol == htons(ETH_P_IP)) {
struct iphdr *iph = ip_hdr(skb); struct iphdr *iph = ip_hdr(skb);
...@@ -2175,7 +2174,7 @@ static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, ...@@ -2175,7 +2174,7 @@ static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb,
return 3; return 3;
} }
} }
return false; return 0;
} }
static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb, static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb,
......
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