diff --git a/sys/dev/ic/smc90cx6.c b/sys/dev/ic/smc90cx6.c index d4a67fde3a3e..a4d22e16802b 100644 --- a/sys/dev/ic/smc90cx6.c +++ b/sys/dev/ic/smc90cx6.c @@ -1,4 +1,4 @@ -/* $NetBSD: smc90cx6.c,v 1.31 1999/08/26 20:44:50 is Exp $ */ +/* $NetBSD: smc90cx6.c,v 1.32 1999/08/27 19:23:19 is Exp $ */ /*- * Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc. @@ -281,7 +281,7 @@ bah_reset(sc) #endif /* tell the routing level about the (possibly changed) link address */ - arc_ifattach(ifp, linkaddress); + arc_storelladdr(ifp, linkaddress); /* POR is NMI, but we need it below: */ sc->sc_intmask = BAH_RECON|BAH_POR; diff --git a/sys/net/if_arc.h b/sys/net/if_arc.h index a384800695c3..06a9c2be33bb 100644 --- a/sys/net/if_arc.h +++ b/sys/net/if_arc.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_arc.h,v 1.10 1999/05/20 18:07:27 thorpej Exp $ */ +/* $NetBSD: if_arc.h,v 1.11 1999/08/27 19:23:19 is Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -120,6 +120,7 @@ struct arccom { u_int8_t arcbroadcastaddr; void arc_ifattach __P((struct ifnet *, u_int8_t)); +void arc_storelladdr __P((struct ifnet *, u_int8_t)); char *arc_sprintf __P((u_int8_t *)); int arc_isphds __P((int)); #endif diff --git a/sys/net/if_arcsubr.c b/sys/net/if_arcsubr.c index 393ffa26a816..c315bba7c3bd 100644 --- a/sys/net/if_arcsubr.c +++ b/sys/net/if_arcsubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_arcsubr.c,v 1.23 1999/08/26 20:44:50 is Exp $ */ +/* $NetBSD: if_arcsubr.c,v 1.24 1999/08/27 19:23:19 is Exp $ */ /* * Copyright (c) 1994, 1995 Ignatios Souvatzis @@ -618,6 +618,23 @@ arc_sprintf(ap) return (arcbuf); } +/* + * Register (new) link level address. + */ +void +arc_storelladdr(ifp, lla) + struct ifnet *ifp; + u_int8_t lla; +{ + register struct sockaddr_dl *sdl; + if ((sdl = ifp->if_sadl) && + sdl->sdl_family == AF_LINK) { + sdl->sdl_type = IFT_ARCNET; + sdl->sdl_alen = ifp->if_addrlen; + *(LLADDR(sdl)) = lla; + } +} + /* * Perform common duties while attaching to interface list */ @@ -626,7 +643,6 @@ arc_ifattach(ifp, lla) register struct ifnet *ifp; u_int8_t lla; { - register struct sockaddr_dl *sdl; register struct arccom *ac; ifp->if_type = IFT_ARCNET; @@ -650,11 +666,7 @@ arc_ifattach(ifp, lla) ifp->if_xname, ifp->if_xname); } if_attach(ifp); - if ((sdl = ifp->if_sadl) && - sdl->sdl_family == AF_LINK) { - sdl->sdl_type = IFT_ARCNET; - sdl->sdl_alen = ifp->if_addrlen; - *(LLADDR(sdl)) = lla; - } + arc_storelladdr(ifp, lla); + ifp->if_broadcastaddr = &arcbroadcastaddr; }