summaryrefslogtreecommitdiff
path: root/drivers/net/phy/fixed_phy.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2025-11-10 22:20:26 +0100
committerPaolo Abeni <pabeni@redhat.com>2025-11-13 15:20:30 +0100
commit9f07af1d274223a4314b5e2e6d395a78166c24c5 (patch)
treef8317f0565d4f4469073015b209d2d6d5315e57c /drivers/net/phy/fixed_phy.c
parentb63945b0c5b5de78712f843ce4a1f5c2ad83e6d0 (diff)
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>
Diffstat (limited to 'drivers/net/phy/fixed_phy.c')
-rw-r--r--drivers/net/phy/fixed_phy.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index 9bd6937411e4..715f0356f895 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -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 */
- phy->link = status->link;
- if (status->link) {
- phy->speed = status->speed;
- phy->duplex = status->duplex;
- phy->pause = status->pause;
- phy->asym_pause = status->asym_pause;
- }
+ phy->link = 1;
+ phy->speed = status->speed;
+ phy->duplex = status->duplex;
+ phy->pause = status->pause;
+ phy->asym_pause = status->asym_pause;
of_node_get(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)
{
static const struct fixed_phy_status status = {
- .link = true,
.speed = SPEED_100,
.duplex = DUPLEX_FULL,
};