diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2004-09-30 17:59:24 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2004-09-30 17:59:24 +0000 |
commit | be18bcfb9e3051565c287722b6e6ad2b7d071cbc (patch) | |
tree | 247190670c49d841949c64ed3d18b248ca3a5139 /sys/dev | |
parent | eda9a471b99b628dce0b5a6c72cdaf5531dbe1c8 (diff) |
get the MAC address correct on big endian
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/rtl81x9.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index dd4d69eb9f4..2d3df729908 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9.c,v 1.32 2004/09/30 17:41:58 jason Exp $ */ +/* $OpenBSD: rtl81x9.c,v 1.33 2004/09/30 17:59:23 jason Exp $ */ /* * Copyright (c) 1997, 1998 @@ -256,7 +256,7 @@ void rl_read_eeprom(sc, dest, off, addr_len, cnt, swap) rl_eeprom_getword(sc, off + i, addr_len, &word); ptr = (u_int16_t *)(dest + (i * 2)); if (swap) - *ptr = ntohs(word); + *ptr = letoh16(word); else *ptr = word; } @@ -1224,7 +1224,7 @@ rl_attach(sc) * Get station address. */ rl_read_eeprom(sc, (caddr_t)sc->sc_arpcom.ac_enaddr, RL_EE_EADDR, - addr_len, 3, 0); + addr_len, 3, 1); printf(" address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr)); |