patch-2.4.19 linux-2.4.19/drivers/net/atp.c
Next file: linux-2.4.19/drivers/net/au1000_eth.c
Previous file: linux-2.4.19/drivers/net/at1700.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/net/atp.c
- Orig date:
Sun Sep 30 12:26:06 2001
diff -urN linux-2.4.18/drivers/net/atp.c linux-2.4.19/drivers/net/atp.c
@@ -140,6 +140,7 @@
#include <asm/dma.h>
#include <linux/errno.h>
#include <linux/init.h>
+#include <linux/crc32.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
@@ -666,7 +667,7 @@
}
num_tx_since_rx++;
} else if (num_tx_since_rx > 8
- && jiffies > dev->last_rx + HZ) {
+ && time_after(jiffies, dev->last_rx + HZ)) {
if (net_debug > 2)
printk(KERN_DEBUG "%s: Missed packet? No Rx after %d Tx and "
"%ld jiffies status %02x CMR1 %02x.\n", dev->name,
@@ -857,26 +858,6 @@
* Set or clear the multicast filter for this adapter.
*/
-/* The little-endian AUTODIN32 ethernet CRC calculation.
- This is common code and should be moved to net/core/crc.c */
-static unsigned const ethernet_polynomial_le = 0xedb88320U;
-static inline unsigned ether_crc_le(int length, unsigned char *data)
-{
- unsigned int crc = 0xffffffff; /* Initial value. */
- while(--length >= 0) {
- unsigned char current_octet = *data++;
- int bit;
- for (bit = 8; --bit >= 0; current_octet >>= 1) {
- if ((crc ^ current_octet) & 1) {
- crc >>= 1;
- crc ^= ethernet_polynomial_le;
- } else
- crc >>= 1;
- }
- }
- return crc;
-}
-
static void set_rx_mode_8002(struct net_device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)