Lines Matching full:vlan

29 #define MAX_VLAN_NAME_LEN MIN(sizeof("VLAN-<#####>"), \
162 /* If the interface is NULL, then get the VLAN that has the tag */ in get_vlan()
192 /* If the interface is virtual, then it should be the VLAN one. in get_vlan()
256 snprintk(name, sizeof(name), "VLAN-%d", ctx->tag); in enable_vlan_iface()
259 snprintk(name, sizeof(name), "VLAN to %d", in enable_vlan_iface()
279 snprintk(name, sizeof(name), "VLAN-<free>"); in disable_vlan_iface()
387 struct vlan_context *vlan; in net_eth_vlan_enable() local
399 NET_DBG("Interface %d does not support VLAN", in net_eth_vlan_enable()
412 vlan = get_vlan(iface, tag); in net_eth_vlan_enable()
413 if (vlan != NULL) { in net_eth_vlan_enable()
420 vlan = get_vlan(NULL, tag); in net_eth_vlan_enable()
421 if (vlan != NULL) { in net_eth_vlan_enable()
434 vlan = vlan_ctx[i]; in net_eth_vlan_enable()
435 vlan->tag = tag; in net_eth_vlan_enable()
437 if (!enable_vlan_iface(vlan, iface)) { in net_eth_vlan_enable()
441 NET_DBG("[%d] Adding vlan tag %d to iface %d (%p) attached to %d (%p)", in net_eth_vlan_enable()
442 i, vlan->tag, net_if_get_by_iface(vlan->iface), vlan->iface, in net_eth_vlan_enable()
448 setup_link_address(vlan); in net_eth_vlan_enable()
452 iface, vlan->tag, true); in net_eth_vlan_enable()
455 ethernet_mgmt_raise_vlan_enabled_event(vlan->iface, vlan->tag); in net_eth_vlan_enable()
469 struct vlan_context *vlan; in net_eth_vlan_disable() local
480 vlan = get_vlan(iface, tag); in net_eth_vlan_disable()
481 if (!vlan) { in net_eth_vlan_disable()
485 eth = net_if_get_device(vlan->attached_to)->api; in net_eth_vlan_disable()
489 NET_DBG("Removing vlan tag %d from VLAN iface %d (%p) attached to %d (%p)", in net_eth_vlan_disable()
490 vlan->tag, net_if_get_by_iface(vlan->iface), vlan->iface, in net_eth_vlan_disable()
491 net_if_get_by_iface(vlan->attached_to), vlan->attached_to); in net_eth_vlan_disable()
493 vlan->tag = NET_VLAN_TAG_UNSPEC; in net_eth_vlan_disable()
496 eth->vlan_setup(net_if_get_device(vlan->attached_to), in net_eth_vlan_disable()
497 vlan->attached_to, tag, false); in net_eth_vlan_disable()
500 ethernet_mgmt_raise_vlan_disabled_event(vlan->iface, tag); in net_eth_vlan_disable()
502 (void)disable_vlan_iface(vlan, vlan->iface); in net_eth_vlan_disable()
521 NET_DBG("VLAN interface %d not configured yet.", in vlan_interface_start()
546 NET_DBG("VLAN interface %d not configured yet.", in vlan_interface_stop()
635 NET_DBG("VLAN interface %d (%p) detached from %d (%p)", in vlan_interface_attach()
639 NET_DBG("VLAN interface %d (%p) attached to %d (%p)", in vlan_interface_attach()
661 snprintk(name, sizeof(name), "VLAN-<free>"); in vlan_iface_init()