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: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
7ee776cdc7
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user