diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-01-15 14:08:28 +0000 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-01-18 10:17:27 +0000 |
commit | 39c712c555626b68c7fef895b8d2dda48a203046 (patch) | |
tree | 833eda591584fbece49a2894670547665e54d269 | |
parent | 32f0035cace2d21b72177f99ed95033fe4ee7ca4 (diff) |
net: phylink: remove phylink_set_pcs()
As phylink_set_pcs() is now unused, remove this function.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-rw-r--r-- | drivers/net/phy/phylink.c | 42 | ||||
-rw-r--r-- | include/linux/phylink.h | 1 |
2 files changed, 0 insertions, 43 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index c586b5e71899..8099c8ead706 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -1337,48 +1337,6 @@ struct phylink *phylink_create(struct phylink_config *config, EXPORT_SYMBOL_GPL(phylink_create); /** - * phylink_set_pcs() - set the current PCS for phylink to use - * @pl: a pointer to a &struct phylink returned from phylink_create() - * @pcs: a pointer to the &struct phylink_pcs - * - * Bind the MAC PCS to phylink. This may be called after phylink_create(). - * If it is desired to dynamically change the PCS, then the preferred method - * is to use mac_select_pcs(), but it may also be called in mac_prepare() - * or mac_config(). - * - * Please note that there are behavioural changes with the mac_config() - * callback if a PCS is present (denoting a newer setup) so removing a PCS - * is not supported, and if a PCS is going to be used, it must be registered - * by calling phylink_set_pcs() at the latest in the first mac_config() call. - */ -void phylink_set_pcs(struct phylink *pl, struct phylink_pcs *pcs) -{ - if (!pl->phylink_disable_state) - phylink_pcs_poll_stop(pl); - - if (pl->pcs != pcs) { - /* The PCS has changed */ - if (!pl->phylink_disable_state) { - /* Phylink is currently running. Disable the old PCS - * and enable the new PCS. - */ - phylink_pcs_disable(pl->pcs); - WARN_ON(phylink_pcs_enable(pcs)); - } else { - /* Phylink is currently stopped, disable the new PCS */ - phylink_pcs_disable(pcs); - } - } - - pl->pcs = pcs; - pl->pcs_ops = pcs->ops; - - if (!pl->phylink_disable_state) - phylink_pcs_poll_start(pl); -} -EXPORT_SYMBOL_GPL(phylink_set_pcs); - -/** * phylink_destroy() - cleanup and destroy the phylink instance * @pl: a pointer to a &struct phylink returned from phylink_create() * diff --git a/include/linux/phylink.h b/include/linux/phylink.h index 4075a11bbaa4..7221a7f6c573 100644 --- a/include/linux/phylink.h +++ b/include/linux/phylink.h @@ -596,7 +596,6 @@ void phylink_generic_validate(struct phylink_config *config, struct phylink *phylink_create(struct phylink_config *, struct fwnode_handle *, phy_interface_t iface, const struct phylink_mac_ops *mac_ops); -void phylink_set_pcs(struct phylink *, struct phylink_pcs *pcs); void phylink_destroy(struct phylink *); int phylink_connect_phy(struct phylink *, struct phy_device *); |