Deleted Added
full compact
35c35
< __FBSDID("$FreeBSD: head/sys/pci/if_pcn.c 129878 2004-05-30 20:00:41Z phk $");
---
> __FBSDID("$FreeBSD: head/sys/pci/if_pcn.c 130270 2004-06-09 14:34:04Z naddy $");
140d139
< static uint32_t pcn_mchash (const uint8_t *);
310,330d308
< #define DC_POLY 0xEDB88320
<
< static u_int32_t
< pcn_mchash(addr)
< const uint8_t *addr;
< {
< uint32_t crc;
< int idx, bit;
< uint8_t data;
<
< /* Compute CRC for the address value. */
< crc = 0xFFFFFFFF; /* initial value */
<
< for (idx = 0; idx < 6; idx++) {
< for (data = *addr++, bit = 0; bit < 8; bit++, data >>= 1)
< crc = (crc >> 1) ^ (((crc ^ data) & 1) ? DC_POLY : 0);
< }
<
< return ((crc >> 26) & 0x3F);
< }
<
359c337,338
< h = pcn_mchash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
---
> h = ether_crc32_le(LLADDR((struct sockaddr_dl *)
> ifma->ifma_addr), ETHER_ADDR_LEN) >> 26;