]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
pasemi_mac: Fix memcpy amount for short receives
authorOlof Johansson <olof@lixom.net>
Wed, 22 Aug 2007 14:12:55 +0000 (09:12 -0500)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:50:56 +0000 (16:50 -0700)
Fix up memcpy for short receives.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/pasemi_mac.c

index 46d5c0eef784656eab24f054f8d0081d8121e6b5..0d80b9d48c266ac3d83e77f98cb98f46045a8378 100644 (file)
@@ -506,9 +506,7 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit)
                            netdev_alloc_skb(mac->netdev, len + NET_IP_ALIGN);
                        if (new_skb) {
                                skb_reserve(new_skb, NET_IP_ALIGN);
-                               memcpy(new_skb->data - NET_IP_ALIGN,
-                                       skb->data - NET_IP_ALIGN,
-                                       len + NET_IP_ALIGN);
+                               memcpy(new_skb->data, skb->data, len);
                                /* save the skb in buffer_info as good */
                                skb = new_skb;
                        }