OSDN Git Service

leds: trigger: netdev: validate configured netdev
authorAndrew Lunn <andrew@lunn.ch>
Mon, 29 May 2023 16:32:39 +0000 (18:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 May 2023 08:42:09 +0000 (09:42 +0100)
commit33ec0b53befff2c0a7f3aa19ff08556d60585d6b
treedd6b5a5484f6c46f8704bb4c8d0f5b962ae0ce12
parent7c145a34ba6e380616af93262fcab9fc7261d851
leds: trigger: netdev: validate configured netdev

The netdev which the LED should blink for is configurable in
/sys/class/led/foo/device_name. Ensure when offloading that the
configured netdev is the same as the netdev the LED is associated
with. If it is not, only perform software blinking.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/leds/trigger/ledtrig-netdev.c