diff options
author | Ioana Ciornei <ioana.ciornei@nxp.com> | 2021-08-03 19:57:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-04 11:53:34 +0300 |
commit | 84cba72956fddf29ba666f885c39ed147024c125 (patch) | |
tree | 0e39b220cbfa95e7d31ad4e22d54eb2b72c41bc0 /drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c | |
parent | 27cfdadd687deca58146b415f60b23d185cb3532 (diff) | |
download | linux-84cba72956fddf29ba666f885c39ed147024c125.tar.xz |
dpaa2-switch: integrate the MAC endpoint support
Integrate the common MAC endpoint management support into the
dpaa2-switch driver as well. Nothing special happens here, just that the
already available dpaa2-mac functions are also called from dpaa2-switch.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c')
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c index 70e04321c420..5a460dcc6f4e 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c @@ -62,6 +62,10 @@ dpaa2_switch_get_link_ksettings(struct net_device *netdev, struct dpsw_link_state state = {0}; int err = 0; + if (dpaa2_switch_port_is_type_phy(port_priv)) + return phylink_ethtool_ksettings_get(port_priv->mac->phylink, + link_ksettings); + err = dpsw_if_get_link_state(port_priv->ethsw_data->mc_io, 0, port_priv->ethsw_data->dpsw_handle, port_priv->idx, @@ -95,6 +99,10 @@ dpaa2_switch_set_link_ksettings(struct net_device *netdev, bool if_running; int err = 0, ret; + if (dpaa2_switch_port_is_type_phy(port_priv)) + return phylink_ethtool_ksettings_set(port_priv->mac->phylink, + link_ksettings); + /* Interface needs to be down to change link settings */ if_running = netif_running(netdev); if (if_running) { |