summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ic/am7990.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/sys/dev/ic/am7990.c b/sys/dev/ic/am7990.c
index ea5a6dde9c1..2202dc534df 100644
--- a/sys/dev/ic/am7990.c
+++ b/sys/dev/ic/am7990.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: am7990.c,v 1.34 2004/05/12 06:35:10 tedu Exp $ */
+/* $OpenBSD: am7990.c,v 1.35 2004/06/01 12:58:51 mcbride Exp $ */
/* $NetBSD: am7990.c,v 1.22 1996/10/13 01:37:19 christos Exp $ */
/*-
@@ -1003,9 +1003,7 @@ am7990_setladrf(ac, af)
{
struct ifnet *ifp = &ac->ac_if;
struct ether_multi *enm;
- register u_char *cp, c;
register u_int32_t crc;
- register int i, len;
struct ether_multistep step;
/*
@@ -1034,21 +1032,7 @@ am7990_setladrf(ac, af)
goto allmulti;
}
- cp = enm->enm_addrlo;
- crc = 0xffffffff;
- for (len = sizeof(enm->enm_addrlo); --len >= 0;) {
- c = *cp++;
- for (i = 8; --i >= 0;) {
- if ((crc & 0x01) ^ (c & 0x01)) {
- crc >>= 1;
- crc ^= 0xedb88320;
- } else
- crc >>= 1;
- c >>= 1;
- }
- }
- /* Just want the 6 most significant bits. */
- crc >>= 26;
+ crc = ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN) >> 26;
/* Set the corresponding bit in the filter. */
af[crc >> 4] |= 1 << (crc & 0xf);