aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2022-04-07 00:33:06 +0200
committerRamon Fried <ramon@neureality.ai>2022-04-10 08:44:13 +0300
commit79bef5fb1f0ce6b090017d2525a42f94e1577673 (patch)
tree9c23ac505b5d1887fb5aed5eb66e90710ada2aa1 /drivers/net/phy
parentf961b3abf88d2922e064a0b83525929aab917f1f (diff)
downloadu-boot-79bef5fb1f0ce6b090017d2525a42f94e1577673.zip
u-boot-79bef5fb1f0ce6b090017d2525a42f94e1577673.tar.gz
u-boot-79bef5fb1f0ce6b090017d2525a42f94e1577673.tar.bz2
net: phy: use ->is_c45 instead of is_10g_interface()
Use phydev->is_c45 instead of is_10g_interface(phydev->interface) to determine whether clause 45 protocol should be used. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/phy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index ba7b361..7f21c55 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -632,10 +632,10 @@ static int phy_probe(struct phy_device *phydev)
return err;
}
-static struct phy_driver *generic_for_interface(phy_interface_t interface)
+static struct phy_driver *generic_for_phy(struct phy_device *phydev)
{
#ifdef CONFIG_PHYLIB_10G
- if (is_10g_interface(interface))
+ if (phydev->is_c45)
return &gen10g_driver;
#endif
@@ -656,7 +656,7 @@ static struct phy_driver *get_phy_driver(struct phy_device *phydev,
}
/* If we made it here, there's no driver for this PHY */
- return generic_for_interface(interface);
+ return generic_for_phy(phydev);
}
struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
@@ -859,7 +859,7 @@ int phy_reset(struct phy_device *phydev)
#ifdef CONFIG_PHYLIB_10G
/* If it's 10G, we need to issue reset through one of the MMDs */
- if (is_10g_interface(phydev->interface)) {
+ if (phydev->is_c45) {
if (!phydev->mmds)
gen10g_discover_mmds(phydev);