diff options
| author | David E. O'Brien <obrien@FreeBSD.org> | 2003-11-13 20:55:53 +0000 |
|---|---|---|
| committer | David E. O'Brien <obrien@FreeBSD.org> | 2003-11-13 20:55:53 +0000 |
| commit | aa8255025ab0924083e32a0a72457566d8d6e7da (patch) | |
| tree | 9f53fad8ba546c1e709992d118c397465dd5b01f /sys/dev/bge | |
| parent | 2e76d77fd0916092e6d3c4a78d678bd795cea12f (diff) | |
Notes
Diffstat (limited to 'sys/dev/bge')
| -rw-r--r-- | sys/dev/bge/if_bge.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 3a2321aaf1bf..0b8328ca4120 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -209,7 +209,7 @@ static void bge_ifmedia_sts (struct ifnet *, struct ifmediareq *); static u_int8_t bge_eeprom_getbyte (struct bge_softc *, int, u_int8_t *); static int bge_read_eeprom (struct bge_softc *, caddr_t, int, int); -static u_int32_t bge_crc (caddr_t); +static u_int32_t bge_mchash (caddr_t); static void bge_setmulti (struct bge_softc *); static void bge_handle_events (struct bge_softc *); @@ -1134,10 +1134,12 @@ bge_init_tx_ring(sc) #define BGE_POLY 0xEDB88320 static u_int32_t -bge_crc(addr) +bge_mchash(addr) caddr_t addr; { - u_int32_t idx, bit, data, crc; + u_int32_t crc; + int idx, bit; + u_int8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ @@ -1177,7 +1179,7 @@ bge_setmulti(sc) TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; - h = bge_crc(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); + h = bge_mchash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); hashes[(h & 0x60) >> 5] |= 1 << (h & 0x1F); } |
