patch-2.4.19 linux-2.4.19/drivers/net/fealnx.c

Next file: linux-2.4.19/drivers/net/gmac.c
Previous file: linux-2.4.19/drivers/net/fc/iph5526.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/drivers/net/fealnx.c linux-2.4.19/drivers/net/fealnx.c
@@ -84,6 +84,7 @@
 #include <linux/init.h>
 #include <linux/mii.h>
 #include <linux/ethtool.h>
+#include <linux/crc32.h>
 #include <asm/processor.h>	/* Processor type for cache alignment. */
 #include <asm/bitops.h>
 #include <asm/io.h>
@@ -439,7 +440,6 @@
 static int start_tx(struct sk_buff *skb, struct net_device *dev);
 static void intr_handler(int irq, void *dev_instance, struct pt_regs *regs);
 static int netdev_rx(struct net_device *dev);
-static inline unsigned ether_crc(int length, unsigned char *data);
 static void set_rx_mode(struct net_device *dev);
 static struct net_device_stats *get_stats(struct net_device *dev);
 static int mii_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
@@ -1726,26 +1726,6 @@
 	return &np->stats;
 }
 
-
-static unsigned const ethernet_polynomial = 0x04c11db7U;
-static inline u32 ether_crc(int length, unsigned char *data)
-{
-	int crc = -1;
-
-	while (--length >= 0) {
-		unsigned char current_octet = *data++;
-		int bit;
-
-		for (bit = 0; bit < 8; bit++, current_octet >>= 1) {
-			crc = (crc << 1) ^
-			    ((crc < 0) ^ (current_octet & 1) ? ethernet_polynomial : 0);
-		}
-	}
-
-	return crc;
-}
-
-
 static void set_rx_mode(struct net_device *dev)
 {
 	struct netdev_private *np = dev->priv;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)