Commit 82f1fc07 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] padto - fix fmv18xusing skb_padto

parent dec03d92
......@@ -366,7 +366,7 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev)
{
struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
short length = skb->len;
unsigned char *buf = skb->data;
unsigned long flags;
......@@ -378,6 +378,14 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev)
dev->name, length);
return 1;
}
if (length < ETH_ZLEN) {
skb = skb_padto(skb, ETH_ZLEN);
if (skb == NULL)
return 0;
length = ETH_ZLEN;
}
if (net_debug > 4)
printk("%s: Transmitting a packet of length %lu.\n", dev->name,
(unsigned long)skb->len);
......
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