summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/mv88e6xxx/chip.h
diff options
context:
space:
mode:
authorTobias Waldekranz <tobias@waldekranz.com>2020-11-10 19:57:20 +0100
committerJakub Kicinski <kuba@kernel.org>2020-11-11 18:04:23 -0800
commite545f86573937142b8a90bd65d476b9f001088cf (patch)
tree5f3a0903c38b5f108901edc3672bdf8c506b1f48 /drivers/net/dsa/mv88e6xxx/chip.h
parentca787e0b935cdb45db1715f724d859683c5de297 (diff)
net: dsa: mv88e6xxx: Add helper to get a chip's max_vid
Most of the other chip info constants have helpers to get at them; add one for max_vid to keep things consistent. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20201110185720.18228-1-tobias@waldekranz.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/chip.h')
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h
index fb5b262285ff..7faa61b7f8f8 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.h
+++ b/drivers/net/dsa/mv88e6xxx/chip.h
@@ -673,6 +673,11 @@ static inline unsigned int mv88e6xxx_num_ports(struct mv88e6xxx_chip *chip)
return chip->info->num_ports;
}
+static inline unsigned int mv88e6xxx_max_vid(struct mv88e6xxx_chip *chip)
+{
+ return chip->info->max_vid;
+}
+
static inline u16 mv88e6xxx_port_mask(struct mv88e6xxx_chip *chip)
{
return GENMASK((s32)mv88e6xxx_num_ports(chip) - 1, 0);