Add event notification at attach/detach so the NIC

is able to detect it and do hardware filtering.
This commit is contained in:
jfv 2008-07-14 18:40:21 +00:00
parent fbb0502c9b
commit 188dc0a4d4

View File

@ -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);
}