summaryrefslogtreecommitdiff
path: root/net/dsa/dsa2.c
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2017-09-19 11:57:00 -0400
committerDavid S. Miller <davem@davemloft.net>2017-09-19 16:04:23 -0700
commitf2f2356685bcaf1063859356fc65a5ac808b1382 (patch)
tree1186ff809f74031be7a52681aa0cb9f2be03221f /net/dsa/dsa2.c
parent1943563dfd4b3a1f9dc102f056813112d29bb60f (diff)
net: dsa: move master ethtool code
DSA overrides the master device ethtool ops, so that it can inject stats from its dedicated switch CPU port as well. The related code is currently split in dsa.c and slave.c, but it only scopes the master net device. Move it to a new master.c DSA core file. This file will be later extented with master net device specific code. 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 'net/dsa/dsa2.c')
-rw-r--r--net/dsa/dsa2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 032f8bc3e788..dcccaebde708 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -440,7 +440,7 @@ static int dsa_dst_apply(struct dsa_switch_tree *dst)
wmb();
dst->cpu_dp->netdev->dsa_ptr = dst;
- err = dsa_cpu_port_ethtool_setup(dst->cpu_dp);
+ err = dsa_master_ethtool_setup(dst->cpu_dp->netdev);
if (err)
return err;
@@ -457,7 +457,7 @@ static void dsa_dst_unapply(struct dsa_switch_tree *dst)
if (!dst->applied)
return;
- dsa_cpu_port_ethtool_restore(dst->cpu_dp);
+ dsa_master_ethtool_restore(dst->cpu_dp->netdev);
dst->cpu_dp->netdev->dsa_ptr = NULL;