summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2002-03-13 21:01:20 +0000
committerJason Wright <jason@cvs.openbsd.org>2002-03-13 21:01:20 +0000
commitcf5a84cb38061c273adab5a1e9e7d7faa929e3c6 (patch)
treefce19b8ed4b01d86b8cff3f32658dacb7f3a4ca6 /sys/dev
parenta1860f1123d6ff6c0e2ae4d174a3fb1d3e7af930 (diff)
Try fetching the mac address from the local-mac-address property, and if
it fails, fall back to myetheraddr()
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/sbus/if_hme_sbus.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/sbus/if_hme_sbus.c b/sys/dev/sbus/if_hme_sbus.c
index 3b65e815578..961c02898b6 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.1 2001/08/21 16:19:50 jason Exp $ */
+/* $OpenBSD: if_hme_sbus.c,v 1.2 2002/03/13 21:01:19 jason Exp $ */
/* $NetBSD: if_hme_sbus.c,v 1.6 2001/02/28 14:52:48 mrg Exp $ */
/*-
@@ -69,6 +69,7 @@
#include <dev/sbus/sbusvar.h>
#include <dev/ic/hmevar.h>
+#include <dev/ofw/openfirm.h>
struct hmesbus_softc {
struct hme_softc hsc_hme; /* HME device */
@@ -176,7 +177,9 @@ hmeattach_sbus(parent, self, aux)
sd->sd_reset = (void *)hme_reset;
sbus_establish(sd, self);
- myetheraddr(sc->sc_enaddr);
+ if (OF_getprop(sa->sa_node, "local-mac-address",
+ sc->sc_enaddr, ETHER_ADDR_LEN) <= 0)
+ myetheraddr(sc->sc_enaddr);
/*
* Get transfer burst size from PROM and pass it on