Lines Matching refs:vid
59 u16 vid; member
67 u16 vid; member
74 static int prestera_port_vid_stp_set(struct prestera_port *port, u16 vid,
78 prestera_bridge_vlan_create(struct prestera_bridge_port *br_port, u16 vid) in prestera_bridge_vlan_create() argument
87 br_vlan->vid = vid; in prestera_bridge_vlan_create()
101 prestera_bridge_vlan_by_vid(struct prestera_bridge_port *br_port, u16 vid) in prestera_bridge_vlan_by_vid() argument
106 if (br_vlan->vid == vid) in prestera_bridge_vlan_by_vid()
114 u16 vid) in prestera_bridge_vlan_port_count() argument
122 if (br_vlan->vid == vid) { in prestera_bridge_vlan_port_count()
139 prestera_port_vlan_by_vid(struct prestera_port *port, u16 vid) in prestera_port_vlan_by_vid() argument
144 if (port_vlan->vid == vid) in prestera_port_vlan_by_vid()
152 prestera_port_vlan_create(struct prestera_port *port, u16 vid, bool untagged) in prestera_port_vlan_create() argument
157 port_vlan = prestera_port_vlan_by_vid(port, vid); in prestera_port_vlan_create()
161 err = prestera_hw_vlan_port_set(port, vid, true, untagged); in prestera_port_vlan_create()
172 port_vlan->vid = vid; in prestera_port_vlan_create()
179 prestera_hw_vlan_port_set(port, vid, false, false); in prestera_port_vlan_create()
184 const unsigned char *mac, u16 vid, bool dynamic) in prestera_fdb_add() argument
188 mac, vid, dynamic); in prestera_fdb_add()
190 return prestera_hw_fdb_add(port, mac, vid, dynamic); in prestera_fdb_add()
194 const unsigned char *mac, u16 vid) in prestera_fdb_del() argument
198 mac, vid); in prestera_fdb_del()
200 return prestera_hw_fdb_del(port, mac, vid); in prestera_fdb_del()
203 static int prestera_fdb_flush_port_vlan(struct prestera_port *port, u16 vid, in prestera_fdb_flush_port_vlan() argument
208 vid, mode); in prestera_fdb_flush_port_vlan()
210 return prestera_hw_fdb_flush_port_vlan(port, vid, mode); in prestera_fdb_flush_port_vlan()
230 u16 vid = port_vlan->vid; in prestera_port_vlan_bridge_leave() local
234 port_count = prestera_bridge_vlan_port_count(br_port->bridge, vid); in prestera_port_vlan_bridge_leave()
235 br_vlan = prestera_bridge_vlan_by_vid(br_port, vid); in prestera_port_vlan_bridge_leave()
243 prestera_hw_fdb_flush_vlan(port->sw, vid, fdb_flush_mode); in prestera_port_vlan_bridge_leave()
245 prestera_fdb_flush_port_vlan(port, vid, fdb_flush_mode); in prestera_port_vlan_bridge_leave()
256 u16 vid = port_vlan->vid; in prestera_port_vlan_destroy() local
261 prestera_hw_vlan_port_set(port, vid, false, false); in prestera_port_vlan_destroy()
541 static int prestera_port_vid_stp_set(struct prestera_port *port, u16 vid, in prestera_port_vid_stp_set() argument
568 return prestera_hw_vlan_port_stp_set(port, vid, hw_state); in prestera_port_vid_stp_set()
671 return prestera_port_vid_stp_set(port, br_vlan->vid, state); in prestera_port_bridge_vlan_stp_set()
684 u16 vid; in prestera_port_attr_stp_state_set() local
691 vid = br_port->bridge->bridge_id; in prestera_port_attr_stp_state_set()
692 err = prestera_port_vid_stp_set(port, vid, state); in prestera_port_attr_stp_state_set()
714 prestera_port_vid_stp_set(port, vid, br_port->stp_state); in prestera_port_attr_stp_state_set()
762 send_info.vid = info->vid; in prestera_fdb_offload_notify()
777 u16 vid; in prestera_port_fdb_set() local
786 vid = fdb_info->vid; in prestera_port_fdb_set()
788 vid = bridge->bridge_id; in prestera_port_fdb_set()
791 err = prestera_fdb_add(port, fdb_info->addr, vid, false); in prestera_port_fdb_set()
793 err = prestera_fdb_del(port, fdb_info->addr, vid); in prestera_port_fdb_set()
915 u16 vid = port_vlan->vid; in prestera_port_vlan_bridge_join() local
930 err = prestera_port_vid_stp_set(port, vid, br_port->stp_state); in prestera_port_vlan_bridge_join()
934 br_vlan = prestera_bridge_vlan_by_vid(br_port, vid); in prestera_port_vlan_bridge_join()
936 br_vlan = prestera_bridge_vlan_create(br_port, vid); in prestera_port_vlan_bridge_join()
951 prestera_port_vid_stp_set(port, vid, BR_STATE_FORWARDING); in prestera_port_vlan_bridge_join()
961 u16 vid, bool is_untagged, bool is_pvid, in prestera_bridge_port_vlan_add() argument
970 pvid = vid; in prestera_bridge_port_vlan_add()
972 pvid = port->pvid == vid ? 0 : port->pvid; in prestera_bridge_port_vlan_add()
974 port_vlan = prestera_port_vlan_by_vid(port, vid); in prestera_bridge_port_vlan_add()
979 port_vlan = prestera_port_vlan_create(port, vid, is_untagged); in prestera_bridge_port_vlan_add()
983 err = prestera_hw_vlan_port_set(port, vid, true, is_untagged); in prestera_bridge_port_vlan_add()
1001 prestera_hw_vlan_port_set(port, vid, false, false); in prestera_bridge_port_vlan_add()
1010 struct prestera_bridge_port *br_port, u16 vid) in prestera_bridge_port_vlan_del() argument
1012 u16 pvid = port->pvid == vid ? 0 : port->pvid; in prestera_bridge_port_vlan_del()
1015 port_vlan = prestera_port_vlan_by_vid(port, vid); in prestera_bridge_port_vlan_del()
1047 vlan->vid, flag_untagged, in prestera_port_vlans_add()
1084 prestera_bridge_port_vlan_del(port, br_port, vlan->vid); in prestera_port_vlans_del()
1158 info.vid = evt->fdb_evt.vid; in prestera_fdb_event()