Skip to content

Commit

Permalink
net: bcmgenet: use new api ethtool_{get|set}_link_ksettings
Browse files Browse the repository at this point in the history
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.

Signed-off-by: Philippe Reynes <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Philippe Reynes authored and davem330 committed Sep 27, 2016
1 parent 0299b6a commit fa92bf0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions drivers/net/ethernet/broadcom/genet/bcmgenet.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,8 @@ static inline void bcmgenet_rdma_ring_writel(struct bcmgenet_priv *priv,
genet_dma_ring_regs[r]);
}

static int bcmgenet_get_settings(struct net_device *dev,
struct ethtool_cmd *cmd)
static int bcmgenet_get_link_ksettings(struct net_device *dev,
struct ethtool_link_ksettings *cmd)
{
struct bcmgenet_priv *priv = netdev_priv(dev);

Expand All @@ -461,11 +461,11 @@ static int bcmgenet_get_settings(struct net_device *dev,
if (!priv->phydev)
return -ENODEV;

return phy_ethtool_gset(priv->phydev, cmd);
return phy_ethtool_ksettings_get(priv->phydev, cmd);
}

static int bcmgenet_set_settings(struct net_device *dev,
struct ethtool_cmd *cmd)
static int bcmgenet_set_link_ksettings(struct net_device *dev,
const struct ethtool_link_ksettings *cmd)
{
struct bcmgenet_priv *priv = netdev_priv(dev);

Expand All @@ -475,7 +475,7 @@ static int bcmgenet_set_settings(struct net_device *dev,
if (!priv->phydev)
return -ENODEV;

return phy_ethtool_sset(priv->phydev, cmd);
return phy_ethtool_ksettings_set(priv->phydev, cmd);
}

static int bcmgenet_set_rx_csum(struct net_device *dev,
Expand Down Expand Up @@ -983,8 +983,6 @@ static const struct ethtool_ops bcmgenet_ethtool_ops = {
.get_strings = bcmgenet_get_strings,
.get_sset_count = bcmgenet_get_sset_count,
.get_ethtool_stats = bcmgenet_get_ethtool_stats,
.get_settings = bcmgenet_get_settings,
.set_settings = bcmgenet_set_settings,
.get_drvinfo = bcmgenet_get_drvinfo,
.get_link = ethtool_op_get_link,
.get_msglevel = bcmgenet_get_msglevel,
Expand All @@ -996,6 +994,8 @@ static const struct ethtool_ops bcmgenet_ethtool_ops = {
.nway_reset = bcmgenet_nway_reset,
.get_coalesce = bcmgenet_get_coalesce,
.set_coalesce = bcmgenet_set_coalesce,
.get_link_ksettings = bcmgenet_get_link_ksettings,
.set_link_ksettings = bcmgenet_set_link_ksettings,
};

/* Power down the unimac, based on mode. */
Expand Down

0 comments on commit fa92bf0

Please sign in to comment.