patch-2.4.21 linux-2.4.21/drivers/net/seeq8005.c
Next file: linux-2.4.21/drivers/net/sgiseeq.c
Previous file: linux-2.4.21/drivers/net/saa9730.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
2003-06-13 07:51:35.000000000 -0700
- Orig file:
linux-2.4.20/drivers/net/seeq8005.c
- Orig date:
2001-10-16 21:56:29.000000000 -0700
diff -urN linux-2.4.20/drivers/net/seeq8005.c linux-2.4.21/drivers/net/seeq8005.c
@@ -378,9 +378,16 @@
static int seeq8005_send_packet(struct sk_buff *skb, struct net_device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
- short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
+ short length = skb->len;
unsigned char *buf = skb->data;
+ if(length < ETH_ZLEN)
+ {
+ skb = skb_padto(skb, ETH_ZLEN);
+ if(skb == NULL)
+ return 0;
+ length = ETH_ZLEN;
+ }
/* Block a timer-based transmit from overlapping */
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)