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

[PATCH] padto - fix eexpress using skb_padto

parent 3cd1b5e8
...@@ -636,6 +636,7 @@ static void eexp_timeout(struct net_device *dev) ...@@ -636,6 +636,7 @@ static void eexp_timeout(struct net_device *dev)
static int eexp_xmit(struct sk_buff *buf, struct net_device *dev) static int eexp_xmit(struct sk_buff *buf, struct net_device *dev)
{ {
struct net_local *lp = (struct net_local *)dev->priv; struct net_local *lp = (struct net_local *)dev->priv;
short length = buf->len;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
unsigned long flags; unsigned long flags;
#endif #endif
...@@ -644,6 +645,13 @@ static int eexp_xmit(struct sk_buff *buf, struct net_device *dev) ...@@ -644,6 +645,13 @@ static int eexp_xmit(struct sk_buff *buf, struct net_device *dev)
printk(KERN_DEBUG "%s: eexp_xmit()\n", dev->name); printk(KERN_DEBUG "%s: eexp_xmit()\n", dev->name);
#endif #endif
if (buf->len < ETH_ZLEN) {
buf = skb_padto(buf, ETH_ZLEN);
if (buf == NULL)
return 0;
length = buf->len;
}
disable_irq(dev->irq); disable_irq(dev->irq);
/* /*
...@@ -656,8 +664,6 @@ static int eexp_xmit(struct sk_buff *buf, struct net_device *dev) ...@@ -656,8 +664,6 @@ static int eexp_xmit(struct sk_buff *buf, struct net_device *dev)
#endif #endif
{ {
unsigned short length = (ETH_ZLEN < buf->len) ? buf->len :
ETH_ZLEN;
unsigned short *data = (unsigned short *)buf->data; unsigned short *data = (unsigned short *)buf->data;
lp->stats.tx_bytes += length; lp->stats.tx_bytes += length;
......
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