aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Waldekranz <[email protected]>2022-03-18 21:13:21 +0100
committerJakub Kicinski <[email protected]>2022-03-21 15:51:51 -0700
commitbd48b911c88f017a97b1943201d23d6962968d1a (patch)
tree6f366e3ad1cb35f2218f7527630b60591579fec1
parentafaed2b142a1ab896764b03d8d26dc8778ea887c (diff)
net: dsa: mv88e6xxx: Ensure STU support in VLAN MSTI callback
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: acaf4d2e36b3 ("net: dsa: mv88e6xxx: MST Offloading") Signed-off-by: Tobias Waldekranz <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Tested-by: Marek BehĂșn <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index b36393ba6d49..afb9417ffca0 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -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);