Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: fjes: 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>

authored by

Philippe Reynes and committed by
David S. Miller
031e5144 92f4a13e

+9 -10
+9 -10
drivers/net/fjes/fjes_ethtool.c
··· 175 175 "platform:%s", plat_dev->name); 176 176 } 177 177 178 - static int fjes_get_settings(struct net_device *netdev, 179 - struct ethtool_cmd *ecmd) 178 + static int fjes_get_link_ksettings(struct net_device *netdev, 179 + struct ethtool_link_ksettings *ecmd) 180 180 { 181 - ecmd->supported = 0; 182 - ecmd->advertising = 0; 183 - ecmd->duplex = DUPLEX_FULL; 184 - ecmd->autoneg = AUTONEG_DISABLE; 185 - ecmd->transceiver = XCVR_DUMMY1; 186 - ecmd->port = PORT_NONE; 187 - ethtool_cmd_speed_set(ecmd, 20000); /* 20Gb/s */ 181 + ethtool_link_ksettings_zero_link_mode(ecmd, supported); 182 + ethtool_link_ksettings_zero_link_mode(ecmd, advertising); 183 + ecmd->base.duplex = DUPLEX_FULL; 184 + ecmd->base.autoneg = AUTONEG_DISABLE; 185 + ecmd->base.port = PORT_NONE; 186 + ecmd->base.speed = 20000; /* 20Gb/s */ 188 187 189 188 return 0; 190 189 } ··· 295 296 } 296 297 297 298 static const struct ethtool_ops fjes_ethtool_ops = { 298 - .get_settings = fjes_get_settings, 299 299 .get_drvinfo = fjes_get_drvinfo, 300 300 .get_ethtool_stats = fjes_get_ethtool_stats, 301 301 .get_strings = fjes_get_strings, ··· 304 306 .set_dump = fjes_set_dump, 305 307 .get_dump_flag = fjes_get_dump_flag, 306 308 .get_dump_data = fjes_get_dump_data, 309 + .get_link_ksettings = fjes_get_link_ksettings, 307 310 }; 308 311 309 312 void fjes_set_ethtool_ops(struct net_device *netdev)