06.09.2011 01:31, Alexey Loukianov wrote:
> Now I want WAN and LAN1-4 leds to be lit when active link detected on
> appropriate port and to blink on tx/rx. It's easy to achive for wan port with
> help of ledtrig-netdev as this port is connected to a dedicated CPU ethernet
> interface (eth1 in my case), but I don't know if it is possible to use netdev
> ledtrig to track the state of the separate HW ports of the built-in AR7240
> switch. Any help with this?
> 

Small update. Inserted the following call in mach-dir-615-e4-usb.c :

ar71xx_gpio_function_enable(
                        AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
                        AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
                        AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
                        AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
                        AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN
                        );

Now green WAN led and all PORT X leds are being lit in case there's an active
link detected on the corresponding ethernet port. Still, there's a problem with
AR hw setup like this. Leds are being constantly on instead as long as there's
link detected without any blinking during port activity.

I haven't got access to the AR7240 datasheet so I can't tell if is it possible
to get "led blinking on port activity" effect relaying purely on hardware
features, so I'm looking for help/advices from informed people.

Alternative variant: it is possible to create separate vlan per switch port and
do ethernet bridging and leds blinking in software (brctl + ledtrig-netdev), but
I suspect this variant to be somehow slow when it comes to LAN<=>LAN ports
connectivity as switching (=bridging) would be done by the linux kernel in
software. Anyways I'm going to give it a try and test the sustained throughput
and average CPU usage under iperf-mt load.

-- 
Best regards,
Alexey Loukianov                          mailto:[email protected]
System Engineer,                            Mob.:+7(926)218-1320
*nix Specialist


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to