patch-2.4.19 linux-2.4.19/drivers/net/pcmcia/smc91c92_cs.c
Next file: linux-2.4.19/drivers/net/pcmcia/wavelan_cs.c
Previous file: linux-2.4.19/drivers/net/pcmcia/ray_cs.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/net/pcmcia/smc91c92_cs.c
- Orig date:
Tue Nov 13 09:02:30 2001
diff -urN linux-2.4.18/drivers/net/pcmcia/smc91c92_cs.c linux-2.4.19/drivers/net/pcmcia/smc91c92_cs.c
@@ -34,6 +34,7 @@
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
+#include <linux/crc32.h>
#include <asm/io.h>
#include <asm/system.h>
@@ -1740,31 +1741,6 @@
return &smc->stats;
}
-/*======================================================================
-
- Compute the AUTODIN polynomial "CRC32" for ethernet packets.
-
-======================================================================*/
-
-static const u_int ethernet_polynomial = 0x04c11db7U;
-
-static u_int ether_crc(int length, u_char *data)
-{
- int crc = 0xffffffff; /* Initial value. */
-
- while (--length >= 0) {
- u_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);
- }
- }
- /* The hash index is the either the upper or lower bits of the CRC, so
- * we return the entire CRC.
- */
- return crc;
-}
/*======================================================================
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)