diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-09-10 20:42:33 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-09-10 20:42:33 +0000 |
commit | 167f5f86124c181d4602f1de41888c8499e1b310 (patch) | |
tree | eb2c1cf3b9d63f96e3d97e6da19e0734715ad82d | |
parent | d6d0591057c6746aeccffea3b852bd3905ec3910 (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>
-rw-r--r-- | sys/dev/ic/gem.c | 3 |
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 */; |