diff options
author | Philippe Reynes <tremyfr@gmail.com> | 2017-02-20 16:59:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-20 22:19:08 -0500 |
commit | 2cf8a897116a4433ca579aff8b0813d8fb2c4473 (patch) | |
tree | 481a1da7ebf5abeab36012e5e59573cf1909a066 /drivers/net/ethernet/qualcomm/qca_debug.c | |
parent | 836dacdd5b932f8ed8ca9f90e7b7e6751f478627 (diff) |
net: qualcomm: qca: use new api ethtool_{get|set}_link_ksettings
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if
someone may test this patch.
Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qualcomm/qca_debug.c')
-rw-r--r-- | drivers/net/ethernet/qualcomm/qca_debug.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/ethernet/qualcomm/qca_debug.c b/drivers/net/ethernet/qualcomm/qca_debug.c index 8e28234dddad..d145df98feff 100644 --- a/drivers/net/ethernet/qualcomm/qca_debug.c +++ b/drivers/net/ethernet/qualcomm/qca_debug.c | |||
@@ -188,14 +188,16 @@ qcaspi_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *p) | |||
188 | } | 188 | } |
189 | 189 | ||
190 | static int | 190 | static int |
191 | qcaspi_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | 191 | qcaspi_get_link_ksettings(struct net_device *dev, |
192 | struct ethtool_link_ksettings *cmd) | ||
192 | { | 193 | { |
193 | cmd->transceiver = XCVR_INTERNAL; | 194 | ethtool_link_ksettings_zero_link_mode(cmd, supported); |
194 | cmd->supported = SUPPORTED_10baseT_Half; | 195 | ethtool_link_ksettings_add_link_mode(cmd, supported, 10baseT_Half); |
195 | ethtool_cmd_speed_set(cmd, SPEED_10); | 196 | |
196 | cmd->duplex = DUPLEX_HALF; | 197 | cmd->base.speed = SPEED_10; |
197 | cmd->port = PORT_OTHER; | 198 | cmd->base.duplex = DUPLEX_HALF; |
198 | cmd->autoneg = AUTONEG_DISABLE; | 199 | cmd->base.port = PORT_OTHER; |
200 | cmd->base.autoneg = AUTONEG_DISABLE; | ||
199 | 201 | ||
200 | return 0; | 202 | return 0; |
201 | } | 203 | } |
@@ -295,7 +297,6 @@ qcaspi_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring) | |||
295 | static const struct ethtool_ops qcaspi_ethtool_ops = { | 297 | static const struct ethtool_ops qcaspi_ethtool_ops = { |
296 | .get_drvinfo = qcaspi_get_drvinfo, | 298 | .get_drvinfo = qcaspi_get_drvinfo, |
297 | .get_link = ethtool_op_get_link, | 299 | .get_link = ethtool_op_get_link, |
298 | .get_settings = qcaspi_get_settings, | ||
299 | .get_ethtool_stats = qcaspi_get_ethtool_stats, | 300 | .get_ethtool_stats = qcaspi_get_ethtool_stats, |
300 | .get_strings = qcaspi_get_strings, | 301 | .get_strings = qcaspi_get_strings, |
301 | .get_sset_count = qcaspi_get_sset_count, | 302 | .get_sset_count = qcaspi_get_sset_count, |
@@ -303,6 +304,7 @@ static const struct ethtool_ops qcaspi_ethtool_ops = { | |||
303 | .get_regs = qcaspi_get_regs, | 304 | .get_regs = qcaspi_get_regs, |
304 | .get_ringparam = qcaspi_get_ringparam, | 305 | .get_ringparam = qcaspi_get_ringparam, |
305 | .set_ringparam = qcaspi_set_ringparam, | 306 | .set_ringparam = qcaspi_set_ringparam, |
307 | .get_link_ksettings = qcaspi_get_link_ksettings, | ||
306 | }; | 308 | }; |
307 | 309 | ||
308 | void qcaspi_set_ethtool_ops(struct net_device *dev) | 310 | void qcaspi_set_ethtool_ops(struct net_device *dev) |