Commit 8a43379f authored by Philippe Reynes's avatar Philippe Reynes Committed by David S. Miller

net: ibm: ibmvnic: 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.
Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9ce8c2df
...@@ -1025,21 +1025,26 @@ static const struct net_device_ops ibmvnic_netdev_ops = { ...@@ -1025,21 +1025,26 @@ static const struct net_device_ops ibmvnic_netdev_ops = {
/* ethtool functions */ /* ethtool functions */
static int ibmvnic_get_settings(struct net_device *netdev, static int ibmvnic_get_link_ksettings(struct net_device *netdev,
struct ethtool_cmd *cmd) struct ethtool_link_ksettings *cmd)
{ {
cmd->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_Autoneg | u32 supported, advertising;
supported = (SUPPORTED_1000baseT_Full | SUPPORTED_Autoneg |
SUPPORTED_FIBRE); SUPPORTED_FIBRE);
cmd->advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg | advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg |
ADVERTISED_FIBRE); ADVERTISED_FIBRE);
ethtool_cmd_speed_set(cmd, SPEED_1000); cmd->base.speed = SPEED_1000;
cmd->duplex = DUPLEX_FULL; cmd->base.duplex = DUPLEX_FULL;
cmd->port = PORT_FIBRE; cmd->base.port = PORT_FIBRE;
cmd->phy_address = 0; cmd->base.phy_address = 0;
cmd->transceiver = XCVR_INTERNAL; cmd->base.autoneg = AUTONEG_ENABLE;
cmd->autoneg = AUTONEG_ENABLE;
cmd->maxtxpkt = 0; ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
cmd->maxrxpkt = 1; supported);
ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising,
advertising);
return 0; return 0;
} }
...@@ -1132,7 +1137,6 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev, ...@@ -1132,7 +1137,6 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev,
} }
static const struct ethtool_ops ibmvnic_ethtool_ops = { static const struct ethtool_ops ibmvnic_ethtool_ops = {
.get_settings = ibmvnic_get_settings,
.get_drvinfo = ibmvnic_get_drvinfo, .get_drvinfo = ibmvnic_get_drvinfo,
.get_msglevel = ibmvnic_get_msglevel, .get_msglevel = ibmvnic_get_msglevel,
.set_msglevel = ibmvnic_set_msglevel, .set_msglevel = ibmvnic_set_msglevel,
...@@ -1141,6 +1145,7 @@ static const struct ethtool_ops ibmvnic_ethtool_ops = { ...@@ -1141,6 +1145,7 @@ static const struct ethtool_ops ibmvnic_ethtool_ops = {
.get_strings = ibmvnic_get_strings, .get_strings = ibmvnic_get_strings,
.get_sset_count = ibmvnic_get_sset_count, .get_sset_count = ibmvnic_get_sset_count,
.get_ethtool_stats = ibmvnic_get_ethtool_stats, .get_ethtool_stats = ibmvnic_get_ethtool_stats,
.get_link_ksettings = ibmvnic_get_link_ksettings,
}; };
/* Routines for managing CRQs/sCRQs */ /* Routines for managing CRQs/sCRQs */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment