aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrançois romieu <romieu@fr.zoreil.com>2014-03-29 07:26:14 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-29 17:49:47 -0400
commit4067caba454b25ce79f8a09834551404f79686dd (patch)
tree1ea7de4c6a0892a567501bcf17211cc9b6b7b9d1
parentc3f0dd38996d5f4e7c681099ba18cc1587155edb (diff)
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.c15
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)
2118} 2118}
2119 2119
2120static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, 2120static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb,
2121 struct tx_packet_desc *ptpd) 2121 struct tx_packet_desc *ptpd)
2122{ 2122{
2123 u8 hdr_len, ip_off; 2123 u8 hdr_len, ip_off;
2124 u32 real_len; 2124 u32 real_len;
2125 int err;
2126 2125
2127 if (skb_shinfo(skb)->gso_size) { 2126 if (skb_shinfo(skb)->gso_size) {
2128 if (skb_header_cloned(skb)) { 2127 int err;
2129 err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); 2128
2130 if (unlikely(err)) 2129 err = skb_cow_head(skb, 0);
2131 return -1; 2130 if (err < 0)
2132 } 2131 return err;
2133 2132
2134 if (skb->protocol == htons(ETH_P_IP)) { 2133 if (skb->protocol == htons(ETH_P_IP)) {
2135 struct iphdr *iph = ip_hdr(skb); 2134 struct iphdr *iph = ip_hdr(skb);
@@ -2175,7 +2174,7 @@ static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb,
2175 return 3; 2174 return 3;
2176 } 2175 }
2177 } 2176 }
2178 return false; 2177 return 0;
2179} 2178}
2180 2179
2181static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb, 2180static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb,