summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjfv <jfv@FreeBSD.org>2008-07-14 18:40:21 +0000
committerjfv <jfv@FreeBSD.org>2008-07-14 18:40:21 +0000
commit188dc0a4d49aa6b95591a0f8c629df78b8525dcc (patch)
tree0c7ed17ed0ce59879383e785f7136cd8b3018fbc /sys
parentfbb0502c9bbf17806297690ed6b37d2dc7850278 (diff)
downloadFreeBSD-src-188dc0a4d49aa6b95591a0f8c629df78b8525dcc.zip
FreeBSD-src-188dc0a4d49aa6b95591a0f8c629df78b8525dcc.tar.gz
Add event notification at attach/detach so the NIC
is able to detect it and do hardware filtering.
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_vlan.c6
1 files changed, 6 insertions, 0 deletions
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);
}
OpenPOWER on IntegriCloud