diff options
Diffstat (limited to 'hw/opencores_eth.c')
-rw-r--r-- | hw/opencores_eth.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/hw/opencores_eth.c b/hw/opencores_eth.c index 4c7696935f..350f73173a 100644 --- a/hw/opencores_eth.c +++ b/hw/opencores_eth.c @@ -351,31 +351,6 @@ static int open_eth_can_receive(VLANClientState *nc) (rx_desc(s)->len_flags & RXD_E); } -#define POLYNOMIAL 0x04c11db6 - -/* From FreeBSD */ -/* XXX: optimize */ -static unsigned 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 ssize_t open_eth_receive(VLANClientState *nc, const uint8_t *buf, size_t size) { |