diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-05-26 20:22:02 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-05-26 20:22:02 +0000 |
commit | 4cc5b15e3558bff395da65bba15bf25da55400ef (patch) | |
tree | 82bf64eb04dd43a163eb3c6094cbceca33ae3ea3 /sys/dev | |
parent | 8040b7c6120eaa8aa0af107e229625bf7667bf30 (diff) |
correctly byteswap the mac address when moving it on and off teh card
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_tht.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c index 649de8220ec..31a0fce214d 100644 --- a/sys/dev/pci/if_tht.c +++ b/sys/dev/pci/if_tht.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tht.c,v 1.102 2007/05/17 10:12:53 dlg Exp $ */ +/* $OpenBSD: if_tht.c,v 1.103 2007/05/26 20:22:01 dlg Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -1617,7 +1617,7 @@ tht_lladdr_read(struct tht_softc *sc) int i; for (i = 0; i < sizeofa(tht_mac_regs); i++) - sc->sc_lladdr[i] = swap16(tht_read(sc, tht_mac_regs[i])); + sc->sc_lladdr[i] = betoh16(tht_read(sc, tht_mac_regs[i])); } void @@ -1626,7 +1626,7 @@ tht_lladdr_write(struct tht_softc *sc) int i; for (i = 0; i < sizeofa(tht_mac_regs); i++) - tht_write(sc, tht_mac_regs[i], swap16(sc->sc_lladdr[i])); + tht_write(sc, tht_mac_regs[i], htobe16(sc->sc_lladdr[i])); } #define tht_swrst_set(_s, _r) tht_write((_s), (_r), 0x1) |