Lines Matching refs:ds

74 	struct dsa_switch *ds;
94 return DSA_8021Q_RSV | DSA_8021Q_SWITCH_ID(dp->ds->index) |
145 struct dsa_8021q_context *ctx = dp->ds->tag_8021q_ctx;
146 struct dsa_switch *ds = dp->ds;
153 return ds->ops->tag_8021q_vlan_add(ds, port, vid, flags);
165 err = ds->ops->tag_8021q_vlan_add(ds, port, vid, flags);
181 struct dsa_8021q_context *ctx = dp->ds->tag_8021q_ctx;
182 struct dsa_switch *ds = dp->ds;
189 return ds->ops->tag_8021q_vlan_del(ds, port, vid);
198 err = ds->ops->tag_8021q_vlan_del(ds, port, vid);
217 int dsa_switch_tag_8021q_vlan_add(struct dsa_switch *ds,
228 if (!ds->ops->tag_8021q_vlan_add || !ds->tag_8021q_ctx)
231 dsa_switch_for_each_port(dp, ds) {
249 int dsa_switch_tag_8021q_vlan_del(struct dsa_switch *ds,
255 if (!ds->ops->tag_8021q_vlan_del || !ds->tag_8021q_ctx)
258 dsa_switch_for_each_port(dp, ds) {
288 int dsa_tag_8021q_bridge_join(struct dsa_switch *ds, int port,
291 struct dsa_port *dp = dsa_to_port(ds, port);
311 void dsa_tag_8021q_bridge_leave(struct dsa_switch *ds, int port,
314 struct dsa_port *dp = dsa_to_port(ds, port);
326 dev_err(ds->dev,
336 static int dsa_tag_8021q_port_setup(struct dsa_switch *ds, int port)
338 struct dsa_8021q_context *ctx = ds->tag_8021q_ctx;
339 struct dsa_port *dp = dsa_to_port(ds, port);
354 dev_err(ds->dev,
366 static void dsa_tag_8021q_port_teardown(struct dsa_switch *ds, int port)
368 struct dsa_8021q_context *ctx = ds->tag_8021q_ctx;
369 struct dsa_port *dp = dsa_to_port(ds, port);
386 static int dsa_tag_8021q_setup(struct dsa_switch *ds)
392 for (port = 0; port < ds->num_ports; port++) {
393 err = dsa_tag_8021q_port_setup(ds, port);
395 dev_err(ds->dev,
405 static void dsa_tag_8021q_teardown(struct dsa_switch *ds)
411 for (port = 0; port < ds->num_ports; port++)
412 dsa_tag_8021q_port_teardown(ds, port);
415 int dsa_tag_8021q_register(struct dsa_switch *ds, __be16 proto)
425 ctx->ds = ds;
429 ds->tag_8021q_ctx = ctx;
431 err = dsa_tag_8021q_setup(ds);
443 void dsa_tag_8021q_unregister(struct dsa_switch *ds)
445 struct dsa_8021q_context *ctx = ds->tag_8021q_ctx;
448 dsa_tag_8021q_teardown(ds);
455 ds->tag_8021q_ctx = NULL;