Commit 1f1c31e0 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] padto - fix bagetlance using padto

parent 52bc51b1
......@@ -830,6 +830,18 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
struct lance_tx_head *head;
unsigned long flags;
/* The old LANCE chips doesn't automatically pad buffers to min. size. */
len = (ETH_ZLEN < skb->len) ? skb->len : ETH_ZLEN;
/* PAM-Card has a bug: Can only send packets with even number of bytes! */
if (lp->cardtype == PAM_CARD && (len & 1))
++len;
if (len > skb->len) {
skb = skb_padto(skb, len);
if (skb == NULL)
return 0;
}
/* Transmitter timeout, serious problems. */
if (dev->tbusy) {
int tickssofar = jiffies - dev->trans_start;
......@@ -916,12 +928,6 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
* last.
*/
/* The old LANCE chips doesn't automatically pad buffers to min. size. */
len = (ETH_ZLEN < skb->len) ? skb->len : ETH_ZLEN;
/* PAM-Card has a bug: Can only send packets with even number of bytes! */
if (lp->cardtype == PAM_CARD && (len & 1))
++len;
head->length = -len;
head->misc = 0;
lp->memcpy_f( PKTBUF_ADDR(head), (void *)skb->data, 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