diff options
author | françois romieu <romieu@fr.zoreil.com> | 2014-03-29 12:26:14 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-29 17:49:47 -0400 |
commit | 4067caba454b25ce79f8a09834551404f79686dd (patch) | |
tree | 1ea7de4c6a0892a567501bcf17211cc9b6b7b9d1 | |
parent | c3f0dd38996d5f4e7c681099ba18cc1587155edb (diff) | |
download | linux-stable-4067caba454b25ce79f8a09834551404f79686dd.tar.gz linux-stable-4067caba454b25ce79f8a09834551404f79686dd.tar.bz2 linux-stable-4067caba454b25ce79f8a09834551404f79686dd.zip |
atl1: remove open-coded skb_cow_head.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Chris Snook <chris.snook@gmail.com>
Cc: Jay Cliburn <jcliburn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atl1.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c index 287272dd69da..dfd0e91fa726 100644 --- a/drivers/net/ethernet/atheros/atlx/atl1.c +++ b/drivers/net/ethernet/atheros/atlx/atl1.c @@ -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, - struct tx_packet_desc *ptpd) + struct tx_packet_desc *ptpd) { 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, |