[PATCH RFC net-next 6/7] net: stmmac: add helpers to indicate WoL enable status
Andrew Lunn
andrew at lunn.ch
Mon Jul 28 10:28:01 PDT 2025
> +static inline bool stmmac_wol_enabled_mac(struct stmmac_priv *priv)
> +{
> + return priv->plat->pmt && device_may_wakeup(priv->device);
> +}
> +
> +static inline bool stmmac_wol_enabled_phy(struct stmmac_priv *priv)
> +{
> + return !priv->plat->pmt && device_may_wakeup(priv->device);
> +}
I agree this is a direct translation into a helper.
Reviewed-by: Andrew Lunn <andrew at lunn.ch>
I'm guessing at some point you want to change these two
helpers. e.g. at some point, you want to try getting the PHY to do the
WoL, independent of !priv->plat->pmt?
> - if (device_may_wakeup(priv->device) && !priv->plat->pmt)
> + if (stmmac_wol_enabled_phy(priv))
> phylink_speed_down(priv->phylink, false);
This might be related to the next patch. But why only do speed down
when PHY is doing WoL? If the MAC is doing WoL, you could also do a
speed_down.
Andrew
More information about the linux-arm-kernel
mailing list