patch-1.3.6 linux/drivers/net/sk_g16.c

Next file: linux/drivers/net/skeleton.c
Previous file: linux/drivers/net/ppp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.5/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 = alloc_skb(len, GFP_ATOMIC); /* allocate socket buffer */ 
+	    skb = dev_alloc_skb(len); /* allocate socket buffer */ 
 
 	    if (skb == NULL)                /* Could not get mem ? */
 	    {
@@ -1590,7 +1590,6 @@
 	    
 	    /* Prepare sk_buff to queue for upper layers */
 
-            skb->len = len;
 	    skb->dev = dev;
 	    
 	    /* 
@@ -1600,7 +1599,7 @@
 	     * ignore status fields) 
 	     */
 
-	    memcpy(skb->data, (unsigned char *) (rmdp->u.buffer & 0x00ffffff),
+	    memcpy(skb_put(skb,len), (unsigned char *) (rmdp->u.buffer & 0x00ffffff),
 		   len);
 
 

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