mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-19 15:55:05 +04:00
For LEDs that have no network trigger configuration in Device Tree (no mode or family properties), net_activate() infers the family from the LED name or function string. If that inference fails, the trigger previously returned -EINVAL and refused to activate. This is too strict for manual activation via sysfs (e.g. echo "network" > /sys/class/leds/<led>/trigger) on LEDs that were not declared for the network trigger in DT. In that case the user expects the trigger to load with sensible defaults. Change the non-DT activation path to fall back to NET_TRIG_WLAN instead of failing, while keeping the condition visible via pr_warn(). Device Tree paths with dt_mode or dt_family are left unchanged and continue to fail on invalid parameters Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Link: https://github.com/openwrt/openwrt/pull/24235 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>