Lines Matching refs:vid
10 static int sparx5_vlant_set_mask(struct sparx5 *sparx5, u16 vid) in sparx5_vlant_set_mask() argument
15 bitmap_to_arr32(mask, sparx5->vlan_mask[vid], SPX5_PORTS); in sparx5_vlant_set_mask()
18 spx5_wr(mask[0], sparx5, ANA_L3_VLAN_MASK_CFG(vid)); in sparx5_vlant_set_mask()
19 spx5_wr(mask[1], sparx5, ANA_L3_VLAN_MASK_CFG1(vid)); in sparx5_vlant_set_mask()
20 spx5_wr(mask[2], sparx5, ANA_L3_VLAN_MASK_CFG2(vid)); in sparx5_vlant_set_mask()
27 u16 vid; in sparx5_vlan_init() local
35 for (vid = NULL_VID; vid < VLAN_N_VID; vid++) in sparx5_vlan_init()
36 spx5_rmw(ANA_L3_VLAN_CFG_VLAN_FID_SET(vid), in sparx5_vlan_init()
39 ANA_L3_VLAN_CFG(vid)); in sparx5_vlan_init()
55 int sparx5_vlan_vid_add(struct sparx5_port *port, u16 vid, bool pvid, in sparx5_vlan_vid_add() argument
62 set_bit(port->portno, sparx5->vlan_mask[vid]); in sparx5_vlan_vid_add()
63 ret = sparx5_vlant_set_mask(sparx5, vid); in sparx5_vlan_vid_add()
69 port->pvid = vid; in sparx5_vlan_vid_add()
72 if (untagged && port->vid != vid) { in sparx5_vlan_vid_add()
73 if (port->vid) { in sparx5_vlan_vid_add()
76 port->vid); in sparx5_vlan_vid_add()
79 port->vid = vid; in sparx5_vlan_vid_add()
87 int sparx5_vlan_vid_del(struct sparx5_port *port, u16 vid) in sparx5_vlan_vid_del() argument
96 if (vid == 0) in sparx5_vlan_vid_del()
100 clear_bit(port->portno, sparx5->vlan_mask[vid]); in sparx5_vlan_vid_del()
101 ret = sparx5_vlant_set_mask(sparx5, vid); in sparx5_vlan_vid_del()
106 if (port->pvid == vid) in sparx5_vlan_vid_del()
110 if (port->vid == vid) in sparx5_vlan_vid_del()
111 port->vid = 0; in sparx5_vlan_vid_del()
211 if (port->vid) in sparx5_vlan_port_apply()
220 spx5_rmw(REW_PORT_VLAN_CFG_PORT_VID_SET(port->vid), in sparx5_vlan_port_apply()