[NET]: Kill eth_copy_and_sum().
David S. Miller [Wed, 11 Jul 2007 05:08:12 +0000 (22:08 -0700)]
It hasn't "summed" anything in over 7 years, and it's
just a straight mempcy ala skb_copy_to_linear_data()
so just get rid of it.

Signed-off-by: David S. Miller <davem@davemloft.net>

45 files changed:
arch/ppc/8260_io/enet.c
arch/ppc/8260_io/fcc_enet.c
arch/ppc/8xx_io/enet.c
arch/ppc/8xx_io/fec.c
drivers/net/3c523.c
drivers/net/7990.c
drivers/net/8139too.c
drivers/net/a2065.c
drivers/net/ariadne.c
drivers/net/arm/ep93xx_eth.c
drivers/net/au1000_eth.c
drivers/net/dl2k.c
drivers/net/eepro100.c
drivers/net/epic100.c
drivers/net/fealnx.c
drivers/net/fec.c
drivers/net/hamachi.c
drivers/net/ixp2000/ixpdev.c
drivers/net/lance.c
drivers/net/natsemi.c
drivers/net/ni52.c
drivers/net/ni65.c
drivers/net/pci-skeleton.c
drivers/net/pcnet32.c
drivers/net/saa9730.c
drivers/net/sgiseeq.c
drivers/net/sis190.c
drivers/net/starfire.c
drivers/net/sun3_82586.c
drivers/net/sun3lance.c
drivers/net/sunbmac.c
drivers/net/sundance.c
drivers/net/sunlance.c
drivers/net/sunqe.c
drivers/net/tulip/interrupt.c
drivers/net/tulip/winbond-840.c
drivers/net/tulip/xircom_cb.c
drivers/net/tulip/xircom_tulip_cb.c
drivers/net/typhoon.c
drivers/net/usb/catc.c
drivers/net/usb/kaweth.c
drivers/net/via-rhine.c
drivers/net/wireless/wl3501_cs.c
drivers/net/yellowfin.c
include/linux/etherdevice.h

index 4c0a7d7..615b658 100644 (file)
@@ -477,9 +477,9 @@ for (;;) {
                }
                else {
                        skb_put(skb,pkt_len-4); /* Make room */
-                       eth_copy_and_sum(skb,
+                       skb_copy_to_linear_data(skb,
                                (unsigned char *)__va(bdp->cbd_bufaddr),
-                               pkt_len-4, 0);
+                               pkt_len-4);
                        skb->protocol=eth_type_trans(skb,dev);
                        netif_rx(skb);
                }
index cab395d..6f3ed6a 100644 (file)
@@ -734,9 +734,9 @@ for (;;) {
                }
                else {
                        skb_put(skb,pkt_len);   /* Make room */
-                       eth_copy_and_sum(skb,
+                       skb_copy_to_linear_data(skb,
                                (unsigned char *)__va(bdp->cbd_bufaddr),
-                               pkt_len, 0);
+                               pkt_len);
                        skb->protocol=eth_type_trans(skb,dev);
                        netif_rx(skb);
                }
index e58288e..703d47e 100644 (file)
@@ -506,9 +506,9 @@ for (;;) {
                }
                else {
                        skb_put(skb,pkt_len-4); /* Make room */
-                       eth_copy_and_sum(skb,
+                       skb_copy_to_linear_data(skb,
                                cep->rx_vaddr[bdp - cep->rx_bd_base],
-                               pkt_len-4, 0);
+                               pkt_len-4);
                        skb->protocol=eth_type_trans(skb,dev);
                        netif_rx(skb);
                }
index d38335d..0288279 100644 (file)
@@ -725,7 +725,7 @@ while (!(bdp->cbd_sc & BD_ENET_RX_EMPTY)) {
                fep->stats.rx_dropped++;
        } else {
                skb_put(skb,pkt_len-4); /* Make room */
-               eth_copy_and_sum(skb, data, pkt_len-4, 0);
+               skb_copy_to_linear_data(skb, data, pkt_len-4);
                skb->protocol=eth_type_trans(skb,dev);
                netif_rx(skb);
        }
index da1a22c..ab18343 100644 (file)
@@ -990,7 +990,7 @@ static void elmc_rcv_int(struct net_device *dev)
                                if (skb != NULL) {
                                        skb_reserve(skb, 2);    /* 16 byte alignment */
                                        skb_put(skb,totlen);
-                                       eth_copy_and_sum(skb, (char *) p->base+(unsigned long) rbd->buffer,totlen,0);
+                                       skb_copy_to_linear_data(skb, (char *) p->base+(unsigned long) rbd->buffer,totlen);
                                        skb->protocol = eth_type_trans(skb, dev);
                                        netif_rx(skb);
                                        dev->last_rx = jiffies;
index 0877fc3..e89ace1 100644 (file)
@@ -333,9 +333,9 @@ static int lance_rx (struct net_device *dev)
 
                         skb_reserve (skb, 2);           /* 16 byte align */
                         skb_put (skb, len);             /* make room */
-                        eth_copy_and_sum(skb,
+                        skb_copy_to_linear_data(skb,
                                          (unsigned char *)&(ib->rx_buf [lp->rx_new][0]),
-                                         len, 0);
+                                         len);
                         skb->protocol = eth_type_trans (skb, dev);
                        netif_rx (skb);
                        dev->last_rx = jiffies;
index a844b1f..21a6ccb 100644 (file)
@@ -2017,7 +2017,7 @@ no_early_rx:
 #if RX_BUF_IDX == 3
                        wrap_copy(skb, rx_ring, ring_offset+4, pkt_size);
 #else
-                       eth_copy_and_sum (skb, &rx_ring[ring_offset + 4], pkt_size, 0);
+                       skb_copy_to_linear_data (skb, &rx_ring[ring_offset + 4], pkt_size);
 #endif
                        skb_put (skb, pkt_size);
 
index 81d5a37..a45de69 100644 (file)
@@ -322,9 +322,9 @@ static int lance_rx (struct net_device *dev)
 
                        skb_reserve (skb, 2);           /* 16 byte align */
                        skb_put (skb, len);             /* make room */
-                       eth_copy_and_sum(skb,
+                       skb_copy_to_linear_data(skb,
                                         (unsigned char *)&(ib->rx_buf [lp->rx_new][0]),
-                                        len, 0);
+                                        len);
                        skb->protocol = eth_type_trans (skb, dev);
                        netif_rx (skb);
                        dev->last_rx = jiffies;
index a241ae7..bc5a38a 100644 (file)
@@ -746,7 +746,7 @@ static int ariadne_rx(struct net_device *dev)
 
            skb_reserve(skb,2);         /* 16 byte align */
            skb_put(skb,pkt_len);       /* Make room */
-           eth_copy_and_sum(skb, (char *)priv->rx_buff[entry], pkt_len,0);
+           skb_copy_to_linear_data(skb, (char *)priv->rx_buff[entry], pkt_len);
            skb->protocol=eth_type_trans(skb,dev);
 #if 0
            printk(KERN_DEBUG "RX pkt type 0x%04x from ",
index 2438c5b..f6ece1d 100644 (file)
@@ -258,7 +258,7 @@ static int ep93xx_rx(struct net_device *dev, int *budget)
                        skb_reserve(skb, 2);
                        dma_sync_single(NULL, ep->descs->rdesc[entry].buf_addr,
                                                length, DMA_FROM_DEVICE);
-                       eth_copy_and_sum(skb, ep->rx_buf[entry], length, 0);
+                       skb_copy_to_linear_data(skb, ep->rx_buf[entry], length);
                        skb_put(skb, length);
                        skb->protocol = eth_type_trans(skb, dev);
 
index c27cfce..e86b369 100644 (file)
@@ -1205,8 +1205,8 @@ static int au1000_rx(struct net_device *dev)
                                continue;
                        }
                        skb_reserve(skb, 2);    /* 16 byte IP header align */
-                       eth_copy_and_sum(skb,
-                               (unsigned char *)pDB->vaddr, frmlen, 0);
+                       skb_copy_to_linear_data(skb,
+                               (unsigned char *)pDB->vaddr, frmlen);
                        skb_put(skb, frmlen);
                        skb->protocol = eth_type_trans(skb, dev);
                        netif_rx(skb);  /* pass the packet to upper layers */
index 74ec64a..a4ace07 100644 (file)
@@ -866,9 +866,9 @@ receive_packet (struct net_device *dev)
                                                            PCI_DMA_FROMDEVICE);
                                /* 16 byte align the IP header */
                                skb_reserve (skb, 2);
-                               eth_copy_and_sum (skb,
+                               skb_copy_to_linear_data (skb,
                                                  np->rx_skbuff[entry]->data,
-                                                 pkt_len, 0);
+                                                 pkt_len);
                                skb_put (skb, pkt_len);
                                pci_dma_sync_single_for_device(np->pdev,
                                                               desc->fraginfo &
index 9800341..9afa47e 100644 (file)
@@ -1801,7 +1801,7 @@ speedo_rx(struct net_device *dev)
 
 #if 1 || USE_IP_CSUM
                                /* Packet is in one chunk -- we can copy + cksum. */
-                               eth_copy_and_sum(skb, sp->rx_skbuff[entry]->data, pkt_len, 0);
+                               skb_copy_to_linear_data(skb, sp->rx_skbuff[entry]->data, pkt_len);
                                skb_put(skb, pkt_len);
 #else
                                skb_copy_from_linear_data(sp->rx_skbuff[entry],
index 5e51794..1197784 100644 (file)
@@ -1201,7 +1201,7 @@ static int epic_rx(struct net_device *dev, int budget)
                                                            ep->rx_ring[entry].bufaddr,
                                                            ep->rx_buf_sz,
                                                            PCI_DMA_FROMDEVICE);
-                               eth_copy_and_sum(skb, ep->rx_skbuff[entry]->data, pkt_len, 0);
+                               skb_copy_to_linear_data(skb, ep->rx_skbuff[entry]->data, pkt_len);
                                skb_put(skb, pkt_len);
                                pci_dma_sync_single_for_device(ep->pci_dev,
                                                               ep->rx_ring[entry].bufaddr,
index abe9b08..ff9f177 100644 (file)
@@ -1727,8 +1727,8 @@ static int netdev_rx(struct net_device *dev)
                                /* Call copy + cksum if available. */
 
 #if ! defined(__alpha__)
-                               eth_copy_and_sum(skb,
-                                       np->cur_rx->skbuff->data, pkt_len, 0);
+                               skb_copy_to_linear_data(skb,
+                                       np->cur_rx->skbuff->data, pkt_len);
                                skb_put(skb, pkt_len);
 #else
                                memcpy(skb_put(skb, pkt_len),
index 255b091..03023dd 100644 (file)
@@ -648,7 +648,7 @@ while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) {
                fep->stats.rx_dropped++;
        } else {
                skb_put(skb,pkt_len-4); /* Make room */
-               eth_copy_and_sum(skb, data, pkt_len-4, 0);
+               skb_copy_to_linear_data(skb, data, pkt_len-4);
                skb->protocol=eth_type_trans(skb,dev);
                netif_rx(skb);
        }
index 2521b11..15254dc 100644 (file)
@@ -1575,8 +1575,8 @@ static int hamachi_rx(struct net_device *dev)
                                                            PCI_DMA_FROMDEVICE);
                                /* Call copy + cksum if available. */
 #if 1 || USE_IP_COPYSUM
-                               eth_copy_and_sum(skb,
-                                       hmp->rx_skbuff[entry]->data, pkt_len, 0);
+                               skb_copy_to_linear_data(skb,
+                                       hmp->rx_skbuff[entry]->data, pkt_len);
                                skb_put(skb, pkt_len);
 #else
                                memcpy(skb_put(skb, pkt_len), hmp->rx_ring_dma
index d5f694f..d9ce1ae 100644 (file)
@@ -111,7 +111,7 @@ static int ixpdev_rx(struct net_device *dev, int *budget)
                skb = dev_alloc_skb(desc->pkt_length + 2);
                if (likely(skb != NULL)) {
                        skb_reserve(skb, 2);
-                       eth_copy_and_sum(skb, buf, desc->pkt_length, 0);
+                       skb_copy_to_linear_data(skb, buf, desc->pkt_length);
                        skb_put(skb, desc->pkt_length);
                        skb->protocol = eth_type_trans(skb, nds[desc->channel]);
 
index 0fe96c8..a2f37e5 100644 (file)
@@ -1186,9 +1186,9 @@ lance_rx(struct net_device *dev)
                                }
                                skb_reserve(skb,2);     /* 16 byte align */
                                skb_put(skb,pkt_len);   /* Make room */
-                               eth_copy_and_sum(skb,
+                               skb_copy_to_linear_data(skb,
                                        (unsigned char *)isa_bus_to_virt((lp->rx_ring[entry].base & 0x00ffffff)),
-                                       pkt_len,0);
+                                       pkt_len);
                                skb->protocol=eth_type_trans(skb,dev);
                                netif_rx(skb);
                                dev->last_rx = jiffies;
index 460a087..3450051 100644 (file)
@@ -2357,8 +2357,8 @@ static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do)
                                        np->rx_dma[entry],
                                        buflen,
                                        PCI_DMA_FROMDEVICE);
-                               eth_copy_and_sum(skb,
-                                       np->rx_skbuff[entry]->data, pkt_len, 0);
+                               skb_copy_to_linear_data(skb,
+                                       np->rx_skbuff[entry]->data, pkt_len);
                                skb_put(skb, pkt_len);
                                pci_dma_sync_single_for_device(np->pci_dev,
                                        np->rx_dma[entry],
index 8dbd6d1..5e7999d 100644 (file)
@@ -936,7 +936,7 @@ static void ni52_rcv_int(struct net_device *dev)
                                        {
                                                skb_reserve(skb,2);
                                                skb_put(skb,totlen);
-                                               eth_copy_and_sum(skb,(char *) p->base+(unsigned long) rbd->buffer,totlen,0);
+                                               skb_copy_to_linear_data(skb,(char *) p->base+(unsigned long) rbd->buffer,totlen);
                                                skb->protocol=eth_type_trans(skb,dev);
                                                netif_rx(skb);
                                                dev->last_rx = jiffies;
index 3818edf..4ef5fe3 100644 (file)
@@ -1096,7 +1096,7 @@ static void ni65_recv_intr(struct net_device *dev,int csr0)
 #ifdef RCV_VIA_SKB
                                if( (unsigned long) (skb->data + R_BUF_SIZE) > 0x1000000) {
                                        skb_put(skb,len);
-                                       eth_copy_and_sum(skb, (unsigned char *)(p->recv_skb[p->rmdnum]->data),len,0);
+                                       skb_copy_to_linear_data(skb, (unsigned char *)(p->recv_skb[p->rmdnum]->data),len);
                                }
                                else {
                                        struct sk_buff *skb1 = p->recv_skb[p->rmdnum];
@@ -1108,7 +1108,7 @@ static void ni65_recv_intr(struct net_device *dev,int csr0)
                                }
 #else
                                skb_put(skb,len);
-                               eth_copy_and_sum(skb, (unsigned char *) p->recvbounce[p->rmdnum],len,0);
+                               skb_copy_to_linear_data(skb, (unsigned char *) p->recvbounce[p->rmdnum],len);
 #endif
                                p->stats.rx_packets++;
                                p->stats.rx_bytes += len;
index df8998b..3cdbe11 100644 (file)
@@ -1567,7 +1567,7 @@ static void netdrv_rx_interrupt (struct net_device *dev,
                if (skb) {
                        skb_reserve (skb, 2);   /* 16 byte align the IP fields. */
 
-                       eth_copy_and_sum (skb, &rx_ring[ring_offset + 4], pkt_size, 0);
+                       skb_copy_to_linear_data (skb, &rx_ring[ring_offset + 4], pkt_size);
                        skb_put (skb, pkt_size);
 
                        skb->protocol = eth_type_trans (skb, dev);
index 9c171a7..465485a 100644 (file)
@@ -1235,9 +1235,9 @@ static void pcnet32_rx_entry(struct net_device *dev,
                                            lp->rx_dma_addr[entry],
                                            pkt_len,
                                            PCI_DMA_FROMDEVICE);
-               eth_copy_and_sum(skb,
+               skb_copy_to_linear_data(skb,
                                 (unsigned char *)(lp->rx_skbuff[entry]->data),
-                                pkt_len, 0);
+                                pkt_len);
                pci_dma_sync_single_for_device(lp->pci_dev,
                                               lp->rx_dma_addr[entry],
                                               pkt_len,
index ad94358..451486b 100644 (file)
@@ -690,9 +690,9 @@ static int lan_saa9730_rx(struct net_device *dev)
                                lp->stats.rx_packets++;
                                skb_reserve(skb, 2);    /* 16 byte align */
                                skb_put(skb, len);      /* make room */
-                               eth_copy_and_sum(skb,
+                               skb_copy_to_linear_data(skb,
                                                 (unsigned char *) pData,
-                                                len, 0);
+                                                len);
                                skb->protocol = eth_type_trans(skb, dev);
                                netif_rx(skb);
                                dev->last_rx = jiffies;
index 2106bec..384b468 100644 (file)
@@ -320,7 +320,7 @@ static inline void sgiseeq_rx(struct net_device *dev, struct sgiseeq_private *sp
                                skb_put(skb, len);
 
                                /* Copy out of kseg1 to avoid silly cache flush. */
-                               eth_copy_and_sum(skb, pkt_pointer + 2, len, 0);
+                               skb_copy_to_linear_data(skb, pkt_pointer + 2, len);
                                skb->protocol = eth_type_trans(skb, dev);
 
                                /* We don't want to receive our own packets */
index bc8de48..ec2ad9f 100644 (file)
@@ -548,7 +548,7 @@ static inline int sis190_try_rx_copy(struct sk_buff **sk_buff, int pkt_size,
                skb = dev_alloc_skb(pkt_size + NET_IP_ALIGN);
                if (skb) {
                        skb_reserve(skb, NET_IP_ALIGN);
-                       eth_copy_and_sum(skb, sk_buff[0]->data, pkt_size, 0);
+                       skb_copy_to_linear_data(skb, sk_buff[0]->data, pkt_size);
                        *sk_buff = skb;
                        sis190_give_to_asic(desc, rx_buf_sz);
                        ret = 0;
index 786d4b9..f2e1019 100644 (file)
@@ -1456,7 +1456,7 @@ static int __netdev_rx(struct net_device *dev, int *quota)
                        pci_dma_sync_single_for_cpu(np->pci_dev,
                                                    np->rx_info[entry].mapping,
                                                    pkt_len, PCI_DMA_FROMDEVICE);
-                       eth_copy_and_sum(skb, np->rx_info[entry].skb->data, pkt_len, 0);
+                       skb_copy_to_linear_data(skb, np->rx_info[entry].skb->data, pkt_len);
                        pci_dma_sync_single_for_device(np->pci_dev,
                                                       np->rx_info[entry].mapping,
                                                       pkt_len, PCI_DMA_FROMDEVICE);
index a123ea8..b77ab6e 100644 (file)
@@ -777,7 +777,7 @@ static void sun3_82586_rcv_int(struct net_device *dev)
                                        {
                                                skb_reserve(skb,2);
                                                skb_put(skb,totlen);
-                                               eth_copy_and_sum(skb,(char *) p->base+swab32((unsigned long) rbd->buffer),totlen,0);
+                                               skb_copy_to_linear_data(skb,(char *) p->base+swab32((unsigned long) rbd->buffer),totlen);
                                                skb->protocol=eth_type_trans(skb,dev);
                                                netif_rx(skb);
                                                p->stats.rx_packets++;
index 791e081..f1548c0 100644 (file)
@@ -853,10 +853,9 @@ static int lance_rx( struct net_device *dev )
 
                                skb_reserve( skb, 2 );  /* 16 byte align */
                                skb_put( skb, pkt_len );        /* Make room */
-//                             skb_copy_to_linear_data(skb, PKTBUF_ADDR(head), pkt_len);
-                               eth_copy_and_sum(skb,
+                               skb_copy_to_linear_data(skb,
                                                 PKTBUF_ADDR(head),
-                                                pkt_len, 0);
+                                                pkt_len);
 
                                skb->protocol = eth_type_trans( skb, dev );
                                netif_rx( skb );
index 2ad8d58..b3e0158 100644 (file)
@@ -860,7 +860,7 @@ static void bigmac_rx(struct bigmac *bp)
                        sbus_dma_sync_single_for_cpu(bp->bigmac_sdev,
                                                     this->rx_addr, len,
                                                     SBUS_DMA_FROMDEVICE);
-                       eth_copy_and_sum(copy_skb, (unsigned char *)skb->data, len, 0);
+                       skb_copy_to_linear_data(copy_skb, (unsigned char *)skb->data, len);
                        sbus_dma_sync_single_for_device(bp->bigmac_sdev,
                                                        this->rx_addr, len,
                                                        SBUS_DMA_FROMDEVICE);
index e1f912d..c8ba534 100644 (file)
@@ -1313,7 +1313,7 @@ static void rx_poll(unsigned long data)
                                                            np->rx_buf_sz,
                                                            PCI_DMA_FROMDEVICE);
 
-                               eth_copy_and_sum(skb, np->rx_skbuff[entry]->data, pkt_len, 0);
+                               skb_copy_to_linear_data(skb, np->rx_skbuff[entry]->data, pkt_len);
                                pci_dma_sync_single_for_device(np->pci_dev,
                                                               desc->frag[0].addr,
                                                               np->rx_buf_sz,
index 4272253..053b7cb 100644 (file)
@@ -549,9 +549,9 @@ static void lance_rx_dvma(struct net_device *dev)
 
                        skb_reserve(skb, 2);            /* 16 byte align */
                        skb_put(skb, len);              /* make room */
-                       eth_copy_and_sum(skb,
+                       skb_copy_to_linear_data(skb,
                                         (unsigned char *)&(ib->rx_buf [entry][0]),
-                                        len, 0);
+                                        len);
                        skb->protocol = eth_type_trans(skb, dev);
                        netif_rx(skb);
                        dev->last_rx = jiffies;
index fa70e0b..1b65ae8 100644 (file)
@@ -439,8 +439,8 @@ static void qe_rx(struct sunqe *qep)
                        } else {
                                skb_reserve(skb, 2);
                                skb_put(skb, len);
-                               eth_copy_and_sum(skb, (unsigned char *) this_qbuf,
-                                                len, 0);
+                               skb_copy_to_linear_data(skb, (unsigned char *) this_qbuf,
+                                                len);
                                skb->protocol = eth_type_trans(skb, qep->dev);
                                netif_rx(skb);
                                qep->dev->last_rx = jiffies;
index ea89677..53efd66 100644 (file)
@@ -197,8 +197,8 @@ int tulip_poll(struct net_device *dev, int *budget)
                                                                   tp->rx_buffers[entry].mapping,
                                                                   pkt_len, PCI_DMA_FROMDEVICE);
 #if ! defined(__alpha__)
-                                       eth_copy_and_sum(skb, tp->rx_buffers[entry].skb->data,
-                                                        pkt_len, 0);
+                                       skb_copy_to_linear_data(skb, tp->rx_buffers[entry].skb->data,
+                                                        pkt_len);
                                        skb_put(skb, pkt_len);
 #else
                                        memcpy(skb_put(skb, pkt_len),
@@ -420,8 +420,8 @@ static int tulip_rx(struct net_device *dev)
                                                            tp->rx_buffers[entry].mapping,
                                                            pkt_len, PCI_DMA_FROMDEVICE);
 #if ! defined(__alpha__)
-                               eth_copy_and_sum(skb, tp->rx_buffers[entry].skb->data,
-                                                pkt_len, 0);
+                               skb_copy_to_linear_data(skb, tp->rx_buffers[entry].skb->data,
+                                                pkt_len);
                                skb_put(skb, pkt_len);
 #else
                                memcpy(skb_put(skb, pkt_len),
index 38f3b99..5824f6a 100644 (file)
@@ -1232,7 +1232,7 @@ static int netdev_rx(struct net_device *dev)
                                pci_dma_sync_single_for_cpu(np->pci_dev,np->rx_addr[entry],
                                                            np->rx_skbuff[entry]->len,
                                                            PCI_DMA_FROMDEVICE);
-                               eth_copy_and_sum(skb, np->rx_skbuff[entry]->data, pkt_len, 0);
+                               skb_copy_to_linear_data(skb, np->rx_skbuff[entry]->data, pkt_len);
                                skb_put(skb, pkt_len);
                                pci_dma_sync_single_for_device(np->pci_dev,np->rx_addr[entry],
                                                               np->rx_skbuff[entry]->len,
index 2470b1e..37e35cd 100644 (file)
@@ -1208,7 +1208,7 @@ static void investigate_read_descriptor(struct net_device *dev,struct xircom_pri
                                goto out;
                        }
                        skb_reserve(skb, 2);
-                       eth_copy_and_sum(skb, (unsigned char*)&card->rx_buffer[bufferoffset / 4], pkt_len, 0);
+                       skb_copy_to_linear_data(skb, (unsigned char*)&card->rx_buffer[bufferoffset / 4], pkt_len);
                        skb_put(skb, pkt_len);
                        skb->protocol = eth_type_trans(skb, dev);
                        netif_rx(skb);
index f641729..f984fbd 100644 (file)
@@ -1242,8 +1242,8 @@ xircom_rx(struct net_device *dev)
                                && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
                                skb_reserve(skb, 2);    /* 16 byte align the IP header */
 #if ! defined(__alpha__)
-                               eth_copy_and_sum(skb, bus_to_virt(tp->rx_ring[entry].buffer1),
-                                                                pkt_len, 0);
+                               skb_copy_to_linear_data(skb, bus_to_virt(tp->rx_ring[entry].buffer1),
+                                                                pkt_len);
                                skb_put(skb, pkt_len);
 #else
                                memcpy(skb_put(skb, pkt_len),
index 15b2fb8..df52454 100644 (file)
@@ -1703,7 +1703,7 @@ typhoon_rx(struct typhoon *tp, struct basic_ring *rxRing, volatile u32 * ready,
                        pci_dma_sync_single_for_cpu(tp->pdev, dma_addr,
                                                    PKT_BUF_SZ,
                                                    PCI_DMA_FROMDEVICE);
-                       eth_copy_and_sum(new_skb, skb->data, pkt_len, 0);
+                       skb_copy_to_linear_data(new_skb, skb->data, pkt_len);
                        pci_dma_sync_single_for_device(tp->pdev, dma_addr,
                                                       PKT_BUF_SZ,
                                                       PCI_DMA_FROMDEVICE);
index 86e90c5..76752d8 100644 (file)
@@ -255,7 +255,7 @@ static void catc_rx_done(struct urb *urb)
                if (!(skb = dev_alloc_skb(pkt_len)))
                        return;
 
-               eth_copy_and_sum(skb, pkt_start + pkt_offset, pkt_len, 0);
+               skb_copy_to_linear_data(skb, pkt_start + pkt_offset, pkt_len);
                skb_put(skb, pkt_len);
 
                skb->protocol = eth_type_trans(skb, catc->netdev);
index 60d2944..524dc5f 100644 (file)
@@ -635,7 +635,7 @@ static void kaweth_usb_receive(struct urb *urb)
 
                skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
 
-               eth_copy_and_sum(skb, kaweth->rx_buf + 2, pkt_len, 0);
+               skb_copy_to_linear_data(skb, kaweth->rx_buf + 2, pkt_len);
 
                skb_put(skb, pkt_len);
 
index adea290..565f6cc 100644 (file)
@@ -1492,9 +1492,9 @@ static int rhine_rx(struct net_device *dev, int limit)
                                                            rp->rx_buf_sz,
                                                            PCI_DMA_FROMDEVICE);
 
-                               eth_copy_and_sum(skb,
+                               skb_copy_to_linear_data(skb,
                                                 rp->rx_skbuff[entry]->data,
-                                                pkt_len, 0);
+                                                pkt_len);
                                skb_put(skb, pkt_len);
                                pci_dma_sync_single_for_device(rp->pdev,
                                                               rp->rx_skbuff_dma[entry],
index ce9230b..c8b5c22 100644 (file)
@@ -1011,7 +1011,7 @@ static inline void wl3501_md_ind_interrupt(struct net_device *dev,
        } else {
                skb->dev = dev;
                skb_reserve(skb, 2); /* IP headers on 16 bytes boundaries */
-               eth_copy_and_sum(skb, (unsigned char *)&sig.daddr, 12, 0);
+               skb_copy_to_linear_data(skb, (unsigned char *)&sig.daddr, 12);
                wl3501_receive(this, skb->data, pkt_len);
                skb_put(skb, pkt_len);
                skb->protocol   = eth_type_trans(skb, dev);
index f2a90a7..870c539 100644 (file)
@@ -1137,7 +1137,7 @@ static int yellowfin_rx(struct net_device *dev)
                                if (skb == NULL)
                                        break;
                                skb_reserve(skb, 2);    /* 16 byte align the IP header */
-                               eth_copy_and_sum(skb, rx_skb->data, pkt_len, 0);
+                               skb_copy_to_linear_data(skb, rx_skb->data, pkt_len);
                                skb_put(skb, pkt_len);
                                pci_dma_sync_single_for_device(yp->pci_dev, desc->addr,
                                                                                           yp->rx_buf_sz,
index 071c67a..f48eb89 100644 (file)
@@ -40,12 +40,6 @@ extern int           eth_header_cache(struct neighbour *neigh,
                                         struct hh_cache *hh);
 
 extern struct net_device *alloc_etherdev(int sizeof_priv);
-static inline void eth_copy_and_sum (struct sk_buff *dest, 
-                                    const unsigned char *src, 
-                                    int len, int base)
-{
-       memcpy (dest->data, src, len);
-}
 
 /**
  * is_zero_ether_addr - Determine if give Ethernet address is all zeros.