diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2009-04-16 23:34:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-05-02 10:24:43 -0700 |
commit | 7627613b64210b454164a8dbe6b4681da9ed1bb7 (patch) | |
tree | 1ae329d21e91cb913468061251fce28ab940b44b | |
parent | 67b9b52d81ad636ae454e474ed52eb145d8284b5 (diff) |
r8169: use hardware auto-padding.
Upstream as 97d477a914b146e7e6722ded21afa79886ae8ccd (post 2.6.28).
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-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 2988efe89ba3..8ec18edc4da8 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -2549,13 +2549,6 @@ static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev) opts1 |= FirstFrag; } else { len = skb->len; - - if (unlikely(len < ETH_ZLEN)) { - if (skb_padto(skb, ETH_ZLEN)) - goto err_update_stats; - len = ETH_ZLEN; - } - opts1 |= FirstFrag | LastFrag; tp->tx_skb[entry].skb = skb; } @@ -2593,7 +2586,6 @@ out: err_stop: netif_stop_queue(dev); ret = NETDEV_TX_BUSY; -err_update_stats: dev->stats.tx_dropped++; goto out; } |