ramips: fix mt7621 ethernet support for v4.9
[openwrt/staging/lynxis/omap.git] / target / linux / ramips / files-4.9 / drivers / net / ethernet / mtk / soc_mt7621.c
index b1c84fc7ab794e988af079969127aa8f48f633e4..3a8653e5e2b51ec99a302cc616bdeb31f63c8edb 100644 (file)
@@ -82,7 +82,7 @@ static const u16 mt7621_reg_table[FE_REG_COUNT] = {
 
 static int mt7621_gsw_config(struct fe_priv *priv)
 {
-       if (priv->mii_bus && priv->mii_bus->phy_map[0x1f])
+       if (priv->mii_bus &&  mdiobus_get_phy(priv->mii_bus, 0x1f))
                mt7530_probe(priv->device, NULL, priv->mii_bus, 1);
 
        return 0;