diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-11-08 21:04:42 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-11-08 21:04:42 +0000 |
commit | f9fae29da41573ba989fc6426fb0a60e058892e0 (patch) | |
tree | 9d51530a79f4274d21da439add46d6d64f5b056b /sys/dev/pci/if_sk.c | |
parent | 7b28b8c264f7e948a1120cfe005a1b259a039a4a (diff) |
Make XMAC work on on big-endian systems.
help & ok jason@, ok brad@
Diffstat (limited to 'sys/dev/pci/if_sk.c')
-rw-r--r-- | sys/dev/pci/if_sk.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index f2e23a7ca63..a81f30d2c98 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.129 2006/10/16 12:30:08 tom Exp $ */ +/* $OpenBSD: if_sk.c,v 1.130 2006/11/08 21:04:41 kettenis Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -423,9 +423,9 @@ sk_setfilt(struct sk_if_softc *sc_if, caddr_t addr, int slot) { int base = XM_RXFILT_ENTRY(slot); - SK_XM_WRITE_2(sc_if, base, *(u_int16_t *)(&addr[0])); - SK_XM_WRITE_2(sc_if, base + 2, *(u_int16_t *)(&addr[2])); - SK_XM_WRITE_2(sc_if, base + 4, *(u_int16_t *)(&addr[4])); + SK_XM_WRITE_2(sc_if, base, letoh16(*(u_int16_t *)(&addr[0]))); + SK_XM_WRITE_2(sc_if, base + 2, letoh16(*(u_int16_t *)(&addr[2]))); + SK_XM_WRITE_2(sc_if, base + 4, letoh16(*(u_int16_t *)(&addr[4]))); } void @@ -2370,11 +2370,11 @@ sk_init_xmac(struct sk_if_softc *sc_if) /* Set station address */ SK_XM_WRITE_2(sc_if, XM_PAR0, - *(u_int16_t *)(&sc_if->arpcom.ac_enaddr[0])); + letoh16(*(u_int16_t *)(&sc_if->arpcom.ac_enaddr[0]))); SK_XM_WRITE_2(sc_if, XM_PAR1, - *(u_int16_t *)(&sc_if->arpcom.ac_enaddr[2])); + letoh16(*(u_int16_t *)(&sc_if->arpcom.ac_enaddr[2]))); SK_XM_WRITE_2(sc_if, XM_PAR2, - *(u_int16_t *)(&sc_if->arpcom.ac_enaddr[4])); + letoh16(*(u_int16_t *)(&sc_if->arpcom.ac_enaddr[4]))); SK_XM_SETBIT_4(sc_if, XM_MODE, XM_MODE_RX_USE_STATION); if (ifp->if_flags & IFF_BROADCAST) |