[PATCH net-next 4/4] net: stmmac: Move MAC caps init to phylink MAC caps getter

Romain Gantois romain.gantois at bootlin.com
Tue Apr 16 00:56:32 PDT 2024


Hi Serge,

On Fri, 12 Apr 2024, Serge Semin wrote:

> +static unsigned long stmmac_mac_get_caps(struct phylink_config *config,
> +					 phy_interface_t interface)
> +{
> +	struct stmmac_priv *priv = netdev_priv(to_net_dev(config->dev));
> +
> +	/* Get the MAC-specific capabilities */
> +	stmmac_mac_phylink_get_caps(priv);

This is a bit of a nitpick, but the terminology is quite confusing between 
stmmac_mac_phylink_get_caps() and stmmac_mac_get_caps(). Ideally, we could just 
get rid of the whole stmmac_do_void_callback() complexity and just call 
phylink_get_caps() directly. In the meantime, maybe renaming this to 
stmmac_mac_core_get_caps() would be acceptable?

Please let me know what you think.

Thanks,

-- 
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the linux-arm-kernel mailing list