Created attachment 173123 [details]
userland and kernel patch
The attached patch extends the etherswitch code to support controlling the LEDs associated with switch ports. An etherswitchcfg "led" subcommand is added, and led(4) device nodes are created for each led as well. There is backend code for the AR8327 switch, and support other switches should be easy to add.
etherswitchcfg port1 led 1 on port2 led 1 on port3 led 1 blink port4 led 1 off port5 led 1 default
echo 0 > /dev/led/arswitch0port1led1