diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-01-17 20:41:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-18 16:49:47 -0500 |
commit | 9520ed8fb8410dcb6babf751561a08f73ca03812 (patch) | |
tree | ee7e664f866902ca3befac6dc0294c755dfa3b2d /net/dsa/dsa.c | |
parent | b22de490869da354116ea4cbbaa09dcbc260b2b4 (diff) |
net: dsa: use cpu_switch instead of ds[0]
Now that the DSA Ethernet switches are true Linux devices, the CPU
switch is not necessarily the first one. If its address is higher than
the second switch on the same MDIO bus, its index will be 1, not 0.
Avoid any confusion by using dst->cpu_switch instead of dst->ds[0].
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r-- | net/dsa/dsa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index b220609cfe6f..91f96e1bd2ec 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -868,7 +868,7 @@ static void dsa_remove_dst(struct dsa_switch_tree *dst) dsa_switch_destroy(ds); } - dsa_cpu_port_ethtool_restore(dst->ds[0]); + dsa_cpu_port_ethtool_restore(dst->cpu_switch); dev_put(dst->master_netdev); } |