Topic: TL-WR841N Atheros AR9431 WAN port swap

Hi all,

recently I received a WR841N (v8.4), which has no link activity when WAN port is connected.
I flashed it with OpenWrt image, but problem persists, which makes me believe it's more of a HW problem, as all other Eth ports (LANs) and Wireless adapter are functioning as expected.

( As a side note: I did only basic electrical measurements on the input RJ jack and magnetics and they seemed to be ok, so I'd narrow down the problem towards the SoC itself).

So just before giving up on this router, I found the SoC's (Atheros AR9431) datasheet, which states that WAN input twards the GMAC0 eth controller can be swapped between P0 and P4 of the underlying eth switch. This could be achieved by writing to SW_PHY_ADDR_SWAP and SW_PHY_SWAP of the ETH_CFG register

imgur.com/ BMJwz39

My question is if my assumption that swapping this port would mean that this router can still be used as a router and if yes, then how can I (if even possible) set this configuration?
I'm not really deep into linux environments, but would it be possible to have calls with *ioctl*-type procedures to access such device registers?

Cheers,
Dimitar

Re: TL-WR841N Atheros AR9431 WAN port swap

I think a change like that would require recompiling the chip init code in the kernel.  It is also unlikely to be successful as there is probably hardware damage to the phy on the chip.  This is quite common when lightning strikes near the cable or DSL line. 

You can use the regular configuration system to set up the switch to run VLANs to eth1 and make one of the 4 regular switched ports usable for WAN.