Skip to content

Commit

Permalink
r8169: use hardware auto-padding.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
françois romieu authored and David S. Miller committed Mar 16, 2009
1 parent 682337f commit 97d477a
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -3407,7 +3400,6 @@ static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev)
err_stop:
netif_stop_queue(dev);
ret = NETDEV_TX_BUSY;
err_update_stats:
dev->stats.tx_dropped++;
goto out;
}
Expand Down

0 comments on commit 97d477a

Please sign in to comment.