Lines Matching refs:port

55 static bool dsa_switch_mtu_match(struct dsa_switch *ds, int port,
59 return (port == info->port) || dsa_is_dsa_port(ds, port);
64 if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port))
73 int port, ret;
78 for (port = 0; port < ds->num_ports; port++) {
79 if (dsa_switch_mtu_match(ds, port, info)) {
80 ret = ds->ops->port_change_mtu(ds, port, info->mtu);
96 return ds->ops->port_bridge_join(ds, info->port, info->br);
102 info->port, info->br);
116 ds->ops->port_bridge_leave(ds, info->port, info->br);
121 info->sw_index, info->port,
128 * (not per port). When that happens, the correct moment to trigger the
129 * vlan_filtering callback is only when the last port left this bridge.
133 if (i == info->port)
145 err = dsa_port_vlan_filtering(dsa_to_port(ds, info->port),
151 err = dsa_port_vlan_filtering(dsa_to_port(ds, info->port),
162 int port = dsa_towards_port(ds, info->sw_index, info->port);
167 return ds->ops->port_fdb_add(ds, port, info->addr, info->vid);
173 int port = dsa_towards_port(ds, info->sw_index, info->port);
178 return ds->ops->port_fdb_del(ds, port, info->addr, info->vid);
181 static bool dsa_switch_mdb_match(struct dsa_switch *ds, int port,
184 if (ds->index == info->sw_index && port == info->port)
187 if (dsa_is_dsa_port(ds, port))
196 int port, err;
201 for (port = 0; port < ds->num_ports; port++) {
202 if (dsa_switch_mdb_match(ds, port, info)) {
203 err = ds->ops->port_mdb_prepare(ds, port, info->mdb);
215 int port;
223 for (port = 0; port < ds->num_ports; port++)
224 if (dsa_switch_mdb_match(ds, port, info))
225 ds->ops->port_mdb_add(ds, port, info->mdb);
237 return ds->ops->port_mdb_del(ds, info->port, info->mdb);
242 static bool dsa_switch_vlan_match(struct dsa_switch *ds, int port,
245 if (ds->index == info->sw_index && port == info->port)
248 if (dsa_is_dsa_port(ds, port))
257 int port, err;
262 for (port = 0; port < ds->num_ports; port++) {
263 if (dsa_switch_vlan_match(ds, port, info)) {
264 err = ds->ops->port_vlan_prepare(ds, port, info->vlan);
276 int port;
284 for (port = 0; port < ds->num_ports; port++)
285 if (dsa_switch_vlan_match(ds, port, info))
286 ds->ops->port_vlan_add(ds, port, info->vlan);
298 return ds->ops->port_vlan_del(ds, info->port, info->vlan);