diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-06-13 13:27:20 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-13 16:35:02 -0400 |
commit | 67dbb9d433447e358de7d293f15318bb5db9529b (patch) | |
tree | 74f40b003da2d762e06b897ee819a2070933592d /net/dsa/slave.c | |
parent | 6d3c8c0dd88a5ffc7e3695997641e4b6d4c11065 (diff) | |
download | blackbird-obmc-linux-67dbb9d433447e358de7d293f15318bb5db9529b.tar.gz blackbird-obmc-linux-67dbb9d433447e358de7d293f15318bb5db9529b.zip |
net: dsa: Relocate master ethtool operations
Relocate master_ethtool_ops and master_orig_ethtool_ops into struct
dsa_port in order to be both consistent, and make things self contained
within the dsa_port structure.
This is a preliminary change to supporting multiple CPU port interfaces.
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r-- | net/dsa/slave.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 658bc67c5320..9bf4c27f3393 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -524,10 +524,10 @@ static void dsa_cpu_port_get_ethtool_stats(struct net_device *dev, s8 cpu_port = dst->cpu_dp->index; int count = 0; - if (dst->master_ethtool_ops.get_sset_count) { - count = dst->master_ethtool_ops.get_sset_count(dev, + if (dst->cpu_dp->ethtool_ops.get_sset_count) { + count = dst->cpu_dp->ethtool_ops.get_sset_count(dev, ETH_SS_STATS); - dst->master_ethtool_ops.get_ethtool_stats(dev, stats, data); + dst->cpu_dp->ethtool_ops.get_ethtool_stats(dev, stats, data); } if (ds->ops->get_ethtool_stats) @@ -540,8 +540,8 @@ static int dsa_cpu_port_get_sset_count(struct net_device *dev, int sset) struct dsa_switch *ds = dst->cpu_dp->ds; int count = 0; - if (dst->master_ethtool_ops.get_sset_count) - count += dst->master_ethtool_ops.get_sset_count(dev, sset); + if (dst->cpu_dp->ethtool_ops.get_sset_count) + count += dst->cpu_dp->ethtool_ops.get_sset_count(dev, sset); if (sset == ETH_SS_STATS && ds->ops->get_sset_count) count += ds->ops->get_sset_count(ds); @@ -565,10 +565,10 @@ static void dsa_cpu_port_get_strings(struct net_device *dev, /* We do not want to be NULL-terminated, since this is a prefix */ pfx[sizeof(pfx) - 1] = '_'; - if (dst->master_ethtool_ops.get_sset_count) { - mcount = dst->master_ethtool_ops.get_sset_count(dev, + if (dst->cpu_dp->ethtool_ops.get_sset_count) { + mcount = dst->cpu_dp->ethtool_ops.get_sset_count(dev, ETH_SS_STATS); - dst->master_ethtool_ops.get_strings(dev, stringset, data); + dst->cpu_dp->ethtool_ops.get_strings(dev, stringset, data); } if (stringset == ETH_SS_STATS && ds->ops->get_strings) { |