net: phy: fixed_phy: initialize the link status as up

All callers initialize the link status as up. This change is in line
with how of_phy_register_fixed_link() behaves.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/45f644e8-2292-4787-a27a-f69084c93218@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Heiner Kallweit
2025-11-10 22:20:26 +01:00
committed by Paolo Abeni
parent b63945b0c5
commit 9f07af1d27

View File

@@ -174,13 +174,11 @@ struct phy_device *fixed_phy_register(const struct fixed_phy_status *status,
} }
/* propagate the fixed link values to struct phy_device */ /* propagate the fixed link values to struct phy_device */
phy->link = status->link; phy->link = 1;
if (status->link) { phy->speed = status->speed;
phy->speed = status->speed; phy->duplex = status->duplex;
phy->duplex = status->duplex; phy->pause = status->pause;
phy->pause = status->pause; phy->asym_pause = status->asym_pause;
phy->asym_pause = status->asym_pause;
}
of_node_get(np); of_node_get(np);
phy->mdio.dev.of_node = np; phy->mdio.dev.of_node = np;
@@ -224,7 +222,6 @@ EXPORT_SYMBOL_GPL(fixed_phy_register);
struct phy_device *fixed_phy_register_100fd(void) struct phy_device *fixed_phy_register_100fd(void)
{ {
static const struct fixed_phy_status status = { static const struct fixed_phy_status status = {
.link = true,
.speed = SPEED_100, .speed = SPEED_100,
.duplex = DUPLEX_FULL, .duplex = DUPLEX_FULL,
}; };