Linux-LEDs Archive on
 help / color / Atom feed
* leds: netdev trigger - misleading link state indication at boot
@ 2021-04-13 18:20 Russell King - ARM Linux admin
  0 siblings, 0 replies; only message in thread
From: Russell King - ARM Linux admin @ 2021-04-13 18:20 UTC (permalink / raw)
  To: Ben Whitten, Dan Murphy; +Cc: linux-leds, netdev


I'm seeing some odd behaviour with the netdev trigger and some WiFi

When the WiFi interface has never been brought up (so is in an
operationally disabled state), if I bind a LED to the netdev
trigger, setting the device_name to the WiFi interface name and
enable the "link" property, the LED illuminates, indicating that
the WiFi device has link - but it's disabled.

If I up/down the WiFi interface, thereby returning it to the
original state, the link LED goes out.

I suspect ledtrig-netdev.c needs to check that the device is both
up (dev->flags & IFF_UP) and netif_carrier_ok(dev) both return true,
rather than just relying on netif_carrier_ok(). I don't think using
netif_running() is appropriate, as that will return true before
ndo_open() has been called to initialise the carrier state.


RMK's Patch system:
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 18:20 leds: netdev trigger - misleading link state indication at boot Russell King - ARM Linux admin

Linux-LEDs Archive on

Archives are clonable:
	git clone --mirror linux-leds/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-leds linux-leds/ \
	public-inbox-index linux-leds

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone