Fix up memcpy for short receives.

Signed-off-by: Olof Johansson <[EMAIL PROTECTED]>


Index: mainline/drivers/net/pasemi_mac.c
===================================================================
--- mainline.orig/drivers/net/pasemi_mac.c
+++ mainline/drivers/net/pasemi_mac.c
@@ -516,9 +516,7 @@ static int pasemi_mac_clean_rx(struct pa
                            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;
                        }

--
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to