Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97d477a9 authored by françois romieu's avatar françois romieu Committed by David S. Miller
Browse files

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: default avatarFrancois Romieu <romieu@fr.zoreil.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 682337fe
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -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;
}