Skip to content

Commit

Permalink
net: dsa: mv88e6xxx: Ensure STU support in VLAN MSTI callback
Browse files Browse the repository at this point in the history
In the same way that we check for STU support in the MST state
callback, we should also verify it before trying to change a VLANs
MSTI membership.

Fixes: acaf4d2 ("net: dsa: mv88e6xxx: MST Offloading")
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Tobias Waldekranz authored and Jakub Kicinski committed Mar 21, 2022
1 parent afaed2b commit bd48b91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/dsa/mv88e6xxx/chip.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit bd48b91

Please sign in to comment.