[OpenWrt-Devel] Link detection - TP-Link Archer C7 v2

Jo-Philipp Wich jow at openwrt.org
Wed May 27 08:41:31 EDT 2015

Hi Richard,

the link status is not propagated to the netdev because there's an
external switch chip between the CPU and the RJ45 plug on the outside.

There currently is no mechanism to propagate switch port states to Linux
netdev link states as such an mechanism has various implications.

For example: consider a switch port group containing five ports, 4
external RJ45 ports and one internal connected to the SoC - when would
you consider that interface down? When no port except the CPU one has a
link? Whenever a cable is plugged into one of the four ports?

Strictly speaking the missing link detection on wan is not a bug but by
design because the link between the CPU and the switch is always
established, it never goes down - its just a trace on the PCB.

Currently the WAN port link state detection only works on boards that
have a dedicated phy for their WAN and no intermediate programmable switch.

If you would want to work on that you'd need to propagate the swconfig
link state information to the connected netdev, but that already is a
problem since there is no programmatic way to relate a given netdev to a
switch device (e.g. is it eth0 or eth1 connected to switch0?).

Such information needs to be hardcoded per model, maybe encoded in the
board config code.

~ Jow
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list