• Home
  • Raw
  • Download

Lines Matching refs:proto

163 	__be16 proto;  member
168 static bool vlan_hw_filter_capable(const struct net_device *dev, __be16 proto) in vlan_hw_filter_capable() argument
170 if (proto == htons(ETH_P_8021Q) && in vlan_hw_filter_capable()
173 if (proto == htons(ETH_P_8021AD) && in vlan_hw_filter_capable()
180 __be16 proto, u16 vid) in vlan_vid_info_get() argument
185 if (vid_info->proto == proto && vid_info->vid == vid) in vlan_vid_info_get()
191 static struct vlan_vid_info *vlan_vid_info_alloc(__be16 proto, u16 vid) in vlan_vid_info_alloc() argument
198 vid_info->proto = proto; in vlan_vid_info_alloc()
204 static int vlan_add_rx_filter_info(struct net_device *dev, __be16 proto, u16 vid) in vlan_add_rx_filter_info() argument
206 if (!vlan_hw_filter_capable(dev, proto)) in vlan_add_rx_filter_info()
210 return dev->netdev_ops->ndo_vlan_rx_add_vid(dev, proto, vid); in vlan_add_rx_filter_info()
215 static int vlan_kill_rx_filter_info(struct net_device *dev, __be16 proto, u16 vid) in vlan_kill_rx_filter_info() argument
217 if (!vlan_hw_filter_capable(dev, proto)) in vlan_kill_rx_filter_info()
221 return dev->netdev_ops->ndo_vlan_rx_kill_vid(dev, proto, vid); in vlan_kill_rx_filter_info()
242 vdev = vlan_group_get_device(&vlan_info->grp, vid_info->proto, in vlan_for_each()
253 int vlan_filter_push_vids(struct vlan_info *vlan_info, __be16 proto) in vlan_filter_push_vids() argument
260 if (vlan_vid_info->proto == proto) { in vlan_filter_push_vids()
261 err = vlan_add_rx_filter_info(real_dev, proto, in vlan_filter_push_vids()
273 if (vlan_vid_info->proto == proto) in vlan_filter_push_vids()
274 vlan_kill_rx_filter_info(real_dev, proto, in vlan_filter_push_vids()
282 void vlan_filter_drop_vids(struct vlan_info *vlan_info, __be16 proto) in vlan_filter_drop_vids() argument
287 if (vlan_vid_info->proto == proto) in vlan_filter_drop_vids()
289 vlan_vid_info->proto, in vlan_filter_drop_vids()
294 static int __vlan_vid_add(struct vlan_info *vlan_info, __be16 proto, u16 vid, in __vlan_vid_add() argument
301 vid_info = vlan_vid_info_alloc(proto, vid); in __vlan_vid_add()
305 err = vlan_add_rx_filter_info(dev, proto, vid); in __vlan_vid_add()
317 int vlan_vid_add(struct net_device *dev, __be16 proto, u16 vid) in vlan_vid_add() argument
333 vid_info = vlan_vid_info_get(vlan_info, proto, vid); in vlan_vid_add()
335 err = __vlan_vid_add(vlan_info, proto, vid, &vid_info); in vlan_vid_add()
357 __be16 proto = vid_info->proto; in __vlan_vid_del() local
361 err = vlan_kill_rx_filter_info(dev, proto, vid); in __vlan_vid_del()
364 proto, vid, dev->name); in __vlan_vid_del()
371 void vlan_vid_del(struct net_device *dev, __be16 proto, u16 vid) in vlan_vid_del() argument
382 vid_info = vlan_vid_info_get(vlan_info, proto, vid); in vlan_vid_del()
410 if (!vlan_hw_filter_capable(by_dev, vid_info->proto)) in vlan_vids_add_by_dev()
412 err = vlan_vid_add(dev, vid_info->proto, vid_info->vid); in vlan_vids_add_by_dev()
422 if (!vlan_hw_filter_capable(by_dev, vid_info->proto)) in vlan_vids_add_by_dev()
424 vlan_vid_del(dev, vid_info->proto, vid_info->vid); in vlan_vids_add_by_dev()
444 if (!vlan_hw_filter_capable(by_dev, vid_info->proto)) in vlan_vids_del_by_dev()
446 vlan_vid_del(dev, vid_info->proto, vid_info->vid); in vlan_vids_del_by_dev()