提交 9da12b64 编写于 作者: P Philippe Reynes 提交者: David S. Miller

net: faraday: ftmac100: 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: NPhilippe Reynes <tremyfr@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fd90095d
...@@ -825,16 +825,18 @@ static void ftmac100_get_drvinfo(struct net_device *netdev, ...@@ -825,16 +825,18 @@ static void ftmac100_get_drvinfo(struct net_device *netdev,
strlcpy(info->bus_info, dev_name(&netdev->dev), sizeof(info->bus_info)); strlcpy(info->bus_info, dev_name(&netdev->dev), sizeof(info->bus_info));
} }
static int ftmac100_get_settings(struct net_device *netdev, struct ethtool_cmd *cmd) static int ftmac100_get_link_ksettings(struct net_device *netdev,
struct ethtool_link_ksettings *cmd)
{ {
struct ftmac100 *priv = netdev_priv(netdev); struct ftmac100 *priv = netdev_priv(netdev);
return mii_ethtool_gset(&priv->mii, cmd); return mii_ethtool_get_link_ksettings(&priv->mii, cmd);
} }
static int ftmac100_set_settings(struct net_device *netdev, struct ethtool_cmd *cmd) static int ftmac100_set_link_ksettings(struct net_device *netdev,
const struct ethtool_link_ksettings *cmd)
{ {
struct ftmac100 *priv = netdev_priv(netdev); struct ftmac100 *priv = netdev_priv(netdev);
return mii_ethtool_sset(&priv->mii, cmd); return mii_ethtool_set_link_ksettings(&priv->mii, cmd);
} }
static int ftmac100_nway_reset(struct net_device *netdev) static int ftmac100_nway_reset(struct net_device *netdev)
...@@ -850,11 +852,11 @@ static u32 ftmac100_get_link(struct net_device *netdev) ...@@ -850,11 +852,11 @@ static u32 ftmac100_get_link(struct net_device *netdev)
} }
static const struct ethtool_ops ftmac100_ethtool_ops = { static const struct ethtool_ops ftmac100_ethtool_ops = {
.set_settings = ftmac100_set_settings,
.get_settings = ftmac100_get_settings,
.get_drvinfo = ftmac100_get_drvinfo, .get_drvinfo = ftmac100_get_drvinfo,
.nway_reset = ftmac100_nway_reset, .nway_reset = ftmac100_nway_reset,
.get_link = ftmac100_get_link, .get_link = ftmac100_get_link,
.get_link_ksettings = ftmac100_get_link_ksettings,
.set_link_ksettings = ftmac100_set_link_ksettings,
}; };
/****************************************************************************** /******************************************************************************
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册