Commit Graph

5 Commits (d527b828624c6b86813f68d1ffa3bb8c84249f65)

Author SHA1 Message Date
Felix Fietkau d527b82862 switch: allow Ethernet port LEDs to show specific port speeds only
This patch adds speed_mask special file to LEDs connected to switch ports
via 'switch' trigger. It allows to choose which speeds to signal when link
is up. If router has more than one LED per port, they may light up
differently depending on how fast connection is. Default setting is 'all
speeds' so backward compatibility with system scripts (for example uci) is
maintained.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

SVN-Revision: 48775
8 years ago
Felix Fietkau f61a80444c switch: make LED port_mask file write handler use kstrtoul() function
This patch changes swconfig_trig_port_mask_store() handler to utilize
kstrtoul() function instead of call to obsolete simple_strtoul(). Thanks
to this change, new handler takes less memory and makes port_mask special
file accept not only hexadecimal, but also decimal and octal numbers.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

SVN-Revision: 48774
8 years ago
Gabor Juhos 7c137c187f ar71xx: swconfig: use the local helper to set LED brightness on link down
Use the 'swconfig_trig_set_brightness' function to set
the brightness value of the LED when the link goes down.
This ensures that the last brighness value is saved into
a local variable which is used to track the actual LED
status.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39402
11 years ago
Gabor Juhos ee9376d153 generic: swconfig: use led_set_brightness in LED control code
The 'led_brightness_set' function has
been renamed to 'led_set_brightness'
in recent ernels. Use the new name and
add a compatibility patch for 3.3.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 33946
12 years ago
Gabor Juhos 5fa65cba6e kernel: swconfig: introduce a generic switch LED trigger
SVN-Revision: 29627
13 years ago