static int stmmac_phy_setup(struct stmmac_priv *priv)
{
struct stmmac_mdio_bus_data *mdio_bus_data;
- int mode = priv->plat->phy_interface;
struct phylink_config *config;
struct fwnode_handle *fwnode;
struct phylink_pcs *pcs;
/* Set the platform/firmware specified interface mode. Note, phylink
* deals with the PHY interface mode, not the MAC interface mode.
*/
- __set_bit(mode, config->supported_interfaces);
+ __set_bit(priv->plat->phy_interface, config->supported_interfaces);
/* If we have an xpcs, it defines which PHY interfaces are supported. */
if (priv->hw->xpcs)
if (!fwnode)
fwnode = dev_fwnode(priv->device);
- phylink = phylink_create(config, fwnode, mode, &stmmac_phylink_mac_ops);
+ phylink = phylink_create(config, fwnode, priv->plat->phy_interface,
+ &stmmac_phylink_mac_ops);
if (IS_ERR(phylink))
return PTR_ERR(phylink);