Lines Matching full:vlan
3 * INET 802.1Q VLAN
8 * VLAN Home Page: http://www.candelatech.com/~greear/vlan.html
14 * Use hash table for VLAN groups - David S. Miller <davem@redhat.com>
36 #include "vlan.h"
41 /* Global VLAN variables */
45 const char vlan_fullname[] = "802.1Q VLAN Support";
83 struct vlan_dev_priv *vlan) in vlan_stacked_transfer_operstate() argument
85 if (!(vlan->flags & VLAN_FLAG_BRIDGE_BINDING)) in vlan_stacked_transfer_operstate()
91 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in unregister_vlan_dev() local
92 struct net_device *real_dev = vlan->real_dev; in unregister_vlan_dev()
95 u16 vlan_id = vlan->vlan_id; in unregister_vlan_dev()
106 if (vlan->flags & VLAN_FLAG_MVRP) in unregister_vlan_dev()
108 if (vlan->flags & VLAN_FLAG_GVRP) in unregister_vlan_dev()
111 vlan_group_set_device(grp, vlan->vlan_proto, vlan_id, NULL); in unregister_vlan_dev()
125 vlan_vid_del(real_dev, vlan->vlan_proto, vlan_id); in unregister_vlan_dev()
141 NL_SET_ERR_MSG_MOD(extack, "VLAN device already exists"); in vlan_check_real_dev()
150 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in register_vlan_dev() local
151 struct net_device *real_dev = vlan->real_dev; in register_vlan_dev()
152 u16 vlan_id = vlan->vlan_id; in register_vlan_dev()
157 err = vlan_vid_add(real_dev, vlan->vlan_proto, vlan_id); in register_vlan_dev()
175 err = vlan_group_prealloc_vid(grp, vlan->vlan_proto, vlan_id); in register_vlan_dev()
187 vlan_stacked_transfer_operstate(real_dev, dev, vlan); in register_vlan_dev()
193 vlan_group_set_device(grp, vlan->vlan_proto, vlan_id, dev); in register_vlan_dev()
207 vlan_vid_del(real_dev, vlan->vlan_proto, vlan_id); in register_vlan_dev()
211 /* Attach a VLAN device to a mac address (ie Ethernet Card).
217 struct vlan_dev_priv *vlan; in register_vlan_device() local
238 /* Put our vlan.VID in the name. in register_vlan_device()
241 snprintf(name, IFNAMSIZ, "vlan%i", vlan_id); in register_vlan_device()
244 /* Put our vlan.VID in the name. in register_vlan_device()
250 /* Put our vlan.VID in the name. in register_vlan_device()
254 snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id); in register_vlan_device()
264 /* need 4 bytes for extra VLAN header info, in register_vlan_device()
269 vlan = vlan_dev_priv(new_dev); in register_vlan_device()
270 vlan->vlan_proto = htons(ETH_P_8021Q); in register_vlan_device()
271 vlan->vlan_id = vlan_id; in register_vlan_device()
272 vlan->real_dev = real_dev; in register_vlan_device()
273 vlan->dent = NULL; in register_vlan_device()
274 vlan->flags = VLAN_FLAG_REORDER_HDR; in register_vlan_device()
291 struct vlan_dev_priv *vlan = vlan_dev_priv(vlandev); in vlan_sync_address() local
294 if (ether_addr_equal(vlan->real_dev_addr, dev->dev_addr)) in vlan_sync_address()
297 /* vlan continues to inherit address of lower device */ in vlan_sync_address()
301 /* vlan address was different from the old address and is equal to in vlan_sync_address()
303 if (!ether_addr_equal(vlandev->dev_addr, vlan->real_dev_addr) && in vlan_sync_address()
307 /* vlan address was equal to the old address and is different from in vlan_sync_address()
309 if (ether_addr_equal(vlandev->dev_addr, vlan->real_dev_addr) && in vlan_sync_address()
314 ether_addr_copy(vlan->real_dev_addr, dev->dev_addr); in vlan_sync_address()
320 struct vlan_dev_priv *vlan = vlan_dev_priv(vlandev); in vlan_transfer_features() local
324 if (vlan_hw_offload_capable(dev->features, vlan->vlan_proto)) in vlan_transfer_features()
334 vlandev->priv_flags |= (vlan->real_dev->priv_flags & IFF_XMIT_DST_RELEASE); in vlan_transfer_features()
335 vlandev->hw_enc_features = vlan_tnl_features(vlan->real_dev); in vlan_transfer_features()
369 struct vlan_dev_priv *vlan; in vlan_device_event() local
383 pr_info("adding VLAN 0 to HW filter on device %s\n", in vlan_device_event()
402 /* Propagate real device state to vlan devices */ in vlan_device_event()
444 vlan = vlan_dev_priv(vlandev); in vlan_device_event()
445 if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING)) in vlan_device_event()
466 vlan = vlan_dev_priv(vlandev); in vlan_device_event()
467 if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING)) in vlan_device_event()
470 vlan_stacked_transfer_operstate(dev, vlandev, vlan); in vlan_device_event()
501 /* Propagate to vlan devices */ in vlan_device_event()
536 * VLAN IOCTL handler.
741 MODULE_DESCRIPTION("802.1Q/802.1ad VLAN Protocol");