summaryrefslogtreecommitdiffstats
path: root/net/ethernet/eth.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-28 22:00:09 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-28 22:00:09 +0000
commit1a1d77dd589de5a567fa95e36aa6999c704ceca4 (patch)
tree141e31f89f18b9fe0831f31852e0435ceaccafc5 /net/ethernet/eth.c
parentfb9c690a18b3d66925a65b17441c37fa14d4370b (diff)
Merge with 2.4.0-test7.
Diffstat (limited to 'net/ethernet/eth.c')
-rw-r--r--net/ethernet/eth.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 8209f43aa..b26c97e4e 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -258,43 +258,3 @@ void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev, unsign
{
memcpy(((u8*)hh->hh_data) + 2, haddr, dev->addr_len);
}
-
-#if 0 /*ndef CONFIG_IP_ROUTER*/
-/* This one is only slowdown with checksumming in user process context. --ANK */
-
-/*
- * Copy from an ethernet device memory space to an sk_buff while checksumming if IP
- */
-
-void eth_copy_and_sum(struct sk_buff *dest, unsigned char *src, int length, int base)
-{
- struct ethhdr *eth;
- struct iphdr *iph;
- int ip_length;
-
- eth=(struct ethhdr *)src;
- if(eth->h_proto!=htons(ETH_P_IP))
- {
- memcpy(dest->data,src,length);
- return;
- }
- /*
- * We have to watch for padded packets. The csum doesn't include the
- * padding, and there is no point in copying the padding anyway.
- * We have to use the smaller of length and ip_length because it
- * can happen that ip_length > length.
- */
- memcpy(dest->data,src,sizeof(struct iphdr)+ETH_HLEN); /* ethernet is always >= 34 */
- length -= sizeof(struct iphdr) + ETH_HLEN;
- iph=(struct iphdr*)(src+ETH_HLEN);
- ip_length = ntohs(iph->tot_len) - sizeof(struct iphdr);
-
- /* Also watch out for bogons - min IP size is 8 (rfc-1042) */
- if ((ip_length <= length) && (ip_length > 7))
- length=ip_length;
-
- dest->csum=csum_partial_copy_nocheck(src+sizeof(struct iphdr)+ETH_HLEN,dest->data+sizeof(struct iphdr)+ETH_HLEN,length,base);
- dest->ip_summed=1;
-}
-
-#endif /* !(CONFIG_IP_ROUTER) */