Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7417a55 authored by Philippe Reynes's avatar Philippe Reynes Committed by Greg Kroah-Hartman
Browse files

staging: net: netlogic: 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 avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d2337a50
Loading
Loading
Loading
Loading
+8 −6
Original line number Original line Diff line number Diff line
@@ -172,29 +172,31 @@ static struct phy_device *xlr_get_phydev(struct xlr_net_priv *priv)
/*
/*
 * Ethtool operation
 * Ethtool operation
 */
 */
static int xlr_get_settings(struct net_device *ndev, struct ethtool_cmd *ecmd)
static int xlr_get_link_ksettings(struct net_device *ndev,
				  struct ethtool_link_ksettings *ecmd)
{
{
	struct xlr_net_priv *priv = netdev_priv(ndev);
	struct xlr_net_priv *priv = netdev_priv(ndev);
	struct phy_device *phydev = xlr_get_phydev(priv);
	struct phy_device *phydev = xlr_get_phydev(priv);


	if (!phydev)
	if (!phydev)
		return -ENODEV;
		return -ENODEV;
	return phy_ethtool_gset(phydev, ecmd);
	return phy_ethtool_ksettings_get(phydev, ecmd);
}
}


static int xlr_set_settings(struct net_device *ndev, struct ethtool_cmd *ecmd)
static int xlr_set_link_ksettings(struct net_device *ndev,
				  const struct ethtool_link_ksettings *ecmd)
{
{
	struct xlr_net_priv *priv = netdev_priv(ndev);
	struct xlr_net_priv *priv = netdev_priv(ndev);
	struct phy_device *phydev = xlr_get_phydev(priv);
	struct phy_device *phydev = xlr_get_phydev(priv);


	if (!phydev)
	if (!phydev)
		return -ENODEV;
		return -ENODEV;
	return phy_ethtool_sset(phydev, ecmd);
	return phy_ethtool_ksettings_set(phydev, ecmd);
}
}


static const struct ethtool_ops xlr_ethtool_ops = {
static const struct ethtool_ops xlr_ethtool_ops = {
	.get_settings = xlr_get_settings,
	.get_link_ksettings = xlr_get_link_ksettings,
	.set_settings = xlr_set_settings,
	.set_link_ksettings = xlr_set_link_ksettings,
};
};


/*
/*