patch-1.3.7 linux/drivers/net/ni52.c

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

diff -u --recursive --new-file v1.3.6/linux/drivers/net/ni52.c linux/drivers/net/ni52.c
@@ -803,10 +803,11 @@
         {
           totlen &= RBD_MASK; /* length of this frame */
           rbd->status = 0;
-          skb = (struct sk_buff *) dev_alloc_skb(totlen);
+          skb = (struct sk_buff *) dev_alloc_skb(totlen+2);
           if(skb != NULL)
           {
             skb->dev = dev;
+            skb_reserve(skb,2);		/* 16 byte alignment */
             memcpy(skb_put(skb,totlen),(char *) p->base+(unsigned long) rbd->buffer, totlen);
             skb->protocol=eth_type_trans(skb,dev);
             netif_rx(skb);

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