Lines Matching refs:br_vlan

181 	struct prestera_bridge_vlan *br_vlan;  in prestera_bridge_vlan_create()  local
183 br_vlan = kzalloc(sizeof(*br_vlan), GFP_KERNEL); in prestera_bridge_vlan_create()
184 if (!br_vlan) in prestera_bridge_vlan_create()
187 INIT_LIST_HEAD(&br_vlan->port_vlan_list); in prestera_bridge_vlan_create()
188 br_vlan->vid = vid; in prestera_bridge_vlan_create()
189 list_add(&br_vlan->head, &br_port->vlan_list); in prestera_bridge_vlan_create()
191 return br_vlan; in prestera_bridge_vlan_create()
194 static void prestera_bridge_vlan_destroy(struct prestera_bridge_vlan *br_vlan) in prestera_bridge_vlan_destroy() argument
196 list_del(&br_vlan->head); in prestera_bridge_vlan_destroy()
197 WARN_ON(!list_empty(&br_vlan->port_vlan_list)); in prestera_bridge_vlan_destroy()
198 kfree(br_vlan); in prestera_bridge_vlan_destroy()
204 struct prestera_bridge_vlan *br_vlan; in prestera_bridge_vlan_by_vid() local
206 list_for_each_entry(br_vlan, &br_port->vlan_list, head) { in prestera_bridge_vlan_by_vid()
207 if (br_vlan->vid == vid) in prestera_bridge_vlan_by_vid()
208 return br_vlan; in prestera_bridge_vlan_by_vid()
218 struct prestera_bridge_vlan *br_vlan; in prestera_bridge_vlan_port_count() local
222 list_for_each_entry(br_vlan, &br_port->vlan_list, head) { in prestera_bridge_vlan_port_count()
223 if (br_vlan->vid == vid) { in prestera_bridge_vlan_port_count()
233 static void prestera_bridge_vlan_put(struct prestera_bridge_vlan *br_vlan) in prestera_bridge_vlan_put() argument
235 if (list_empty(&br_vlan->port_vlan_list)) in prestera_bridge_vlan_put()
236 prestera_bridge_vlan_destroy(br_vlan); in prestera_bridge_vlan_put()
392 struct prestera_bridge_vlan *br_vlan; in prestera_port_vlan_bridge_leave() local
400 br_vlan = prestera_bridge_vlan_by_vid(br_port, vid); in prestera_port_vlan_bridge_leave()
415 prestera_bridge_vlan_put(br_vlan); in prestera_port_vlan_bridge_leave()
817 struct prestera_bridge_vlan *br_vlan, in prestera_port_bridge_vlan_stp_set() argument
822 list_for_each_entry(port_vlan, &br_vlan->port_vlan_list, br_vlan_head) { in prestera_port_bridge_vlan_stp_set()
826 return prestera_port_vid_stp_set(port, br_vlan->vid, state); in prestera_port_bridge_vlan_stp_set()
837 struct prestera_bridge_vlan *br_vlan; in prestera_port_attr_stp_state_set() local
851 list_for_each_entry(br_vlan, &br_port->vlan_list, head) { in prestera_port_attr_stp_state_set()
852 err = prestera_port_bridge_vlan_stp_set(port, br_vlan, in prestera_port_attr_stp_state_set()
864 list_for_each_entry_continue_reverse(br_vlan, &br_port->vlan_list, head) in prestera_port_attr_stp_state_set()
865 prestera_port_bridge_vlan_stp_set(port, br_vlan, br_port->stp_state); in prestera_port_attr_stp_state_set()
1361 struct prestera_bridge_vlan *br_vlan; in prestera_port_vlan_bridge_join() local
1376 br_vlan = prestera_bridge_vlan_by_vid(br_port, vid); in prestera_port_vlan_bridge_join()
1377 if (!br_vlan) { in prestera_port_vlan_bridge_join()
1378 br_vlan = prestera_bridge_vlan_create(br_port, vid); in prestera_port_vlan_bridge_join()
1379 if (!br_vlan) { in prestera_port_vlan_bridge_join()
1385 list_add(&port_vlan->br_vlan_head, &br_vlan->port_vlan_list); in prestera_port_vlan_bridge_join()