From 250b1cf39906d95f6f2fbfedd093eedd894a032d Mon Sep 17 00:00:00 2001 From: yar Date: Tue, 15 Aug 2006 16:40:27 +0000 Subject: Set IFF_DRV_RUNNING on vlan(4) once in vlan_config(), not at many places after each call to vlan_config(). This is consistent with IFF_DRV_RUNNING being unset in vlan_unconfig(). --- sys/net/if_vlan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 498d2a2..fb19266 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -744,7 +744,6 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) return (error); } - ifp->if_drv_flags |= IFF_DRV_RUNNING; /* Update flags on the parent, if necessary. */ vlan_setflags(ifp, 1); @@ -1113,6 +1112,9 @@ exists: * joined on the vlan device. */ (void)vlan_setmulti(ifp); /* XXX: VLAN lock held */ + + /* We are ready for operation now. */ + ifp->if_drv_flags |= IFF_DRV_RUNNING; done: TRUNK_UNLOCK(trunk); VLAN_UNLOCK(); @@ -1443,7 +1445,6 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = vlan_config(ifv, p, vlr.vlr_tag); if (error) break; - ifp->if_drv_flags |= IFF_DRV_RUNNING; /* Update flags on the parent, if necessary. */ vlan_setflags(ifp, 1); -- cgit v1.1