diff options
author | brooks <brooks@FreeBSD.org> | 2011-12-09 23:26:28 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2011-12-09 23:26:28 +0000 |
commit | 9029bb4f3b3dcc9ee7c165dafa255c0a1be9dff4 (patch) | |
tree | e9c299d3123a5fab620204acd93aceb32bacbb31 /sys/net/if.c | |
parent | 0a8d9e83286f1e0207031442c8c9b143758a0a75 (diff) | |
download | FreeBSD-src-9029bb4f3b3dcc9ee7c165dafa255c0a1be9dff4.zip FreeBSD-src-9029bb4f3b3dcc9ee7c165dafa255c0a1be9dff4.tar.gz |
Remove the unused if_free_type() function.
X-MFC after: never
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 8f26279..8c6c24c 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -494,19 +494,12 @@ if_free_internal(struct ifnet *ifp) } /* - * This version should only be called by intefaces that switch their type - * after calling if_alloc(). if_free_type() will go away again now that we - * have if_alloctype to cache the original allocation type. For now, assert - * that they match, since we require that in practice. + * Deregister an interface and free the associated storage. */ void -if_free_type(struct ifnet *ifp, u_char type) +if_free(struct ifnet *ifp) { - KASSERT(ifp->if_alloctype == type, - ("if_free_type: type (%d) != alloctype (%d)", type, - ifp->if_alloctype)); - ifp->if_flags |= IFF_DYING; /* XXX: Locking */ IFNET_WLOCK(); @@ -522,18 +515,6 @@ if_free_type(struct ifnet *ifp, u_char type) } /* - * This is the normal version of if_free(), used by device drivers to free a - * detached network interface. The contents of if_free_type() will move into - * here when if_free_type() goes away. - */ -void -if_free(struct ifnet *ifp) -{ - - if_free_type(ifp, ifp->if_alloctype); -} - -/* * Interfaces to keep an ifnet type-stable despite the possibility of the * driver calling if_free(). If there are additional references, we defer * freeing the underlying data structure. |