diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2009-11-17 18:46:36 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2009-11-17 18:46:36 +0000 |
commit | 8078502e8f2a975ee7a7dce5dbb5f1b0f603b292 (patch) | |
tree | 175d5a4365fcc46cbc8d8496b4f7cc7ab125dd59 /sys/dev/ic/athn.c | |
parent | 8b20e7a0245134af011ffa5cd29595c510c3418c (diff) |
fix previous.
Diffstat (limited to 'sys/dev/ic/athn.c')
-rw-r--r-- | sys/dev/ic/athn.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c index f5724687526..5e21e99795a 100644 --- a/sys/dev/ic/athn.c +++ b/sys/dev/ic/athn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: athn.c,v 1.7 2009/11/17 18:21:07 damien Exp $ */ +/* $OpenBSD: athn.c,v 1.8 2009/11/17 18:46:35 damien Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -4511,9 +4511,10 @@ athn_set_multi(struct athn_softc *sc) addr = enm->enm_addrlo; /* Calculate the XOR value of all eight 6-bit words. */ val = addr[0] | addr[1] << 8 | addr[2] << 16; - bit = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ (val & 0x3f); + bit = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; val = addr[3] | addr[4] << 8 | addr[5] << 16; - bit ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ (val & 0x3f); + bit ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; + bit &= 0x3f; if (bit < 32) lo |= 1 << bit; else |