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

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: Philippe Reynes <tremyfr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Philippe Reynes and committed by
Greg Kroah-Hartman
f7417a55 d2337a50

+8 -6
+8 -6
drivers/staging/netlogic/xlr_net.c
··· 172 172 /* 173 173 * Ethtool operation 174 174 */ 175 - static int xlr_get_settings(struct net_device *ndev, struct ethtool_cmd *ecmd) 175 + static int xlr_get_link_ksettings(struct net_device *ndev, 176 + struct ethtool_link_ksettings *ecmd) 176 177 { 177 178 struct xlr_net_priv *priv = netdev_priv(ndev); 178 179 struct phy_device *phydev = xlr_get_phydev(priv); 179 180 180 181 if (!phydev) 181 182 return -ENODEV; 182 - return phy_ethtool_gset(phydev, ecmd); 183 + return phy_ethtool_ksettings_get(phydev, ecmd); 183 184 } 184 185 185 - static int xlr_set_settings(struct net_device *ndev, struct ethtool_cmd *ecmd) 186 + static int xlr_set_link_ksettings(struct net_device *ndev, 187 + const struct ethtool_link_ksettings *ecmd) 186 188 { 187 189 struct xlr_net_priv *priv = netdev_priv(ndev); 188 190 struct phy_device *phydev = xlr_get_phydev(priv); 189 191 190 192 if (!phydev) 191 193 return -ENODEV; 192 - return phy_ethtool_sset(phydev, ecmd); 194 + return phy_ethtool_ksettings_set(phydev, ecmd); 193 195 } 194 196 195 197 static const struct ethtool_ops xlr_ethtool_ops = { 196 - .get_settings = xlr_get_settings, 197 - .set_settings = xlr_set_settings, 198 + .get_link_ksettings = xlr_get_link_ksettings, 199 + .set_link_ksettings = xlr_set_link_ksettings, 198 200 }; 199 201 200 202 /*