New LED trigger type netdev - triggers LEDs on network device activity
|Reported by:||oliver@…||Owned by:||developers|
I have a D-Link DSL-502T (AR7-based) which, while it has an ethernet activity LED, the LED is not actually directly driven by the ethernet hardware. The vendor firmware drives the LED in their ethernet driver on every packet (yuck!).
The attached patch adds a "netdev" LED trigger type which drives the LED based on some combination of link state and tx/rx activity. It's useful for both ethernet & ADSL monitoring. For link state it uses a netdev notifier. For tx/rx activity it polls device tx/rx stats from a timer.
Also in this patch is an init.d script to configure triggers appropriately for the LEDs available on the DSL-502T