summaryrefslogtreecommitdiffstats
path: root/sys/net/if_gre.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2005-11-08 20:08:34 +0000
committerthompsa <thompsa@FreeBSD.org>2005-11-08 20:08:34 +0000
commit48c0bcb5c218c021c1da0e53702d2e83708a471a (patch)
treeb5694a5381004aaef7ca02a29efbdb85ad370b4d /sys/net/if_gre.c
parent7b0555d4591f77539a864cf4d9ca449610fd188c (diff)
downloadFreeBSD-src-48c0bcb5c218c021c1da0e53702d2e83708a471a.zip
FreeBSD-src-48c0bcb5c218c021c1da0e53702d2e83708a471a.tar.gz
Move the cloned interface list management in to if_clone. For some drivers the
softc lists and associated mutex are now unused so these have been removed. Calling if_clone_detach() will now destroy all the cloned interfaces for the driver and in most cases is all thats needed to unload. Idea by: brooks Reviewed by: brooks
Diffstat (limited to 'sys/net/if_gre.c')
-rw-r--r--sys/net/if_gre.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 53639f6..22ceba5 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -774,7 +774,6 @@ gre_in_cksum(u_int16_t *p, u_int len)
static int
gremodevent(module_t mod, int type, void *data)
{
- struct gre_softc *sc;
switch (type) {
case MOD_LOAD:
@@ -782,14 +781,6 @@ gremodevent(module_t mod, int type, void *data)
break;
case MOD_UNLOAD:
if_clone_detach(&gre_cloner);
-
- mtx_lock(&gre_mtx);
- while ((sc = LIST_FIRST(&gre_softc_list)) != NULL) {
- mtx_unlock(&gre_mtx);
- ifc_simple_destroy(&gre_cloner, GRE2IFP(sc));
- mtx_lock(&gre_mtx);
- }
- mtx_unlock(&gre_mtx);
mtx_destroy(&gre_mtx);
break;
default:
OpenPOWER on IntegriCloud