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: 6ec9753005af ("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>
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);