diff mbox

[1/2] r8169: use hardware auto-padding.

Message ID 20090315110954.GA17800@electric-eye.fr.zoreil.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Francois Romieu March 15, 2009, 11:09 a.m. UTC
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>
---
 drivers/net/r8169.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

Comments

David Miller March 16, 2009, 3:04 a.m. UTC | #1
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Sun, 15 Mar 2009 12:09:54 +0100

> 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>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index b347340..352da2a 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)
 		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;
 	}
@@ -3407,7 +3400,6 @@  out:
 err_stop:
 	netif_stop_queue(dev);
 	ret = NETDEV_TX_BUSY;
-err_update_stats:
 	dev->stats.tx_dropped++;
 	goto out;
 }