Lines Matching refs:vlan

49 	struct vlan_dev_priv *vlan = vlan_dev_priv(dev);  in vlan_dev_hard_header()  local
55 if (!(vlan->flags & VLAN_FLAG_REORDER_HDR)) { in vlan_dev_hard_header()
58 vlan_tci = vlan->vlan_id; in vlan_dev_hard_header()
71 skb->protocol = vlan->vlan_proto; in vlan_dev_hard_header()
72 type = ntohs(vlan->vlan_proto); in vlan_dev_hard_header()
81 dev = vlan->real_dev; in vlan_dev_hard_header()
88 static inline netdev_tx_t vlan_netpoll_send_skb(struct vlan_dev_priv *vlan, struct sk_buff *skb) in vlan_netpoll_send_skb() argument
91 return netpoll_send_skb(vlan->netpoll, skb); in vlan_netpoll_send_skb()
101 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_hard_start_xmit() local
111 if (veth->h_vlan_proto != vlan->vlan_proto || in vlan_dev_hard_start_xmit()
112 vlan->flags & VLAN_FLAG_REORDER_HDR) { in vlan_dev_hard_start_xmit()
114 vlan_tci = vlan->vlan_id; in vlan_dev_hard_start_xmit()
116 __vlan_hwaccel_put_tag(skb, vlan->vlan_proto, vlan_tci); in vlan_dev_hard_start_xmit()
119 skb->dev = vlan->real_dev; in vlan_dev_hard_start_xmit()
122 return vlan_netpoll_send_skb(vlan, skb); in vlan_dev_hard_start_xmit()
129 stats = this_cpu_ptr(vlan->vlan_pcpu_stats); in vlan_dev_hard_start_xmit()
135 this_cpu_inc(vlan->vlan_pcpu_stats->tx_dropped); in vlan_dev_hard_start_xmit()
159 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_set_ingress_priority() local
161 if (vlan->ingress_priority_map[vlan_prio & 0x7] && !skb_prio) in vlan_dev_set_ingress_priority()
162 vlan->nr_ingress_mappings--; in vlan_dev_set_ingress_priority()
163 else if (!vlan->ingress_priority_map[vlan_prio & 0x7] && skb_prio) in vlan_dev_set_ingress_priority()
164 vlan->nr_ingress_mappings++; in vlan_dev_set_ingress_priority()
166 vlan->ingress_priority_map[vlan_prio & 0x7] = skb_prio; in vlan_dev_set_ingress_priority()
172 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_set_egress_priority() local
178 mp = vlan->egress_priority_map[skb_prio & 0xF]; in vlan_dev_set_egress_priority()
182 vlan->nr_egress_mappings--; in vlan_dev_set_egress_priority()
184 vlan->nr_egress_mappings++; in vlan_dev_set_egress_priority()
192 mp = vlan->egress_priority_map[skb_prio & 0xF]; in vlan_dev_set_egress_priority()
205 vlan->egress_priority_map[skb_prio & 0xF] = np; in vlan_dev_set_egress_priority()
207 vlan->nr_egress_mappings++; in vlan_dev_set_egress_priority()
216 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_change_flags() local
217 u32 old_flags = vlan->flags; in vlan_dev_change_flags()
224 vlan->flags = (old_flags & ~mask) | (flags & mask); in vlan_dev_change_flags()
226 if (netif_running(dev) && (vlan->flags ^ old_flags) & VLAN_FLAG_GVRP) { in vlan_dev_change_flags()
227 if (vlan->flags & VLAN_FLAG_GVRP) in vlan_dev_change_flags()
233 if (netif_running(dev) && (vlan->flags ^ old_flags) & VLAN_FLAG_MVRP) { in vlan_dev_change_flags()
234 if (vlan->flags & VLAN_FLAG_MVRP) in vlan_dev_change_flags()
260 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_open() local
261 struct net_device *real_dev = vlan->real_dev; in vlan_dev_open()
265 !(vlan->flags & VLAN_FLAG_LOOSE_BINDING)) in vlan_dev_open()
286 ether_addr_copy(vlan->real_dev_addr, real_dev->dev_addr); in vlan_dev_open()
288 if (vlan->flags & VLAN_FLAG_GVRP) in vlan_dev_open()
291 if (vlan->flags & VLAN_FLAG_MVRP) in vlan_dev_open()
295 !(vlan->flags & VLAN_FLAG_BRIDGE_BINDING)) in vlan_dev_open()
312 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_stop() local
313 struct net_device *real_dev = vlan->real_dev; in vlan_dev_stop()
325 if (!(vlan->flags & VLAN_FLAG_BRIDGE_BINDING)) in vlan_dev_stop()
531 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_passthru_hard_header() local
532 struct net_device *real_dev = vlan->real_dev; in vlan_passthru_hard_header()
554 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_init() local
555 struct net_device *real_dev = vlan->real_dev; in vlan_dev_init()
566 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()
669 const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_ethtool_get_link_ksettings() local
671 return __ethtool_get_link_ksettings(vlan->real_dev, cmd); in vlan_ethtool_get_link_ksettings()
685 const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_ethtool_get_ts_info() local
686 const struct ethtool_ops *ops = vlan->real_dev->ethtool_ops; in vlan_ethtool_get_ts_info()
687 struct phy_device *phydev = vlan->real_dev->phydev; in vlan_ethtool_get_ts_info()
692 return ops->get_ts_info(vlan->real_dev, info); in vlan_ethtool_get_ts_info()
744 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_netpoll_setup() local
745 struct net_device *real_dev = vlan->real_dev; in vlan_dev_netpoll_setup()
760 vlan->netpoll = netpoll; in vlan_dev_netpoll_setup()
768 struct vlan_dev_priv *vlan= vlan_dev_priv(dev); in vlan_dev_netpoll_cleanup() local
769 struct netpoll *netpoll = vlan->netpoll; in vlan_dev_netpoll_cleanup()
774 vlan->netpoll = NULL; in vlan_dev_netpoll_cleanup()
789 struct vlan_dev_priv *vlan = vlan_dev_priv(ctx->dev); in vlan_dev_fill_forward_path() local
792 path->encap.id = vlan->vlan_id; in vlan_dev_fill_forward_path()
793 path->encap.proto = vlan->vlan_proto; in vlan_dev_fill_forward_path()
795 ctx->dev = vlan->real_dev; in vlan_dev_fill_forward_path()
796 if (ctx->num_vlans >= ARRAY_SIZE(ctx->vlan)) in vlan_dev_fill_forward_path()
799 ctx->vlan[ctx->num_vlans].id = vlan->vlan_id; in vlan_dev_fill_forward_path()
800 ctx->vlan[ctx->num_vlans].proto = vlan->vlan_proto; in vlan_dev_fill_forward_path()
849 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_free() local
851 free_percpu(vlan->vlan_pcpu_stats); in vlan_dev_free()
852 vlan->vlan_pcpu_stats = NULL; in vlan_dev_free()
855 netdev_put(vlan->real_dev, &vlan->dev_tracker); in vlan_dev_free()