patch-2.4.21 linux-2.4.21/drivers/net/3c527.c
Next file: linux-2.4.21/drivers/net/3c59x.c
Previous file: linux-2.4.21/drivers/net/3c523.c
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
2003-06-13 07:51:34.000000000 -0700
- Orig file:
linux-2.4.20/drivers/net/3c527.c
- Orig date:
2002-02-25 11:37:59.000000000 -0800
diff -urN linux-2.4.20/drivers/net/3c527.c linux-2.4.21/drivers/net/3c527.c
@@ -1086,6 +1086,12 @@
/* We will need this to flush the buffer out */
lp->tx_ring[lp->tx_ring_head].skb=skb;
+ if(skb->len < ETH_ZLEN)
+ {
+ skb = skb_padto(skb, ETH_ZLEN);
+ if(skb == NULL)
+ goto out;
+ }
np->length = (skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len;
np->data = virt_to_bus(skb->data);
@@ -1094,7 +1100,7 @@
wmb();
p->control &= ~CONTROL_EOL; /* Clear EOL on p */
-
+out:
restore_flags(flags);
netif_wake_queue(dev);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)