Skip to content

Commit 41414c9

Browse files
HoratiuVulturkuba-moo
authored andcommitted
net: lan966x: use .mac_select_pcs() interface
Convert lan966x to use the mac_select_interface instead of phylink_set_pcs. Signed-off-by: Horatiu Vultur <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 95eb6ef commit 41414c9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

drivers/net/ethernet/microchip/lan966x/lan966x_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,6 @@ static int lan966x_probe_port(struct lan966x *lan966x, u32 p,
688688
}
689689

690690
port->phylink = phylink;
691-
phylink_set_pcs(phylink, &port->phylink_pcs);
692691

693692
err = register_netdev(dev);
694693
if (err) {

drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99

1010
#include "lan966x_main.h"
1111

12+
static struct phylink_pcs *lan966x_phylink_mac_select(struct phylink_config *config,
13+
phy_interface_t interface)
14+
{
15+
struct lan966x_port *port = netdev_priv(to_net_dev(config->dev));
16+
17+
return &port->phylink_pcs;
18+
}
19+
1220
static void lan966x_phylink_mac_config(struct phylink_config *config,
1321
unsigned int mode,
1422
const struct phylink_link_state *state)
@@ -114,6 +122,7 @@ static void lan966x_pcs_aneg_restart(struct phylink_pcs *pcs)
114122

115123
const struct phylink_mac_ops lan966x_phylink_mac_ops = {
116124
.validate = phylink_generic_validate,
125+
.mac_select_pcs = lan966x_phylink_mac_select,
117126
.mac_config = lan966x_phylink_mac_config,
118127
.mac_prepare = lan966x_phylink_mac_prepare,
119128
.mac_link_down = lan966x_phylink_mac_link_down,

0 commit comments

Comments
 (0)