diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2020-01-30 22:42:38 +0000 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2021-07-02 16:36:33 +0100 |
commit | 2d8e5959299ba2fd165780baf6c4d7b302855c53 (patch) | |
tree | c7a72fa20a29ddbb45702b2df19970af29471af1 | |
parent | a2e6983e3e7f9d1ba7ac15db3484ba2e13ae5d3f (diff) |
net: dpaa2-mac: add support for specifying interface modes
Add the new method of specifying to phylink which phy interface modes
are supported.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c index 59699f7898ba..7bf0c04a4799 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c @@ -334,9 +334,15 @@ int dpaa2_mac_connect(struct dpaa2_mac *mac) goto err_put_node; } + memset(&mac->phylink_config, 0, sizeof(mac->phylink_config)); mac->phylink_config.dev = &net_dev->dev; mac->phylink_config.type = PHYLINK_NETDEV; + __set_bit(mac->if_mode, mac->phylink_config.supported_interfaces); + if (mac->if_mode == PHY_INTERFACE_MODE_SGMII && mac->pcs) + __set_bit(PHY_INTERFACE_MODE_1000BASEX, + mac->phylink_config.supported_interfaces); + phylink = phylink_create(&mac->phylink_config, of_fwnode_handle(dpmac_node), mac->if_mode, &dpaa2_mac_phylink_ops); |