Commit 99bff5ee authored by Philippe Reynes's avatar Philippe Reynes Committed by David S. Miller

net: davicom: dm9000: 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 93dfe6c2
...@@ -570,19 +570,21 @@ static void dm9000_set_msglevel(struct net_device *dev, u32 value) ...@@ -570,19 +570,21 @@ static void dm9000_set_msglevel(struct net_device *dev, u32 value)
dm->msg_enable = value; dm->msg_enable = value;
} }
static int dm9000_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) static int dm9000_get_link_ksettings(struct net_device *dev,
struct ethtool_link_ksettings *cmd)
{ {
struct board_info *dm = to_dm9000_board(dev); struct board_info *dm = to_dm9000_board(dev);
mii_ethtool_gset(&dm->mii, cmd); mii_ethtool_get_link_ksettings(&dm->mii, cmd);
return 0; return 0;
} }
static int dm9000_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) static int dm9000_set_link_ksettings(struct net_device *dev,
const struct ethtool_link_ksettings *cmd)
{ {
struct board_info *dm = to_dm9000_board(dev); struct board_info *dm = to_dm9000_board(dev);
return mii_ethtool_sset(&dm->mii, cmd); return mii_ethtool_set_link_ksettings(&dm->mii, cmd);
} }
static int dm9000_nway_reset(struct net_device *dev) static int dm9000_nway_reset(struct net_device *dev)
...@@ -741,8 +743,6 @@ static int dm9000_set_wol(struct net_device *dev, struct ethtool_wolinfo *w) ...@@ -741,8 +743,6 @@ static int dm9000_set_wol(struct net_device *dev, struct ethtool_wolinfo *w)
static const struct ethtool_ops dm9000_ethtool_ops = { static const struct ethtool_ops dm9000_ethtool_ops = {
.get_drvinfo = dm9000_get_drvinfo, .get_drvinfo = dm9000_get_drvinfo,
.get_settings = dm9000_get_settings,
.set_settings = dm9000_set_settings,
.get_msglevel = dm9000_get_msglevel, .get_msglevel = dm9000_get_msglevel,
.set_msglevel = dm9000_set_msglevel, .set_msglevel = dm9000_set_msglevel,
.nway_reset = dm9000_nway_reset, .nway_reset = dm9000_nway_reset,
...@@ -752,6 +752,8 @@ static const struct ethtool_ops dm9000_ethtool_ops = { ...@@ -752,6 +752,8 @@ static const struct ethtool_ops dm9000_ethtool_ops = {
.get_eeprom_len = dm9000_get_eeprom_len, .get_eeprom_len = dm9000_get_eeprom_len,
.get_eeprom = dm9000_get_eeprom, .get_eeprom = dm9000_get_eeprom,
.set_eeprom = dm9000_set_eeprom, .set_eeprom = dm9000_set_eeprom,
.get_link_ksettings = dm9000_get_link_ksettings,
.set_link_ksettings = dm9000_set_link_ksettings,
}; };
static void dm9000_show_carrier(struct board_info *db, static void dm9000_show_carrier(struct board_info *db,
......
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