diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-11-10 15:22:52 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-13 10:34:54 +0900 |
commit | 5ed4e3eb021762fee584ce65620bc822131c7aa0 (patch) | |
tree | 5f3ed5e21d4dfaacb13beec852583aa4ab64f268 /net/dsa | |
parent | ee9d3429c0e47a57e3e73b638785cafa33773639 (diff) | |
download | linux-stable-5ed4e3eb021762fee584ce65620bc822131c7aa0.tar.gz linux-stable-5ed4e3eb021762fee584ce65620bc822131c7aa0.tar.bz2 linux-stable-5ed4e3eb021762fee584ce65620bc822131c7aa0.zip |
net: dsa: Pass a port to get_tag_protocol()
A number of drivers want to check whether the configured CPU port is a
possible configuration for enabling tagging, pass down the CPU port
number so they verify that.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/dsa2.c | 2 | ||||
-rw-r--r-- | net/dsa/legacy.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index fd54a8e17986..44e3fb7dec8c 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -539,7 +539,7 @@ static int dsa_port_parse_cpu(struct dsa_port *dp, struct net_device *master) const struct dsa_device_ops *tag_ops; enum dsa_tag_protocol tag_protocol; - tag_protocol = ds->ops->get_tag_protocol(ds); + tag_protocol = ds->ops->get_tag_protocol(ds, dp->index); tag_ops = dsa_resolve_tag_protocol(tag_protocol); if (IS_ERR(tag_ops)) { dev_warn(ds->dev, "No tagger for this switch\n"); diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c index 4863e3e398b6..84611d7fcfa2 100644 --- a/net/dsa/legacy.c +++ b/net/dsa/legacy.c @@ -151,7 +151,7 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, const struct dsa_device_ops *tag_ops; enum dsa_tag_protocol tag_protocol; - tag_protocol = ops->get_tag_protocol(ds); + tag_protocol = ops->get_tag_protocol(ds, dst->cpu_dp->index); tag_ops = dsa_resolve_tag_protocol(tag_protocol); if (IS_ERR(tag_ops)) return PTR_ERR(tag_ops); |