patch-2.4.21 linux-2.4.21/drivers/net/pcmcia/ray_cs.c
Next file: linux-2.4.21/drivers/net/pcmcia/smc91c92_cs.c
Previous file: linux-2.4.21/drivers/net/pcmcia/fmvj18x_cs.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
2003-06-13 07:51:35.000000000 -0700
- Orig file:
linux-2.4.20/drivers/net/pcmcia/ray_cs.c
- Orig date:
2002-11-28 15:53:14.000000000 -0800
diff -urN linux-2.4.20/drivers/net/pcmcia/ray_cs.c linux-2.4.21/drivers/net/pcmcia/ray_cs.c
@@ -1054,7 +1054,7 @@
{
ray_dev_t *local = dev->priv;
dev_link_t *link = local->finder;
- short length;
+ short length = skb->len;
if (!(link->state & DEV_PRESENT)) {
DEBUG(2,"ray_dev_start_xmit - device not present\n");
@@ -1070,7 +1070,13 @@
}
}
- length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
+ if(length < ETH_ZLEN)
+ {
+ skb = skb_padto(skb, ETH_ZLEN);
+ if(skb == NULL)
+ return 0;
+ length = ETH_ZLEN;
+ }
switch (ray_hw_xmit( skb->data, length, dev, DATA_TYPE)) {
case XMIT_NO_CCS:
case XMIT_NEED_AUTH:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)