Re: [PATCH net-next v5 05/11] net: ti: prueth: Adds ethtool support for ICSSM PRUETH Driver

Andrew Lunn
2025-04-14T13:34:26Z

> +static int icssm_emac_get_link_ksettings(struct net_device *ndev,
> + struct ethtool_link_ksettings *ecmd)
> +{
> + return phy_ethtool_get_link_ksettings(ndev, ecmd);
> +}
> +

> +static int
> +icssm_emac_set_link_ksettings(struct net_device *ndev,
> + const struct ethtool_link_ksettings *ecmd)
> +{
> + return phy_ethtool_set_link_ksettings(ndev, ecmd);
> +}

> +/* Ethtool support for EMAC adapter */
> +const struct ethtool_ops emac_ethtool_ops = {
> + .get_drvinfo = icssm_emac_get_drvinfo,
> + .get_link_ksettings = icssm_emac_get_link_ksettings,
> + .set_link_ksettings = icssm_emac_set_link_ksettings,

The wrappers don't do anything, so why not just use
phy_ethtool_get_link_ksettings() and phy_ethtool_set_link_ksettings()
directly?

Andrew