Lines Matching refs:vid_info
183 struct vlan_vid_info *vid_info; in vlan_vid_info_get() local
185 list_for_each_entry(vid_info, &vlan_info->vid_list, list) { in vlan_vid_info_get()
186 if (vid_info->proto == proto && vid_info->vid == vid) in vlan_vid_info_get()
187 return vid_info; in vlan_vid_info_get()
194 struct vlan_vid_info *vid_info; in vlan_vid_info_alloc() local
196 vid_info = kzalloc(sizeof(struct vlan_vid_info), GFP_KERNEL); in vlan_vid_info_alloc()
197 if (!vid_info) in vlan_vid_info_alloc()
199 vid_info->proto = proto; in vlan_vid_info_alloc()
200 vid_info->vid = vid; in vlan_vid_info_alloc()
202 return vid_info; in vlan_vid_info_alloc()
231 struct vlan_vid_info *vid_info; in vlan_for_each() local
242 list_for_each_entry(vid_info, &vlan_info->vid_list, list) { in vlan_for_each()
243 vdev = vlan_group_get_device(&vlan_info->grp, vid_info->proto, in vlan_for_each()
244 vid_info->vid); in vlan_for_each()
245 ret = action(vdev, vid_info->vid, arg); in vlan_for_each()
299 struct vlan_vid_info *vid_info; in __vlan_vid_add() local
302 vid_info = vlan_vid_info_alloc(proto, vid); in __vlan_vid_add()
303 if (!vid_info) in __vlan_vid_add()
308 kfree(vid_info); in __vlan_vid_add()
312 list_add(&vid_info->list, &vlan_info->vid_list); in __vlan_vid_add()
314 *pvid_info = vid_info; in __vlan_vid_add()
321 struct vlan_vid_info *vid_info; in vlan_vid_add() local
334 vid_info = vlan_vid_info_get(vlan_info, proto, vid); in vlan_vid_add()
335 if (!vid_info) { in vlan_vid_add()
336 err = __vlan_vid_add(vlan_info, proto, vid, &vid_info); in vlan_vid_add()
340 vid_info->refcount++; in vlan_vid_add()
355 struct vlan_vid_info *vid_info) in __vlan_vid_del() argument
358 __be16 proto = vid_info->proto; in __vlan_vid_del()
359 u16 vid = vid_info->vid; in __vlan_vid_del()
366 list_del(&vid_info->list); in __vlan_vid_del()
367 kfree(vid_info); in __vlan_vid_del()
374 struct vlan_vid_info *vid_info; in vlan_vid_del() local
382 vid_info = vlan_vid_info_get(vlan_info, proto, vid); in vlan_vid_del()
383 if (!vid_info) in vlan_vid_del()
385 vid_info->refcount--; in vlan_vid_del()
386 if (vid_info->refcount == 0) { in vlan_vid_del()
387 __vlan_vid_del(vlan_info, vid_info); in vlan_vid_del()
399 struct vlan_vid_info *vid_info; in vlan_vids_add_by_dev() local
409 list_for_each_entry(vid_info, &vlan_info->vid_list, list) { in vlan_vids_add_by_dev()
410 err = vlan_vid_add(dev, vid_info->proto, vid_info->vid); in vlan_vids_add_by_dev()
417 list_for_each_entry_continue_reverse(vid_info, in vlan_vids_add_by_dev()
420 vlan_vid_del(dev, vid_info->proto, vid_info->vid); in vlan_vids_add_by_dev()
430 struct vlan_vid_info *vid_info; in vlan_vids_del_by_dev() local
439 list_for_each_entry(vid_info, &vlan_info->vid_list, list) in vlan_vids_del_by_dev()
440 vlan_vid_del(dev, vid_info->proto, vid_info->vid); in vlan_vids_del_by_dev()