[NET]: Kill eth_copy_and_sum().
authorDavid S. Miller <davem@davemloft.net>
Wed, 11 Jul 2007 05:08:12 +0000 (22:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
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 4c0a7d732f699113cb9baddf44b37f675d61b794..615b6583d9b01084831bd8eea5ed00aecf9ab30b 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 cab395da25da533f8947739cf37473f5d4433e0c..6f3ed6a72e0be3a2c895485824ff8c8ec842e54f 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 e58288e143698c17657cc7521bc0f754dbc33a02..703d47eee4362206e308f57f5d02015a3d0a7464 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 d38335d2d710d3d2344d6a154eba7471aaed3ed6..0288279be9aad8d22ff1a7406eca2a67781833ec 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 da1a22c13865fc2c94f77aae7a542c48682fdfa7..ab18343e58ef844068dce2716b55a2c474795d5f 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 0877fc372f4b87dc8c11d661f52da6a20f381053..e89ace109a5d149b3c62b3628c72a9a722512596 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 a844b1fe2dc45d29af24e6c7803af5e152e28976..21a6ccbf92e0de98f6effc192ba47f4aedae8786 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 81d5a374042a3a103f29d58d847963bccc70bef3..a45de6975bfe74735feacd88e71df684b6904017 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 a241ae7855a309391e62db8e8b654dae6aaf8b38..bc5a38a6705f06df72d8452e555b0de6f008ade0 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 2438c5bff23730d084590fd0cbc0c236955d10dd..f6ece1d43f6e81494d6fd1ca6f1d45112882b15e 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 c27cfcef45fafeddec8cc4a4e1cf23844e61fe3c..e86b3691765b7721eff0947e91d92d5d396c1c57 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 74ec64a1625d2763ea8b03373b4f686055df51c1..a4ace071f1cb5f1794b13d8b49b150d9ca11dbc2 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 9800341956a2e36a1277e9f9830547abdbc737ba..9afa47edfc5850e65309530f68e8dbab2f437656 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 5e517946f46a6c1deaee52eb25664467cd233528..119778401e486f9ea808f6266702adfe2ee7e403 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 abe9b089c610552988e1a56d3a50d01e5cc5e4cf..ff9f177d7157ec9f43326d6c6fc61226d8fab3ba 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 255b09124e1120c6c3be9306eaadac0ef1740f48..03023dd17829da101765112c4b7ef6054e4a9325 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 2521b111b3a5edd2636997a4bbd7257cc1062054..15254dc7876a453e19eac1f88525a0fa9b17da8f 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 d5f694fc4a216369e19f97a75a7f53caaebf386c..d9ce1aef148a5d9ab4c4d3ccf8c4b0e5ded4eda2 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 0fe96c85828b0b997014904c23b737c56e574bec..a2f37e52b9284cd4ec128b19cf8475a04a59d9a3 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 460a08718c69f8c740fcb5716720ea44219b14f6..3450051ae56b635c260f56d159314466eb0e5a0a 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 8dbd6d1900b583e10c0bab764ee9651e5c2ee265..5e7999db2096a69cd0e67bdaae38de4a72868889 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 3818edf0ac18c8ad443d712ebc31c3b2404df1fd..4ef5fe345191fa6122499aae9242702fe8a7ca77 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 df8998b4f37ee5819b07af0a60a8f45e017d5b80..3cdbe118200be40ffcc4d4c5527467fcc4bfac84 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 9c171a7390e2b4ab09e5a77f3fee8c19732e05d3..465485a3fbc642529c0c84a60c92ddd10b102b2e 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 ad94358ece8943da8e9327052657b99bc7a71301..451486b32f233e04de60207fb965b9c0e7873e4f 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 2106becf6990c42dbe297753f3aeb07cd12ba1c8..384b4685e977a453884d56fc81c4f2b0747680da 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 bc8de48da3135f923525a3f8c902c9c5fbd26d9f..ec2ad9f0efa25bcbc46509149920bdd8a6a4ec5a 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 786d4b9c07ecac39aab21fa877e8a63144981a1c..f2e1019672042da445cf3d5269d56ddf0deded20 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 a123ea87893ba8c14098ac37ad322b23bfee5fa9..b77ab6e8fd3576eb7369f14d3981872b4e8ef40c 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 791e081fdc15be965a914707bfdda01671b586c3..f1548c033327d9a3ae3d9c50438de721d7663906 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 2ad8d58dee3b5bb8049f10bab5453e084d0055e5..b3e0158def4ff9f6021b72b4d25000e61176a060 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 e1f912d04043e82c3de70201ed87d0ceb7b097f2..c8ba534c17bf969972a088fdb7e838ad59c15738 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 42722530ab24501f4ca647ea0b702f33557728e4..053b7cb0d94406fb8b3b30b3a21cf51d4494be7e 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 fa70e0b78af72d3c6ba4e5051bf95ad47273dad4..1b65ae8a1c7c6e3ef778d727fc6f0be83c40c9b3 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 ea896777bcafecc84fce5896b8256892541ea8f1..53efd6694e755e80e64504e21fd90d0666bccec5 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 38f3b99716b8bb8c4357d9291d00fe181f29aeec..5824f6a354950380c8e1116b0a5b537b6ecb8eff 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 2470b1ee33c03b2243f9ed40aa4b0071a321d949..37e35cd277a18818310e7756a15b92c138cde791 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 f64172927377770549c04bee8779852a3ced2994..f984fbde8b23356ab41805a4c0ae773477cc3996 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 15b2fb8aa49280008f1b38925340df4495c19cdd..df524548d5314e92731d0913848a9ef22aabaaeb 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 86e90c59d55156473058e9ae6a2a6137da8e5283..76752d84a30f80f7cfcafc2bce6437c6f582bbe8 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 60d29440f31643d40792263b28fdd79db0955142..524dc5f5e46ddfd197cea239e60c59caffd93374 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 adea290a9d5e4e6f0015d2c939589d67ca98ee05..565f6cc185ceccefe0327cf49df0f65b6867b5b1 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 ce9230b2f630e518870c4210a987ce61f4d2c03c..c8b5c2271938348cb0890419effcb3160cb32ff6 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 f2a90a7fa2d6ff9fb826224342ecec58ad3b6ced..870c5393c21a0c4ecf7d926355705350d889fda4 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 071c67abed86163d37d82b149ee5c52588de3a0b..f48eb89efd0fd36efc176c11ce0ec1c036606ecc 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.