]> git.baikalelectronics.ru Git - kernel.git/commit
net: pcs: xpcs: export xpcs_config_eee
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 2 Jun 2021 16:20:15 +0000 (19:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Jun 2021 20:30:43 +0000 (13:30 -0700)
commit5d8eb4150f4b70c37b296fe4a044cb4d7657c49c
treee0914a6fff10083b4eb32937c12c9929dd3d9f60
parent88b5e3f8d9989282413be2ed6e3cce356f157ae1
net: pcs: xpcs: export xpcs_config_eee

There is no good reason why we need to go through:

stmmac_xpcs_config_eee
-> stmmac_do_callback
   -> mdio_xpcs_ops->config_eee
      -> xpcs_config_eee

when we can simply call xpcs_config_eee.

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: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/hwif.h
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
drivers/net/pcs/pcs-xpcs.c
include/linux/pcs/pcs-xpcs.h