Commit d74bbd3b authored by Jeff Kirsher's avatar Jeff Kirsher Committed by Jeff Garzik

[PATCH] e1000: Fix __pskb_pull_tail

Fixed by moving code to correct location (for 82572 and 82571 controllers).
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarJohn Ronciak <john.ronciak@intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 0fadb059
...@@ -2834,6 +2834,13 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) ...@@ -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)) && if (skb->data_len && (hdr_len == (skb->len - skb->data_len)) &&
(adapter->hw.mac_type == e1000_82571 || (adapter->hw.mac_type == e1000_82571 ||
adapter->hw.mac_type == e1000_82572)) { 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; len = skb->len - skb->data_len;
} }
} }
...@@ -2873,14 +2880,6 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) ...@@ -2873,14 +2880,6 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
if(adapter->pcix_82544) if(adapter->pcix_82544)
count += nr_frags; 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) ) if(adapter->hw.tx_pkt_filtering && (adapter->hw.mac_type == e1000_82573) )
e1000_transfer_dhcp_info(adapter, skb); e1000_transfer_dhcp_info(adapter, skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment