aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_vlan.c
diff options
context:
space:
mode:
authorYaroslav Tykhiy <ytykhiy@gmail.com>2006-08-15 16:40:27 +0000
committerYaroslav Tykhiy <ytykhiy@gmail.com>2006-08-15 16:40:27 +0000
commit2ada974770518a548b25e76d5062bd7e72ef94ea (patch)
tree91a81a01ba926620b261a5edeec39b1c1df266d3 /sys/net/if_vlan.c
parent72fa8a02682f917bd3ae7f434c337a033c21c509 (diff)
downloadsrc-2ada974770518a548b25e76d5062bd7e72ef94ea.tar.gz
src-2ada974770518a548b25e76d5062bd7e72ef94ea.zip
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().
Notes
Notes: svn path=/head/; revision=161321
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r--sys/net/if_vlan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 498d2a2f8c8a..fb192665cbab 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);