summaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2006-01-12 16:51:07 -0800
committerJeff Garzik <jgarzik@pobox.com>2006-01-17 07:48:02 -0500
commitd74bbd3bbfd70470446e0d8153f91967d53c0798 (patch)
treed09f79b0d7d4c3e63f9dbe038a5f3bdd9a091d84 /drivers/net/e1000
parent0fadb0597d240d4ed279042cab632d567510a1a3 (diff)
downloadop-kernel-dev-d74bbd3bbfd70470446e0d8153f91967d53c0798.zip
op-kernel-dev-d74bbd3bbfd70470446e0d8153f91967d53c0798.tar.gz
[PATCH] e1000: Fix __pskb_pull_tail
Fixed by moving code to correct location (for 82572 and 82571 controllers). Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r--drivers/net/e1000/e1000_main.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 36b04d4..dd3d323 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2834,6 +2834,13 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
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 -EFAULT;
+ }
len = skb->len - skb->data_len;
}
}
@@ -2873,14 +2880,6 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
if(adapter->pcix_82544)
count += nr_frags;
- 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 -EFAULT;
- }
-
if(adapter->hw.tx_pkt_filtering && (adapter->hw.mac_type == e1000_82573) )
e1000_transfer_dhcp_info(adapter, skb);
OpenPOWER on IntegriCloud