diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-05-24 16:14:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-24 13:59:03 -0700 |
commit | 82760d7f2ea63829d6ab0f3de7ec98b93132c8ee (patch) | |
tree | d4d0f0b1bd7367a2cb804c98344b5081b029ba46 /drivers/net/dsa/sja1105/sja1105_vl.c | |
parent | f238fef1b3de2fac2d09d925ebc75aacf5e27fd1 (diff) |
net: dsa: sja1105: dimension the data structures for a larger port count
Introduce a SJA1105_MAX_NUM_PORTS macro which at the moment is equal to
SJA1105_NUM_PORTS (5). With the introduction of SJA1110, these
structures will need to hold information for up to 11 ports.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105_vl.c')
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105_vl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_vl.c b/drivers/net/dsa/sja1105/sja1105_vl.c index ffc4042b4502..f6e13e6c6a18 100644 --- a/drivers/net/dsa/sja1105/sja1105_vl.c +++ b/drivers/net/dsa/sja1105/sja1105_vl.c @@ -386,7 +386,7 @@ static int sja1105_init_virtual_links(struct sja1105_private *priv, if (rule->type != SJA1105_RULE_VL) continue; - for_each_set_bit(port, &rule->port_mask, SJA1105_NUM_PORTS) { + for_each_set_bit(port, &rule->port_mask, SJA1105_MAX_NUM_PORTS) { vl_lookup[k].format = SJA1105_VL_FORMAT_PSFP; vl_lookup[k].port = port; vl_lookup[k].macaddr = rule->key.vl.dmac; |