diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-06-02 15:31:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-04 20:05:15 -0400 |
commit | 937c7df85ce7ce6b2319894f6ad3376f15dff186 (patch) | |
tree | c98f81eae0f9a8e42ff136eb81ba188dad586400 /net/dsa/dsa.c | |
parent | 1820dd0633b9972028e377ee76e5d40873491d25 (diff) |
net: dsa: Pass dsa_port reference to ethtool setup/restore
We do not need to have a reference to a dsa_switch, instead we should
pass a reference to a CPU dsa_port, change that. This is a preliminary
change to better support multiple CPU ports.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r-- | net/dsa/dsa.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 402459e73f33..fdc448b30e56 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c | |||
@@ -112,8 +112,9 @@ const struct dsa_device_ops *dsa_resolve_tag_protocol(int tag_protocol) | |||
112 | return ops; | 112 | return ops; |
113 | } | 113 | } |
114 | 114 | ||
115 | int dsa_cpu_port_ethtool_setup(struct dsa_switch *ds) | 115 | int dsa_cpu_port_ethtool_setup(struct dsa_port *cpu_dp) |
116 | { | 116 | { |
117 | struct dsa_switch *ds = cpu_dp->ds; | ||
117 | struct net_device *master; | 118 | struct net_device *master; |
118 | struct ethtool_ops *cpu_ops; | 119 | struct ethtool_ops *cpu_ops; |
119 | 120 | ||
@@ -136,8 +137,9 @@ int dsa_cpu_port_ethtool_setup(struct dsa_switch *ds) | |||
136 | return 0; | 137 | return 0; |
137 | } | 138 | } |
138 | 139 | ||
139 | void dsa_cpu_port_ethtool_restore(struct dsa_switch *ds) | 140 | void dsa_cpu_port_ethtool_restore(struct dsa_port *cpu_dp) |
140 | { | 141 | { |
142 | struct dsa_switch *ds = cpu_dp->ds; | ||
141 | struct net_device *master; | 143 | struct net_device *master; |
142 | 144 | ||
143 | master = ds->dst->master_netdev; | 145 | master = ds->dst->master_netdev; |