summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2006-06-05 23:44:07 +0000
committerdrahn <drahn@openbsd.org>2006-06-05 23:44:07 +0000
commita4b45bae07e488bc6263c92fc9c61cbc2f9045ab (patch)
tree344bdcb0d0d9c6cdabb26addbed0fa6a68ae247b
parentbetter wording; ok reyk (diff)
downloadwireguard-openbsd-a4b45bae07e488bc6263c92fc9c61cbc2f9045ab.tar.xz
wireguard-openbsd-a4b45bae07e488bc6263c92fc9c61cbc2f9045ab.zip
Write the words of the mac address in reverse order to fix a MAC problem on
a Realtek 8169 found in a Thecus N2100, tested jsg, ok pval
-rw-r--r--sys/dev/ic/re.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index 0c8b2020b9c..9ed0f42a94b 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.24 2006/05/29 05:11:15 drahn Exp $ */
+/* $OpenBSD: re.c,v 1.25 2006/06/05 23:44:07 drahn Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -1593,11 +1593,14 @@ re_init(struct ifnet *ifp)
* register write enable" mode to modify the ID registers.
*/
CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_WRITECFG);
- memcpy(&reg, LLADDR(ifp->if_sadl), 4);
- CSR_WRITE_4(sc, RL_IDR0, htole32(reg));
+
reg = 0;
memcpy(&reg, LLADDR(ifp->if_sadl) + 4, 4);
CSR_WRITE_4(sc, RL_IDR4, htole32(reg));
+
+ memcpy(&reg, LLADDR(ifp->if_sadl), 4);
+ CSR_WRITE_4(sc, RL_IDR0, htole32(reg));
+
CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
/*