[PATCH net-next 1/4] net: bcmgenet: remove netif_carrier_off from adjust_link

From: Florian Fainelli
Date: Sat Sep 25 2021 - 23:21:44 EST


From: Doug Berger <opendmb@xxxxxxxxx>

The bcmgenet_mii_setup() function is registered as the adjust_link
callback from the phylib for the GENET driver.

The phylib always sets the netif_carrier according to phydev->link
prior to invoking the adjust_link callback, so there is no need to
repeat that in the link down case within the network driver.

Signed-off-by: Doug Berger <opendmb@xxxxxxxxx>
Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
---
drivers/net/ethernet/broadcom/genet/bcmmii.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c
index ff1efd52ce16..8a9d8ceaa5bf 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
@@ -106,9 +106,6 @@ void bcmgenet_mii_setup(struct net_device *dev)
/* done if nothing has changed */
if (!status_changed)
return;
-
- /* needed for MoCA fixed PHY to reflect correct link status */
- netif_carrier_off(dev);
}

phy_print_status(phydev);
--
2.25.1