Commit a98ecf1b authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] fix r8169 using skb_padto

parent 6d99dd96
...@@ -822,6 +822,12 @@ rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -822,6 +822,12 @@ rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev)
void *ioaddr = tp->mmio_addr; void *ioaddr = tp->mmio_addr;
int entry = tp->cur_tx % NUM_TX_DESC; int entry = tp->cur_tx % NUM_TX_DESC;
if (skb->len < ETH_ZLEN) {
skb = skb_padto(skb, ETH_ZLEN);
if (skb == NULL)
return 0;
}
spin_lock_irq(&tp->lock); spin_lock_irq(&tp->lock);
if ((tp->TxDescArray[entry].status & OWNbit) == 0) { if ((tp->TxDescArray[entry].status & OWNbit) == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment