patch-2.4.21 linux-2.4.21/drivers/net/eth16i.c
Next file: linux-2.4.21/drivers/net/ether00.c
Previous file: linux-2.4.21/drivers/net/epic100.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
2003-06-13 07:51:34.000000000 -0700
- Orig file:
linux-2.4.20/drivers/net/eth16i.c
- Orig date:
2001-09-30 12:26:06.000000000 -0700
diff -urN linux-2.4.20/drivers/net/eth16i.c linux-2.4.21/drivers/net/eth16i.c
@@ -1056,10 +1056,17 @@
struct eth16i_local *lp = (struct eth16i_local *)dev->priv;
int ioaddr = dev->base_addr;
int status = 0;
- ushort length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
+ ushort length = skb->len;
unsigned char *buf = skb->data;
unsigned long flags;
+ if(length < ETH_ZLEN)
+ {
+ skb = skb_padto(skb, ETH_ZLEN);
+ if(skb == NULL)
+ return 0;
+ length = ETH_ZLEN;
+ }
netif_stop_queue(dev);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)