diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2001-12-08 04:44:38 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2001-12-08 04:44:38 +0000 |
commit | 8213737ac24c7d3a259bd2ad5b5e4fd64e0a45a0 (patch) | |
tree | 370a12c94cf02c9aed858ab23ebfa74dde120516 /sys | |
parent | e3c76bf237ed692dbf574a3cd31fbed3044efd84 (diff) |
Go ahead and fix the xircom filter setup to work on big endian too (untested, but it's pretty similiar to the tested 21143 case).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/dc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 967f25b9a86..455e8121e95 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.42 2001/12/08 04:39:09 jason Exp $ */ +/* $OpenBSD: dc.c,v 1.43 2001/12/08 04:44:37 jason Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1180,19 +1180,19 @@ void dc_setfilt_xircom(sc) ETHER_FIRST_MULTI(step, ac, enm); while (enm != NULL) { h = dc_crc_le(sc, enm->enm_addrlo); - sp[h >> 4] |= 1 << (h & 0xF); + sp[h >> 4] |= htole32(1 << (h & 0xF)); ETHER_NEXT_MULTI(step, enm); } if (ifp->if_flags & IFF_BROADCAST) { h = dc_crc_le(sc, (caddr_t)ðerbroadcastaddr); - sp[h >> 4] |= 1 << (h & 0xF); + sp[h >> 4] |= htole32(1 << (h & 0xF)); } /* Set our MAC address */ - sp[0] = ((u_int16_t *)sc->arpcom.ac_enaddr)[0]; - sp[1] = ((u_int16_t *)sc->arpcom.ac_enaddr)[1]; - sp[2] = ((u_int16_t *)sc->arpcom.ac_enaddr)[2]; + sp[0] = DC_SP_FIELD(sc->arpcom.ac_enaddr, 0); + sp[1] = DC_SP_FIELD(sc->arpcom.ac_enaddr, 1); + sp[2] = DC_SP_FIELD(sc->arpcom.ac_enaddr, 2); DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_TX_ON); DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_RX_ON); |