summary refs log tree commit diff
path: root/drivers/net
diff options
context:
space:
mode:
authorshemminger@osdl.org <shemminger@osdl.org>2006-08-28 10:00:45 -0700
committerJeff Garzik <jeff@garzik.org>2006-08-29 17:18:29 -0400
commitfba5008cda606488cf42b60de60b4414cc2276ad (patch)
tree0cf28b14ceac3281a97972e9b048e747fec7f5e9 /drivers/net
parent699a71238856b19091503c671bac8abb1e3f9a3a (diff)
downloadlinux-fba5008cda606488cf42b60de60b4414cc2276ad.tar.gz
[PATCH] sky2: remove cloned/pskb_expand_head check
The code to handle cloned skb overwriting is unnecessary in the
sky2 driver and is buggy. The bug is that pskb_expand_head can change the
skb but the driver has already mapped in the header.

Since the sky2 hardware doesn't need to overwrite memory, the buggy
code can just be removed; it was mistakenly copied from the tg3
driver.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/sky2.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 805a7dcf5508..67ebc05d9d19 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1239,13 +1239,6 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
 	/* Check for TCP Segmentation Offload */
 	mss = skb_shinfo(skb)->gso_size;
 	if (mss != 0) {
-		/* just drop the packet if non-linear expansion fails */
-		if (skb_header_cloned(skb) &&
-		    pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) {
-			dev_kfree_skb(skb);
-			goto out_unlock;
-		}
-
 		mss += ((skb->h.th->doff - 5) * 4);	/* TCP options */
 		mss += (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr);
 		mss += ETH_HLEN;
@@ -1341,7 +1334,6 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
 
 	sky2_put_idx(hw, txqaddr[sky2->port], sky2->tx_prod);
 
-out_unlock:
 	spin_unlock(&sky2->tx_lock);
 
 	dev->trans_start = jiffies;