From cf5a84cb38061c273adab5a1e9e7d7faa929e3c6 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Wed, 13 Mar 2002 21:01:20 +0000 Subject: Try fetching the mac address from the local-mac-address property, and if it fails, fall back to myetheraddr() --- sys/dev/sbus/if_hme_sbus.c | 7 +++++-- 1 file 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 #include +#include 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 -- cgit v1.2.3