summaryrefslogtreecommitdiff
path: root/sys/dev/ic/gem.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-09-10 20:42:33 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-09-10 20:42:33 +0000
commit167f5f86124c181d4602f1de41888c8499e1b310 (patch)
treeeb2c1cf3b9d63f96e3d97e6da19e0734715ad82d /sys/dev/ic/gem.c
parentd6d0591057c6746aeccffea3b852bd3905ec3910 (diff)
copy the MAC address from sc_arpcom.ac_enaddr to sc_enaddr in
gem_init() just before calling gem_init_regs() so the proper MAC address gets programmed into the card (if it has been changed by say ifconfig lladdr for example). Noticed and diff tested by: Troex Nevelin <troex at fury dot scancode dot ru>
Diffstat (limited to 'sys/dev/ic/gem.c')
-rw-r--r--sys/dev/ic/gem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c
index c73a6a1744d..765da286191 100644
--- a/sys/dev/ic/gem.c
+++ b/sys/dev/ic/gem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gem.c,v 1.43 2005/08/01 05:45:03 brad Exp $ */
+/* $OpenBSD: gem.c,v 1.44 2005/09/10 20:42:32 brad Exp $ */
/* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */
/*
@@ -732,6 +732,7 @@ gem_init(struct ifnet *ifp)
gem_meminit(sc);
/* step 4. TX MAC registers & counters */
+ bcopy(sc->sc_arpcom.ac_enaddr, sc->sc_enaddr, ETHER_ADDR_LEN);
gem_init_regs(sc);
max_frame_size = ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN;
v = (max_frame_size) | (0x2000 << 16) /* Burst size */;