diff options
Diffstat (limited to 'hw/ne2000.c')
-rw-r--r-- | hw/ne2000.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/hw/ne2000.c b/hw/ne2000.c index 71452e1f2e..d02e60c4a6 100644 --- a/hw/ne2000.c +++ b/hw/ne2000.c @@ -150,30 +150,6 @@ static void ne2000_update_irq(NE2000State *s) qemu_set_irq(s->irq, (isr != 0)); } -#define POLYNOMIAL 0x04c11db6 - -/* From FreeBSD */ -/* XXX: optimize */ -static int compute_mcast_idx(const uint8_t *ep) -{ - uint32_t crc; - int carry, i, j; - uint8_t b; - - crc = 0xffffffff; - for (i = 0; i < 6; i++) { - b = *ep++; - for (j = 0; j < 8; j++) { - carry = ((crc & 0x80000000L) ? 1 : 0) ^ (b & 0x01); - crc <<= 1; - b >>= 1; - if (carry) - crc = ((crc ^ POLYNOMIAL) | carry); - } - } - return (crc >> 26); -} - static int ne2000_buffer_full(NE2000State *s) { int avail, index, boundary; |