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";
80 struct vlan_dev_priv *vlan) in vlan_stacked_transfer_operstate() argument
82 if (!(vlan->flags & VLAN_FLAG_BRIDGE_BINDING)) in vlan_stacked_transfer_operstate()
88 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in unregister_vlan_dev() local
89 struct net_device *real_dev = vlan->real_dev; in unregister_vlan_dev()
92 u16 vlan_id = vlan->vlan_id; in unregister_vlan_dev()
103 if (vlan->flags & VLAN_FLAG_MVRP) in unregister_vlan_dev()
105 if (vlan->flags & VLAN_FLAG_GVRP) in unregister_vlan_dev()
108 vlan_group_set_device(grp, vlan->vlan_proto, vlan_id, NULL); in unregister_vlan_dev()
122 vlan_vid_del(real_dev, vlan->vlan_proto, vlan_id); in unregister_vlan_dev()
124 /* Get rid of the vlan's reference to real_dev */ 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()
190 vlan_stacked_transfer_operstate(real_dev, dev, vlan); in register_vlan_dev()
196 vlan_group_set_device(grp, vlan->vlan_proto, vlan_id, dev); in register_vlan_dev()
210 vlan_vid_del(real_dev, vlan->vlan_proto, vlan_id); in register_vlan_dev()
214 /* Attach a VLAN device to a mac address (ie Ethernet Card).
220 struct vlan_dev_priv *vlan; in register_vlan_device() local
241 /* Put our vlan.VID in the name. in register_vlan_device()
244 snprintf(name, IFNAMSIZ, "vlan%i", vlan_id); in register_vlan_device()
247 /* Put our vlan.VID in the name. in register_vlan_device()
253 /* Put our vlan.VID in the name. in register_vlan_device()
257 snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id); in register_vlan_device()
267 /* need 4 bytes for extra VLAN header info, in register_vlan_device()
272 vlan = vlan_dev_priv(new_dev); in register_vlan_device()
273 vlan->vlan_proto = htons(ETH_P_8021Q); in register_vlan_device()
274 vlan->vlan_id = vlan_id; in register_vlan_device()
275 vlan->real_dev = real_dev; in register_vlan_device()
276 vlan->dent = NULL; in register_vlan_device()
277 vlan->flags = VLAN_FLAG_REORDER_HDR; in register_vlan_device()
295 struct vlan_dev_priv *vlan = vlan_dev_priv(vlandev); in vlan_sync_address() local
298 if (ether_addr_equal(vlan->real_dev_addr, dev->dev_addr)) in vlan_sync_address()
301 /* vlan continues to inherit address of lower device */ in vlan_sync_address()
305 /* vlan address was different from the old address and is equal to in vlan_sync_address()
307 if (!ether_addr_equal(vlandev->dev_addr, vlan->real_dev_addr) && in vlan_sync_address()
311 /* vlan address was equal to the old address and is different from in vlan_sync_address()
313 if (ether_addr_equal(vlandev->dev_addr, vlan->real_dev_addr) && in vlan_sync_address()
318 ether_addr_copy(vlan->real_dev_addr, dev->dev_addr); in vlan_sync_address()
324 struct vlan_dev_priv *vlan = vlan_dev_priv(vlandev); in vlan_transfer_features() local
329 if (vlan_hw_offload_capable(dev->features, vlan->vlan_proto)) in vlan_transfer_features()
339 vlandev->priv_flags |= (vlan->real_dev->priv_flags & IFF_XMIT_DST_RELEASE); in vlan_transfer_features()
340 vlandev->hw_enc_features = vlan_tnl_features(vlan->real_dev); in vlan_transfer_features()
374 struct vlan_dev_priv *vlan; in vlan_device_event() local
388 pr_info("adding VLAN 0 to HW filter on device %s\n", in vlan_device_event()
407 /* Propagate real device state to vlan devices */ in vlan_device_event()
449 vlan = vlan_dev_priv(vlandev); in vlan_device_event()
450 if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING)) in vlan_device_event()
471 vlan = vlan_dev_priv(vlandev); in vlan_device_event()
472 if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING)) in vlan_device_event()
475 vlan_stacked_transfer_operstate(dev, vlandev, vlan); in vlan_device_event()
506 /* Propagate to vlan devices */ in vlan_device_event()
541 * VLAN IOCTL handler.