summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/net/if.c4
-rw-r--r--sys/net/if_ethersubr.c11
-rw-r--r--sys/net/if_var.h1
3 files changed, 3 insertions, 13 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index e33e86c..ba316a9 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -51,6 +51,7 @@
#include <sys/syslog.h>
#include <sys/sysctl.h>
+#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <net/if_dl.h>
@@ -241,7 +242,8 @@ if_detach(ifp)
*/
switch (ifp->if_type) {
case IFT_ETHER:
- ether_ifdetach(ifp);
+ if (ng_ether_detach_p != NULL)
+ (*ng_ether_detach_p)(ifp);
break;
default:
break;
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 2084aac..74078aa4 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -676,17 +676,6 @@ ether_ifattach(ifp)
(*ng_ether_attach_p)(ifp);
}
-/*
- * Perform common duties while detaching an Ethernet interface
- */
-void
-ether_ifdetach(ifp)
- struct ifnet *ifp;
-{
- if (ng_ether_detach_p != NULL)
- (*ng_ether_detach_p)(ifp);
-}
-
SYSCTL_DECL(_net_link);
SYSCTL_NODE(_net_link, IFT_ETHER, ether, CTLFLAG_RW, 0, "Ethernet");
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 5234a58..79b1ff6 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -324,7 +324,6 @@ extern int if_index;
extern struct ifaddr **ifnet_addrs;
void ether_ifattach __P((struct ifnet *));
-void ether_ifdetach __P((struct ifnet *));
void ether_input __P((struct ifnet *, struct ether_header *, struct mbuf *));
void ether_demux __P((struct ifnet *, struct ether_header *, struct mbuf *));
int ether_output __P((struct ifnet *,
OpenPOWER on IntegriCloud