mutex_unlock(&priv->reg_mutex);
}
+static int rtldsa_port_mst_state_set(struct dsa_switch *ds, int port,
+ const struct switchdev_mst_state *st)
+{
+ struct rtl838x_switch_priv *priv = ds->priv;
+
+ mutex_lock(&priv->reg_mutex);
+ rtldsa_port_xstp_state_set(priv, port, st->state, st->msti);
+ mutex_unlock(&priv->reg_mutex);
+
+ return 0;
+}
+
static int rtl83xx_vlan_filtering(struct dsa_switch *ds, int port,
bool vlan_filtering,
struct netlink_ext_ack *extack)
return ret;
}
+static int rtldsa_vlan_msti_set(struct dsa_switch *ds, struct dsa_bridge bridge,
+ const struct switchdev_vlan_msti *msti)
+{
+ struct rtl838x_switch_priv *priv = ds->priv;
+ struct rtl838x_vlan_info info;
+ int mst_slot = msti->msti;
+
+ if (mst_slot >= priv->n_mst)
+ return -EINVAL;
+
+ priv->r->vlan_tables_read(msti->vid, &info);
+ info.fid = mst_slot;
+ priv->r->vlan_set_tagged(msti->vid, &info);
+
+ return 0;
+}
+
static void rtl83xx_setup_l2_uc_entry(struct rtl838x_l2_entry *e, int port, int vid, u64 mac)
{
memset(e, 0, sizeof(*e));
.port_bridge_leave = rtldsa_port_bridge_leave,
.port_stp_state_set = rtl83xx_port_stp_state_set,
.port_fast_age = rtl83xx_fast_age,
+ .port_mst_state_set = rtldsa_port_mst_state_set,
.port_vlan_filtering = rtl83xx_vlan_filtering,
.port_vlan_add = rtl83xx_vlan_add,
.port_vlan_del = rtl83xx_vlan_del,
+ .vlan_msti_set = rtldsa_vlan_msti_set,
.port_fdb_add = rtl83xx_port_fdb_add,
.port_fdb_del = rtl83xx_port_fdb_del,
.port_bridge_leave = rtldsa_port_bridge_leave,
.port_stp_state_set = rtl83xx_port_stp_state_set,
.port_fast_age = rtl930x_fast_age,
+ .port_mst_state_set = rtldsa_port_mst_state_set,
.port_vlan_filtering = rtl83xx_vlan_filtering,
.port_vlan_add = rtl83xx_vlan_add,
.port_vlan_del = rtl83xx_vlan_del,
.port_vlan_fast_age = rtldsa_port_vlan_fast_age,
+ .vlan_msti_set = rtldsa_vlan_msti_set,
.port_fdb_add = rtl83xx_port_fdb_add,
.port_fdb_del = rtl83xx_port_fdb_del,