Factor out arc_storelladdr(), and use that instead of arc_ifattach() in
the bah_reset() function. This makes the last change work without deconnecting all the other interfaces from the interface list.
This commit is contained in:
parent
456af6d558
commit
d8c7407afe
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user