From 188dc0a4d49aa6b95591a0f8c629df78b8525dcc Mon Sep 17 00:00:00 2001 From: jfv Date: Mon, 14 Jul 2008 18:40:21 +0000 Subject: Add event notification at attach/detach so the NIC is able to detect it and do hardware filtering. --- sys/net/if_vlan.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 6cce6e9..d3bf622 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1062,6 +1062,8 @@ exists: ifp->if_drv_flags |= IFF_DRV_RUNNING; done: TRUNK_UNLOCK(trunk); + if (error == 0) + EVENTHANDLER_INVOKE(vlan_config, p, ifv->ifv_tag); VLAN_UNLOCK(); return (error); @@ -1084,12 +1086,14 @@ vlan_unconfig_locked(struct ifnet *ifp) struct ifvlantrunk *trunk; struct vlan_mc_entry *mc; struct ifvlan *ifv; + struct ifnet *parent; int error; VLAN_LOCK_ASSERT(); ifv = ifp->if_softc; trunk = ifv->ifv_trunk; + parent = PARENT(ifv); if (trunk) { struct sockaddr_dl sdl; @@ -1153,6 +1157,8 @@ vlan_unconfig_locked(struct ifnet *ifp) ifp->if_link_state = LINK_STATE_UNKNOWN; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + EVENTHANDLER_INVOKE(vlan_unconfig, parent, ifv->ifv_tag); + return (0); } -- cgit v1.1