Commit 9c8c4402 authored by Russell King (Oracle)'s avatar Russell King (Oracle) Committed by David S. Miller

net: sparx5: use .mac_select_pcs() interface

Convert sparx5 to use the mac_select_interface rather than using
phylink_set_pcs(). The intention here is to unify the approach for
PCS and eventually remove phylink_set_pcs().
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e7d78633
...@@ -328,7 +328,6 @@ static int sparx5_create_port(struct sparx5 *sparx5, ...@@ -328,7 +328,6 @@ static int sparx5_create_port(struct sparx5 *sparx5,
return PTR_ERR(phylink); return PTR_ERR(phylink);
spx5_port->phylink = phylink; spx5_port->phylink = phylink;
phylink_set_pcs(phylink, &spx5_port->phylink_pcs);
return 0; return 0;
} }
......
...@@ -26,6 +26,15 @@ static bool port_conf_has_changed(struct sparx5_port_config *a, struct sparx5_po ...@@ -26,6 +26,15 @@ static bool port_conf_has_changed(struct sparx5_port_config *a, struct sparx5_po
return false; return false;
} }
static struct phylink_pcs *
sparx5_phylink_mac_select_pcs(struct phylink_config *config,
phy_interface_t interface)
{
struct sparx5_port *port = netdev_priv(to_net_dev(config->dev));
return &port->phylink_pcs;
}
static void sparx5_phylink_mac_config(struct phylink_config *config, static void sparx5_phylink_mac_config(struct phylink_config *config,
unsigned int mode, unsigned int mode,
const struct phylink_link_state *state) const struct phylink_link_state *state)
...@@ -130,6 +139,7 @@ const struct phylink_pcs_ops sparx5_phylink_pcs_ops = { ...@@ -130,6 +139,7 @@ const struct phylink_pcs_ops sparx5_phylink_pcs_ops = {
const struct phylink_mac_ops sparx5_phylink_mac_ops = { const struct phylink_mac_ops sparx5_phylink_mac_ops = {
.validate = phylink_generic_validate, .validate = phylink_generic_validate,
.mac_select_pcs = sparx5_phylink_mac_select_pcs,
.mac_config = sparx5_phylink_mac_config, .mac_config = sparx5_phylink_mac_config,
.mac_link_down = sparx5_phylink_mac_link_down, .mac_link_down = sparx5_phylink_mac_link_down,
.mac_link_up = sparx5_phylink_mac_link_up, .mac_link_up = sparx5_phylink_mac_link_up,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment