• Vladimir Oltean's avatar
    net: pcs: xpcs: export xpcs_validate · a1a753ed
    Vladimir Oltean authored
    Calling a function pointer with a single implementation through
    struct mdio_xpcs_ops is clunky, and the stmmac_do_callback system forces
    this to return int, even though it always returns zero.
    
    Simply remove the "validate" function pointer from struct mdio_xpcs_ops
    and replace it with an exported xpcs_validate symbol which is called
    directly by stmmac.
    
    priv->hw->xpcs is of the type "const struct mdio_xpcs_ops *" and is used
    as a placeholder/synonym for priv->plat->mdio_bus_data->has_xpcs. It is
    done that way because the mdio_bus_data pointer might or might not be
    populated in all stmmac instantiations.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a1a753ed
stmmac_main.c 196 KB