]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: dev: call netif_carrier_off() in register_candev()
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Mon, 24 Jun 2019 08:34:13 +0000 (08:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:18:05 +0000 (10:18 +0200)
commitdc8438815624470629d0dd881708f19983d2f7c6
tree9531b885853317e25f6f7e9b78f442ff0528b2b3
parent5927e91f5024c2316a29227162b540018aab006e
can: dev: call netif_carrier_off() in register_candev()

[ Upstream commit c63845609c4700488e5eacd6ab4d06d5d420e5ef ]

CONFIG_CAN_LEDS is deprecated. When trying to use the generic netdev
trigger as suggested, there's a small inconsistency with the link
property: The LED is on initially, stays on when the device is brought
up, and then turns off (as expected) when the device is brought down.

Make sure the LED always reflects the state of the CAN device.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/dev.c