On Mon, 16 Dec 2024 11:48:22 +0100, Marek Vasut wrote:
The trigger_data->hw_control indicates whether the LED is controlled by HW
offload, i.e. the PHY. The trigger_data->hw_control = can_hw_control() is
currently called only from netdev_led_attr_store(), i.e. when writing any
sysfs attribute of the netdev trigger instance associated with a PHY LED.
The can_hw_control() calls validate_net_dev() which internally calls
led_cdev->hw_control_get_device(), which is phy_led_hw_control_get_device()
for PHY LEDs. The phy_led_hw_control_get_device() returns NULL if the PHY
is not attached.
[...]
Applied, thanks!
[1/1] leds: trigger: netdev: Check offload ability on interface up
commit: 0dfda50988c6805e8ab432e99866a021ea6ec46d
--
Lee Jones [李琼斯]