summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--sys/dev/pci/if_gem_pci.c10
-rw-r--r--sys/dev/pci/if_hme_pci.c12
-rw-r--r--sys/dev/sbus/if_hme_sbus.c6
7 files changed, 24 insertions, 31 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 *);
diff --git a/sys/dev/pci/if_gem_pci.c b/sys/dev/pci/if_gem_pci.c
index f228717ddab..4484a8fe05c 100644
--- a/sys/dev/pci/if_gem_pci.c
+++ b/sys/dev/pci/if_gem_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gem_pci.c,v 1.26 2006/11/25 17:47:40 brad Exp $ */
+/* $OpenBSD: if_gem_pci.c,v 1.27 2006/12/21 22:13:36 jason Exp $ */
/* $NetBSD: if_gem_pci.c,v 1.1 2001/09/16 00:11:42 eeh Exp $ */
/*
@@ -186,7 +186,7 @@ gem_pci_enaddr(struct gem_softc *sc, struct pci_attach_args *pa)
if (vpd->vpd_key0 != 'N' || vpd->vpd_key1 != 'A')
goto fail;
- bcopy(buf + 6, sc->sc_enaddr, ETHER_ADDR_LEN);
+ bcopy(buf + 6, sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN);
rv = 0;
fail:
@@ -267,14 +267,14 @@ gem_attach_pci(struct device *parent, struct device *self, void *aux)
#ifdef __sparc64__
if (!gotenaddr) {
if (OF_getprop(PCITAG_NODE(pa->pa_tag), "local-mac-address",
- sc->sc_enaddr, ETHER_ADDR_LEN) <= 0)
- myetheraddr(sc->sc_enaddr);
+ sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN) <= 0)
+ myetheraddr(sc->sc_arpcom.ac_enaddr);
gotenaddr = 1;
}
#endif
#ifdef __powerpc__
if (!gotenaddr) {
- pci_ether_hw_addr(pa->pa_pc, sc->sc_enaddr);
+ pci_ether_hw_addr(pa->pa_pc, sc->sc_arpcom.ac_enaddr);
gotenaddr = 1;
}
#endif
diff --git a/sys/dev/pci/if_hme_pci.c b/sys/dev/pci/if_hme_pci.c
index 2ab3bd8cff3..079111ec44c 100644
--- a/sys/dev/pci/if_hme_pci.c
+++ b/sys/dev/pci/if_hme_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_hme_pci.c,v 1.11 2006/10/15 14:46:13 kettenis Exp $ */
+/* $OpenBSD: if_hme_pci.c,v 1.12 2006/12/21 22:13:36 jason Exp $ */
/* $NetBSD: if_hme_pci.c,v 1.3 2000/12/28 22:59:13 sommerfeld Exp $ */
/*
@@ -182,8 +182,8 @@ hme_pci_enaddr(struct hme_softc *sc, struct pci_attach_args *hpa)
if (vpd->vpd_key0 != 'N' || vpd->vpd_key1 != 'A')
goto fail;
- bcopy(buf + 6, sc->sc_enaddr, ETHER_ADDR_LEN);
- sc->sc_enaddr[5] += hpa->pa_device;
+ bcopy(buf + 6, sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN);
+ sc->sc_arpcom.ac_enaddr[5] += hpa->pa_device;
bus_space_unmap(romt, romh, romsize);
return (0);
@@ -266,14 +266,14 @@ hmeattach_pci(parent, self, aux)
#ifdef __sparc64__
if (!gotenaddr) {
if (OF_getprop(PCITAG_NODE(pa->pa_tag), "local-mac-address",
- sc->sc_enaddr, ETHER_ADDR_LEN) <= 0)
- myetheraddr(sc->sc_enaddr);
+ sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN) <= 0)
+ myetheraddr(sc->sc_arpcom.ac_enaddr);
gotenaddr = 1;
}
#endif
#ifdef __powerpc__
if (!gotenaddr) {
- pci_ether_hw_addr(pa->pa_pc, sc->sc_enaddr);
+ pci_ether_hw_addr(pa->pa_pc, sc->sc_arpcom.ac_enaddr);
gotenaddr = 1;
}
#endif
diff --git a/sys/dev/sbus/if_hme_sbus.c b/sys/dev/sbus/if_hme_sbus.c
index 7aa21844bdb..6ffe9dacec6 100644
--- a/sys/dev/sbus/if_hme_sbus.c
+++ b/sys/dev/sbus/if_hme_sbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_hme_sbus.c,v 1.10 2006/06/02 20:00:56 miod Exp $ */
+/* $OpenBSD: if_hme_sbus.c,v 1.11 2006/12/21 22:13:36 jason Exp $ */
/* $NetBSD: if_hme_sbus.c,v 1.6 2001/02/28 14:52:48 mrg Exp $ */
/*-
@@ -158,8 +158,8 @@ hmeattach_sbus(struct device *parent, struct device *self, void *aux)
}
if (OF_getprop(sa->sa_node, "local-mac-address",
- sc->sc_enaddr, ETHER_ADDR_LEN) <= 0)
- myetheraddr(sc->sc_enaddr);
+ sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN) <= 0)
+ myetheraddr(sc->sc_arpcom.ac_enaddr);
/*
* Get transfer burst size from PROM and pass it on