diff options
Diffstat (limited to 'drivers/net/phy/phylink.c')
-rw-r--r-- | drivers/net/phy/phylink.c | 42 |
1 files changed, 0 insertions, 42 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() * |