PTPT52

Results 279 comments of PTPT52

and as known to all, the switch led trigger is service by `target/linux/generic/files/drivers/net/phy/swconfig_leds.c`

anyway, why I prefer to use the swconfig driver? because it provide full switch support and full vlan handle but dsa is not, and maybe dsa still buggy for now.

@feckert I think `swconfig` command is the only/best way to get switch list, sure that not /sys/* to do that. `swconfig list` command output: ``` Found: switch0 - mt7530 Found:...

@feckert ok I am building and testing on your commit.

@feckert test almost good. but when I enter edit, it shows up `device` always be `switch0`, even I change it to switch1 and save.

@feckert and also I have to change the option mode name, it looks like conflict with somewhat.. ```diff diff --git a/applications/luci-app-ledtrig-switch/htdocs/luci-static/resources/view/system/led-trigger/switch.js b/applications/luci-app-ledtrig-switch/htdocs/luci-static/resources/view/system/l index 21c08afafe..f4517fea14 100644 --- a/applications/luci-app-ledtrig-switch/htdocs/luci-static/resources/view/system/led-trigger/switch.js +++ b/applications/luci-app-ledtrig-switch/htdocs/luci-static/resources/view/system/led-trigger/switch.js @@...

@feckert I am using the master code based on upstream master

It looks like we have to handle multi changes 1. update the `ucidef_set_led_switch()` in `package/base-files/files/lib/functions/uci-defaults.sh` 2. migrate the led config

to generate new style of led config ```diff diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index 8d03aac066..03771dd315 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -440,9 +440,10 @@ generate_led() { ;; switch) - local port_mask...

Also, if all done, we have to remove the code in `switch[0-9]` case in `/etc/init.d/led`