diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 3a0bb2afe387..600538bc932f 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -3424,14 +3424,13 @@ static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
3424 | unsigned int max_per_txd = E1000_MAX_PER_TXD; | 3424 | unsigned int max_per_txd = E1000_MAX_PER_TXD; |
3425 | unsigned int max_txd_pwr = E1000_MAX_TXD_PWR; | 3425 | unsigned int max_txd_pwr = E1000_MAX_TXD_PWR; |
3426 | unsigned int tx_flags = 0; | 3426 | unsigned int tx_flags = 0; |
3427 | unsigned int len = skb->len; | 3427 | unsigned int len = skb->len - skb->data_len; |
3428 | unsigned long irq_flags; | 3428 | unsigned long irq_flags; |
3429 | unsigned int nr_frags = 0; | 3429 | unsigned int nr_frags; |
3430 | unsigned int mss = 0; | 3430 | unsigned int mss; |
3431 | int count = 0; | 3431 | int count = 0; |
3432 | int tso; | 3432 | int tso; |
3433 | unsigned int f; | 3433 | unsigned int f; |
3434 | len -= skb->data_len; | ||
3435 | 3434 | ||
3436 | if (test_bit(__E1000_DOWN, &adapter->state)) { | 3435 | if (test_bit(__E1000_DOWN, &adapter->state)) { |
3437 | dev_kfree_skb_any(skb); | 3436 | dev_kfree_skb_any(skb); |
@@ -3459,7 +3458,7 @@ static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
3459 | * points to just header, pull a few bytes of payload from | 3458 | * points to just header, pull a few bytes of payload from |
3460 | * frags into skb->data */ | 3459 | * frags into skb->data */ |
3461 | hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); | 3460 | hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); |
3462 | if (skb->data_len && (hdr_len == (skb->len - skb->data_len))) { | 3461 | if (skb->data_len && (hdr_len == len)) { |
3463 | unsigned int pull_size; | 3462 | unsigned int pull_size; |
3464 | 3463 | ||
3465 | pull_size = min((unsigned int)4, skb->data_len); | 3464 | pull_size = min((unsigned int)4, skb->data_len); |