summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/qca8k.c
diff options
context:
space:
mode:
authorVivien Didelot2017-09-20 18:28:05 +0200
committerDavid S. Miller2017-09-22 00:15:58 +0200
commit0abfd494deefdbab66ac03c1181a614285e7d90c (patch)
tree303df476c86a75a7b3d7a162a681039a97014c8c /drivers/net/dsa/qca8k.c
parentnet: avoid a full fib lookup when rp_filter is disabled. (diff)
downloadkernel-qcow2-linux-0abfd494deefdbab66ac03c1181a614285e7d90c.tar.gz
kernel-qcow2-linux-0abfd494deefdbab66ac03c1181a614285e7d90c.tar.xz
kernel-qcow2-linux-0abfd494deefdbab66ac03c1181a614285e7d90c.zip
net: dsa: use dedicated CPU port
Each port in DSA has its own dedicated CPU port currently available in its parent switch's ds->ports[port].cpu_dp. Use it instead of getting the unique tree CPU port, which will be deprecated soon. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/qca8k.c')
-rw-r--r--drivers/net/dsa/qca8k.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 5ada7a41449c..82f09711ac1a 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -506,7 +506,7 @@ qca8k_setup(struct dsa_switch *ds)
pr_warn("regmap initialization failed");
/* Initialize CPU port pad mode (xMII type, delays...) */
- phy_mode = of_get_phy_mode(ds->dst->cpu_dp->dn);
+ phy_mode = of_get_phy_mode(ds->ports[QCA8K_CPU_PORT].dn);
if (phy_mode < 0) {
pr_err("Can't find phy-mode for master device\n");
return phy_mode;