patch-1.3.7 linux/drivers/net/sk_g16.c
Next file: linux/drivers/net/slip.c
Previous file: linux/drivers/net/ppp.c
Back to the patch index
Back to the overall index
-  Lines: 17
 -  Date:
Wed Jul  5 13:06:27 1995
 -  Orig file: 
v1.3.6/linux/drivers/net/sk_g16.c
 -  Orig date: 
Fri Jun 30 16:22:28 1995
 
diff -u --recursive --new-file v1.3.6/linux/drivers/net/sk_g16.c linux/drivers/net/sk_g16.c
@@ -1570,7 +1570,7 @@
 	    int len = (rmdp->mlen & 0x0fff);  /* extract message length from receive buffer */
 	    struct sk_buff *skb;
 
-	    skb = dev_alloc_skb(len); /* allocate socket buffer */ 
+	    skb = dev_alloc_skb(len+2); /* allocate socket buffer */ 
 
 	    if (skb == NULL)                /* Could not get mem ? */
 	    {
@@ -1591,6 +1591,7 @@
 	    /* Prepare sk_buff to queue for upper layers */
 
 	    skb->dev = dev;
+	    skb_reserve(skb,2);		/* Align IP header on 16 byte boundary */
 	    
 	    /* 
              * Copy data out of our receive descriptor into sk_buff.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this