Commit 7ee776cd authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'net-dsa-mv88e6xxx-mst-fixes'

Tobias Waldekranz says:

====================
net: dsa: mv88e6xxx: MST Fixes

1/2 fixes the issue reported by Marek here:

https://lore.kernel.org/netdev/20220318182817.5ade8ecd@dellmb/

2/2 adds a missing capability check to the new .vlan_msti_set
callback.
====================

Link: https://lore.kernel.org/r/20220318201321.4010543-1-tobias@waldekranz.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents e0c0ca35 bd48b911
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2678,6 +2678,9 @@ static int mv88e6xxx_vlan_msti_set(struct dsa_switch *ds,
	u8 old_sid, new_sid;
	int err;

	if (!mv88e6xxx_has_stu(chip))
		return -EOPNOTSUPP;

	mv88e6xxx_reg_lock(chip);

	err = mv88e6xxx_vtu_get(chip, msti->vid, &vlan);
+3 −1
Original line number Diff line number Diff line
@@ -730,7 +730,9 @@ struct mv88e6xxx_hw_stat {

static inline bool mv88e6xxx_has_stu(struct mv88e6xxx_chip *chip)
{
	return chip->info->max_sid > 0;
	return chip->info->max_sid > 0 &&
		chip->info->ops->stu_loadpurge &&
		chip->info->ops->stu_getnext;
}

static inline bool mv88e6xxx_has_pvt(struct mv88e6xxx_chip *chip)