Lines Matching refs:vlan
50 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_hard_header() local
56 if (!(vlan->flags & VLAN_FLAG_REORDER_HDR)) { in vlan_dev_hard_header()
59 vlan_tci = vlan->vlan_id; in vlan_dev_hard_header()
72 skb->protocol = vlan->vlan_proto; in vlan_dev_hard_header()
73 type = ntohs(vlan->vlan_proto); in vlan_dev_hard_header()
82 dev = vlan->real_dev; in vlan_dev_hard_header()
89 static inline netdev_tx_t vlan_netpoll_send_skb(struct vlan_dev_priv *vlan, struct sk_buff *skb) in vlan_netpoll_send_skb() argument
92 return netpoll_send_skb(vlan->netpoll, skb); in vlan_netpoll_send_skb()
102 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_hard_start_xmit() local
112 if (vlan->flags & VLAN_FLAG_REORDER_HDR || in vlan_dev_hard_start_xmit()
113 veth->h_vlan_proto != vlan->vlan_proto) { in vlan_dev_hard_start_xmit()
115 vlan_tci = vlan->vlan_id; in vlan_dev_hard_start_xmit()
117 __vlan_hwaccel_put_tag(skb, vlan->vlan_proto, vlan_tci); in vlan_dev_hard_start_xmit()
120 skb->dev = vlan->real_dev; in vlan_dev_hard_start_xmit()
123 return vlan_netpoll_send_skb(vlan, skb); in vlan_dev_hard_start_xmit()
130 stats = this_cpu_ptr(vlan->vlan_pcpu_stats); in vlan_dev_hard_start_xmit()
136 this_cpu_inc(vlan->vlan_pcpu_stats->tx_dropped); in vlan_dev_hard_start_xmit()
160 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_set_ingress_priority() local
162 if (vlan->ingress_priority_map[vlan_prio & 0x7] && !skb_prio) in vlan_dev_set_ingress_priority()
163 vlan->nr_ingress_mappings--; in vlan_dev_set_ingress_priority()
164 else if (!vlan->ingress_priority_map[vlan_prio & 0x7] && skb_prio) in vlan_dev_set_ingress_priority()
165 vlan->nr_ingress_mappings++; in vlan_dev_set_ingress_priority()
167 vlan->ingress_priority_map[vlan_prio & 0x7] = skb_prio; in vlan_dev_set_ingress_priority()
173 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_set_egress_priority() local
179 mp = vlan->egress_priority_map[skb_prio & 0xF]; in vlan_dev_set_egress_priority()
183 vlan->nr_egress_mappings--; in vlan_dev_set_egress_priority()
185 vlan->nr_egress_mappings++; in vlan_dev_set_egress_priority()
193 mp = vlan->egress_priority_map[skb_prio & 0xF]; in vlan_dev_set_egress_priority()
206 vlan->egress_priority_map[skb_prio & 0xF] = np; in vlan_dev_set_egress_priority()
208 vlan->nr_egress_mappings++; in vlan_dev_set_egress_priority()
217 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_change_flags() local
218 u32 old_flags = vlan->flags; in vlan_dev_change_flags()
225 vlan->flags = (old_flags & ~mask) | (flags & mask); in vlan_dev_change_flags()
227 if (netif_running(dev) && (vlan->flags ^ old_flags) & VLAN_FLAG_GVRP) { in vlan_dev_change_flags()
228 if (vlan->flags & VLAN_FLAG_GVRP) in vlan_dev_change_flags()
234 if (netif_running(dev) && (vlan->flags ^ old_flags) & VLAN_FLAG_MVRP) { in vlan_dev_change_flags()
235 if (vlan->flags & VLAN_FLAG_MVRP) in vlan_dev_change_flags()
261 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_open() local
262 struct net_device *real_dev = vlan->real_dev; in vlan_dev_open()
266 !(vlan->flags & VLAN_FLAG_LOOSE_BINDING)) in vlan_dev_open()
287 ether_addr_copy(vlan->real_dev_addr, real_dev->dev_addr); in vlan_dev_open()
289 if (vlan->flags & VLAN_FLAG_GVRP) in vlan_dev_open()
292 if (vlan->flags & VLAN_FLAG_MVRP) in vlan_dev_open()
296 !(vlan->flags & VLAN_FLAG_BRIDGE_BINDING)) in vlan_dev_open()
313 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_stop() local
314 struct net_device *real_dev = vlan->real_dev; in vlan_dev_stop()
326 if (!(vlan->flags & VLAN_FLAG_BRIDGE_BINDING)) in vlan_dev_stop()
525 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_passthru_hard_header() local
526 struct net_device *real_dev = vlan->real_dev; in vlan_passthru_hard_header()
548 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_init() local
549 struct net_device *real_dev = vlan->real_dev; in vlan_dev_init()
560 if (vlan->flags & VLAN_FLAG_BRIDGE_BINDING) in vlan_dev_init()
599 if (vlan_hw_offload_capable(real_dev->features, vlan->vlan_proto)) { in vlan_dev_init()
613 vlan->vlan_pcpu_stats = netdev_alloc_pcpu_stats(struct vlan_pcpu_stats); in vlan_dev_init()
614 if (!vlan->vlan_pcpu_stats) in vlan_dev_init()
618 netdev_hold(real_dev, &vlan->dev_tracker, GFP_KERNEL); in vlan_dev_init()
627 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_free_egress_priority() local
630 for (i = 0; i < ARRAY_SIZE(vlan->egress_priority_map); i++) { in vlan_dev_free_egress_priority()
631 while ((pm = vlan->egress_priority_map[i]) != NULL) { in vlan_dev_free_egress_priority()
632 vlan->egress_priority_map[i] = pm->next; in vlan_dev_free_egress_priority()
668 const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_ethtool_get_link_ksettings() local
670 return __ethtool_get_link_ksettings(vlan->real_dev, cmd); in vlan_ethtool_get_link_ksettings()
684 const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_ethtool_get_ts_info() local
685 return ethtool_get_ts_info_by_layer(vlan->real_dev, info); in vlan_ethtool_get_ts_info()
730 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_netpoll_setup() local
731 struct net_device *real_dev = vlan->real_dev; in vlan_dev_netpoll_setup()
746 vlan->netpoll = netpoll; in vlan_dev_netpoll_setup()
754 struct vlan_dev_priv *vlan= vlan_dev_priv(dev); in vlan_dev_netpoll_cleanup() local
755 struct netpoll *netpoll = vlan->netpoll; in vlan_dev_netpoll_cleanup()
760 vlan->netpoll = NULL; in vlan_dev_netpoll_cleanup()
775 struct vlan_dev_priv *vlan = vlan_dev_priv(ctx->dev); in vlan_dev_fill_forward_path() local
778 path->encap.id = vlan->vlan_id; in vlan_dev_fill_forward_path()
779 path->encap.proto = vlan->vlan_proto; in vlan_dev_fill_forward_path()
781 ctx->dev = vlan->real_dev; in vlan_dev_fill_forward_path()
782 if (ctx->num_vlans >= ARRAY_SIZE(ctx->vlan)) in vlan_dev_fill_forward_path()
785 ctx->vlan[ctx->num_vlans].id = vlan->vlan_id; in vlan_dev_fill_forward_path()
786 ctx->vlan[ctx->num_vlans].proto = vlan->vlan_proto; in vlan_dev_fill_forward_path()
1072 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_free() local
1074 free_percpu(vlan->vlan_pcpu_stats); in vlan_dev_free()
1075 vlan->vlan_pcpu_stats = NULL; in vlan_dev_free()
1078 netdev_put(vlan->real_dev, &vlan->dev_tracker); in vlan_dev_free()