From: Jeff Garzik Date: Sat, 11 Mar 2006 18:35:31 +0000 (-0500) Subject: Merge branch 'upstream-fixes' X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=749dfc70554f2c9e6624ac843d66571265ed9338;p=openwrt%2Fstaging%2Fblogic.git Merge branch 'upstream-fixes' --- 749dfc70554f2c9e6624ac843d66571265ed9338 diff --cc drivers/net/e1000/e1000_main.c index 9adaf5fa9d48,4c4db96d0b7b..0c631a77ccf6 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@@ -2804,25 -2909,17 +2804,25 @@@ e1000_xmit_frame(struct sk_buff *skb, s * points to just header, pull a few bytes of payload from * frags into skb->data */ hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); - if (skb->data_len && (hdr_len == (skb->len - skb->data_len)) && - (adapter->hw.mac_type == e1000_82571 || - adapter->hw.mac_type == e1000_82572)) { - unsigned int pull_size; - pull_size = min((unsigned int)4, skb->data_len); - if (!__pskb_pull_tail(skb, pull_size)) { - printk(KERN_ERR "__pskb_pull_tail failed.\n"); - dev_kfree_skb_any(skb); - return NETDEV_TX_OK; + if (skb->data_len && (hdr_len == (skb->len - skb->data_len))) { + switch (adapter->hw.mac_type) { + unsigned int pull_size; + case e1000_82571: + case e1000_82572: + case e1000_82573: + pull_size = min((unsigned int)4, skb->data_len); + if (!__pskb_pull_tail(skb, pull_size)) { + printk(KERN_ERR + "__pskb_pull_tail failed.\n"); + dev_kfree_skb_any(skb); - return -EFAULT; ++ return NETDEV_TX_OK; + } + len = skb->len - skb->data_len; + break; + default: + /* do nothing */ + break; } - len = skb->len - skb->data_len; } }