diff options
author | françois romieu <romieu@fr.zoreil.com> | 2009-03-14 21:09:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-15 23:03:10 -0400 |
commit | 97d477a914b146e7e6722ded21afa79886ae8ccd (patch) | |
tree | 94905bf4df5436c9bf4933901af8166dcad814f5 /drivers/net | |
parent | 682337fe062e939578d933c74157ae9a36baa4ce (diff) |
r8169: use hardware auto-padding.
It shortens the code and fixes the current pci_unmap leak with
padded skb reported by Dave Jones.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/r8169.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index b3473401c83a..352da2a43c9f 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -3363,13 +3363,6 @@ static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3363 | opts1 |= FirstFrag; | 3363 | opts1 |= FirstFrag; |
3364 | } else { | 3364 | } else { |
3365 | len = skb->len; | 3365 | len = skb->len; |
3366 | |||
3367 | if (unlikely(len < ETH_ZLEN)) { | ||
3368 | if (skb_padto(skb, ETH_ZLEN)) | ||
3369 | goto err_update_stats; | ||
3370 | len = ETH_ZLEN; | ||
3371 | } | ||
3372 | |||
3373 | opts1 |= FirstFrag | LastFrag; | 3366 | opts1 |= FirstFrag | LastFrag; |
3374 | tp->tx_skb[entry].skb = skb; | 3367 | tp->tx_skb[entry].skb = skb; |
3375 | } | 3368 | } |
@@ -3407,7 +3400,6 @@ out: | |||
3407 | err_stop: | 3400 | err_stop: |
3408 | netif_stop_queue(dev); | 3401 | netif_stop_queue(dev); |
3409 | ret = NETDEV_TX_BUSY; | 3402 | ret = NETDEV_TX_BUSY; |
3410 | err_update_stats: | ||
3411 | dev->stats.tx_dropped++; | 3403 | dev->stats.tx_dropped++; |
3412 | goto out; | 3404 | goto out; |
3413 | } | 3405 | } |