diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-03-23 00:35:22 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-03-23 00:35:22 +0000 |
commit | e88d321d148e115dbbf6fea61f7c0dcb67021421 (patch) | |
tree | 089c7b5a7d76ea28d50754e3297cd2a2afd429da /sys/net | |
parent | 52fc925b47af6c7fc3be259400883b63e0c28d09 (diff) |
dont maintain a list of vether devices inside the driver if they are never
looked up. can vether get any smaller?
ok deraadt@ claudio@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_vether.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/sys/net/if_vether.c b/sys/net/if_vether.c index 03574823710..0375a928ea3 100644 --- a/sys/net/if_vether.c +++ b/sys/net/if_vether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vether.c,v 1.11 2010/01/12 11:37:08 deraadt Exp $ */ +/* $OpenBSD: if_vether.c,v 1.12 2010/03/23 00:35:21 dlg Exp $ */ /* * Copyright (c) 2009 Theo de Raadt @@ -44,10 +44,8 @@ void vether_media_status(struct ifnet *, struct ifmediareq *); struct vether_softc { struct arpcom sc_ac; struct ifmedia sc_media; - LIST_ENTRY(vether_softc) sc_list; }; -LIST_HEAD(, vether_softc) vether_list; struct if_clone vether_cloner = IF_CLONE_INITIALIZER("vether", vether_clone_create, vether_clone_destroy); @@ -67,7 +65,6 @@ vether_media_status(struct ifnet *ifp, struct ifmediareq *imr) void vetherattach(int nvether) { - LIST_INIT(&vether_list); if_clone_attach(&vether_cloner); } @@ -76,7 +73,6 @@ vether_clone_create(struct if_clone *ifc, int unit) { struct ifnet *ifp; struct vether_softc *sc; - int s; if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_NOWAIT|M_ZERO)) == NULL) @@ -103,9 +99,6 @@ vether_clone_create(struct if_clone *ifc, int unit) if_attach(ifp); ether_ifattach(ifp); - s = splnet(); - LIST_INSERT_HEAD(&vether_list, sc, sc_list); - splx(s); return (0); } @@ -113,11 +106,6 @@ int vether_clone_destroy(struct ifnet *ifp) { struct vether_softc *sc = ifp->if_softc; - int s; - - s = splnet(); - LIST_REMOVE(sc, sc_list); - splx(s); ether_ifdetach(ifp); if_detach(ifp); |