summaryrefslogtreecommitdiff
path: root/include/linux/leds.h
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2023-06-19 22:46:59 +0200
committerJakub Kicinski <kuba@kernel.org>2023-06-21 14:30:46 -0700
commitf22f95b9ff1551c9bab13104131929f33d51f23f (patch)
treebcca25ec6d8db7e8dbc1f82657e2323f94bf491e /include/linux/leds.h
parentd5e01266e7f5fa12400d4c8aa4e86fe89dcc61e9 (diff)
leds: trigger: netdev: add additional specific link duplex mode
Add additional modes for specific link duplex. Use ethtool APIs to get the current link duplex and enable the LED accordingly. Under netdev event handler the rtnl lock is already held and is not needed to be set to access ethtool APIs. This is especially useful for PHY and Switch that supports LEDs hw control for specific link duplex. Add additional modes: - half_duplex: Turn on LED when link is half duplex - full_duplex: Turn on LED when link is full duplex Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Lee Jones <lee@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/leds.h')
-rw-r--r--include/linux/leds.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 126b79019429..3a65ff72bb04 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -558,6 +558,8 @@ enum led_trigger_netdev_modes {
TRIGGER_NETDEV_LINK_10,
TRIGGER_NETDEV_LINK_100,
TRIGGER_NETDEV_LINK_1000,
+ TRIGGER_NETDEV_HALF_DUPLEX,
+ TRIGGER_NETDEV_FULL_DUPLEX,
TRIGGER_NETDEV_TX,
TRIGGER_NETDEV_RX,