summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2006-12-21 22:13:37 +0000
committerJason Wright <jason@cvs.openbsd.org>2006-12-21 22:13:37 +0000
commita9b75613598b7598cdd246ff29cc624b6651760a (patch)
tree6abd88076b46880c8e8b6725ab6b518d623326ba /sys/dev/ic
parentdbba99d219fa4a10f2796265a34120aff635f6de (diff)
betetr yet, just nuke sc_enaddr all together, just fill in arpcom and
everybody is happy
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/gem.c15
-rw-r--r--sys/dev/ic/gemvar.h3
-rw-r--r--sys/dev/ic/hme.c6
-rw-r--r--sys/dev/ic/hmevar.h3
4 files changed, 10 insertions, 17 deletions
diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c
index b6cf7f81297..c764233fd41 100644
--- a/sys/dev/ic/gem.c
+++ b/sys/dev/ic/gem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gem.c,v 1.67 2006/11/25 17:47:40 brad Exp $ */
+/* $OpenBSD: gem.c,v 1.68 2006/12/21 22:13:36 jason Exp $ */
/* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */
/*
@@ -139,8 +139,6 @@ gem_config(struct gem_softc *sc)
int i, error;
struct ifmedia_entry *ifm;
- bcopy(sc->sc_enaddr, sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN);
-
/* Make sure the chip is stopped. */
ifp->if_softc = sc;
gem_reset(sc);
@@ -215,7 +213,7 @@ gem_config(struct gem_softc *sc)
*/
/* Announce ourselves. */
- printf(", address %s\n", ether_sprintf(sc->sc_enaddr));
+ printf(", address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr));
/* Get RX FIFO size */
sc->sc_rxfifosize = 64 *
@@ -736,7 +734,6 @@ 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 */;
@@ -851,7 +848,7 @@ gem_init_regs(struct gem_softc *sc)
/* Dunno.... */
bus_space_write_4(t, h, GEM_MAC_CONTROL_TYPE, 0x8088);
bus_space_write_4(t, h, GEM_MAC_RANDOM_SEED,
- ((sc->sc_enaddr[5]<<8)|sc->sc_enaddr[4])&0x3ff);
+ ((sc->sc_arpcom.ac_enaddr[5]<<8)|sc->sc_arpcom.ac_enaddr[4])&0x3ff);
/* Secondary MAC addr set to 0:0:0:0:0:0 */
bus_space_write_4(t, h, GEM_MAC_ADDR3, 0);
@@ -893,11 +890,11 @@ gem_init_regs(struct gem_softc *sc)
* Set the station address.
*/
bus_space_write_4(t, h, GEM_MAC_ADDR0,
- (sc->sc_enaddr[4]<<8) | sc->sc_enaddr[5]);
+ (sc->sc_arpcom.ac_enaddr[4]<<8) | sc->sc_arpcom.ac_enaddr[5]);
bus_space_write_4(t, h, GEM_MAC_ADDR1,
- (sc->sc_enaddr[2]<<8) | sc->sc_enaddr[3]);
+ (sc->sc_arpcom.ac_enaddr[2]<<8) | sc->sc_arpcom.ac_enaddr[3]);
bus_space_write_4(t, h, GEM_MAC_ADDR2,
- (sc->sc_enaddr[0]<<8) | sc->sc_enaddr[1]);
+ (sc->sc_arpcom.ac_enaddr[0]<<8) | sc->sc_arpcom.ac_enaddr[1]);
/*
diff --git a/sys/dev/ic/gemvar.h b/sys/dev/ic/gemvar.h
index c2014a3b457..9224ad95c35 100644
--- a/sys/dev/ic/gemvar.h
+++ b/sys/dev/ic/gemvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: gemvar.h,v 1.15 2006/11/25 02:12:04 brad Exp $ */
+/* $OpenBSD: gemvar.h,v 1.16 2006/12/21 22:13:36 jason Exp $ */
/* $NetBSD: gemvar.h,v 1.1 2001/09/16 00:11:43 eeh Exp $ */
/*
@@ -206,7 +206,6 @@ struct gem_softc {
int sc_inited;
int sc_debug;
void *sc_sh; /* shutdownhook cookie */
- u_int8_t sc_enaddr[ETHER_ADDR_LEN]; /* MAC address */
/* Special hardware hooks */
void (*sc_hwreset)(struct gem_softc *);
diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c
index ae3a4d98d17..d45d1c96c04 100644
--- a/sys/dev/ic/hme.c
+++ b/sys/dev/ic/hme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hme.c,v 1.45 2006/12/21 21:48:11 jason Exp $ */
+/* $OpenBSD: hme.c,v 1.46 2006/12/21 22:13:36 jason Exp $ */
/* $NetBSD: hme.c,v 1.21 2001/07/07 15:59:37 thorpej Exp $ */
/*-
@@ -151,12 +151,10 @@ hme_config(sc)
* sc_burst
*
* the local Ethernet address:
- * sc_enaddr
+ * sc_arpcom.ac_enaddr
*
*/
- bcopy(sc->sc_enaddr, sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN);
-
/* Make sure the chip is stopped. */
hme_stop(sc);
diff --git a/sys/dev/ic/hmevar.h b/sys/dev/ic/hmevar.h
index 0e1b02fd42a..1dc0751631e 100644
--- a/sys/dev/ic/hmevar.h
+++ b/sys/dev/ic/hmevar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hmevar.h,v 1.8 2004/08/08 19:01:20 brad Exp $ */
+/* $OpenBSD: hmevar.h,v 1.9 2006/12/21 22:13:36 jason Exp $ */
/* $NetBSD: hmevar.h,v 1.6 2000/09/28 10:56:57 tsutsui Exp $ */
/*-
@@ -88,7 +88,6 @@ struct hme_softc {
int sc_debug;
void *sc_sh; /* shutdownhook cookie */
short sc_if_flags;
- u_int8_t sc_enaddr[ETHER_ADDR_LEN]; /* MAC address */
/* Special hardware hooks */
void (*sc_hwreset)(struct hme_softc *);