Flashed tp-link 1043nd v1 with trunk (ath79) and can't connect

please read !..

I will get the device unbricked soon and will take some part in the process. ))

I didn't unbrick the device yet, but it seems to me that I know what is the problem.

The switch port connected to CPU is detected wrongly. Can you make a default config with one vlan and with only eth0.1 interface in /etc/config/network and without iptables or dnsmasq?

And in bridge config make them all tagged.

The 4th port that has traffic seems to be the one bridged to CPU. The tags are wrong.

If that is the case, we could think how to fix it.

I'm on holidays, I'll try next week. But it's strange is't working all right from the initramfs image...

So what we have now. Wi-Fi works if you built with Wi-Fi enabled.
usb-net also works.
But eth0 is a real mystery. There must be some race condition that is very hard to debug.
If I have time, I'll try to add maximum debug to kernel and try to catch it.

I see this in the log

Wed Aug  1 15:09:59 2018 kern.notice kernel: [    0.413852] Realtek RTL8366RB ethernet switch driver version 0.2.4
Wed Aug  1 15:09:59 2018 kern.info kernel: [    1.132466] ag71xx 19000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
Wed Aug  1 15:09:59 2018 kern.info kernel: [    1.142385] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII

Shouldn't the driver be RTL8366rb, not Generic PHY?

it's ok, when you force the link it gets a generic phy, did you tried with the latest ag driver ?

Where is this driver?

this list

and try the cleanup

Can you please share your wifi DTS changes? (and the possible kernel config changes)

I have tried to get WNDR3800 working and your device is the most similar one.

the wifi always worked but without serial access you could not enable it and I forgot to enable the qss button for wifi on/off when I made the PR, the switch is not ok, so you can find the dt in master

Hmm. apparently I made a mistake: 1043nd is ar9132 not ar7161 based

My other device DIR-825 is similar to WNDR3800 , but I didn't start with it yet.
Regarding enabling wifi by default

diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
index 511a918..2ea628c 100644
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
@@ -113,7 +113,7 @@ detect_mac80211() {
 			set wireless.radio${devidx}.hwmode=11${mode_band}
 			${dev_id}
 			${ht_capab}
-			set wireless.radio${devidx}.disabled=1
+#			set wireless.radio${devidx}.disabled=1
 
 			set wireless.default_radio${devidx}=wifi-iface
 			set wireless.default_radio${devidx}.device=radio${devidx}
1 Like

I have this problem too on pb44 board, I'll try things on it, but I was on holidays, I'll let you know if I find something

Yeah, I got confused with that.

Regarding the cleanup I'll try it full, but I tried to remove phy-handler already :wink: and reset too. No dice.

I will probably start playing with the 825 too.

I created a bug report. Maybe someone with more knowledge will give some idea.
https://bugs.openwrt.org/index.php?do=details&task_id=1722

I pulled yesterday.

It seems that I got an idea. Look at my log

Wed Aug 1 15:09:59 2018 kern.notice kernel: [ 0.413852] Realtek RTL8366RB ethernet switch driver version 0.2.4
Wed Aug 1 15:09:59 2018 kern.info kernel: [ 1.132466] ag71xx 19000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
Wed Aug 1 15:09:59 2018 kern.info kernel: [ 1.142385] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII

Switch is connected to eth0.

On WNDR3800 the switch is connected the same way to eth1

Tue Jul 31 06:34:13 2018 kern.info kernel: [    1.780326] ag71xx 1a000000.eth: connected to PHY at rtl8366s:04 [uid=001cc960, driver=Generic PHY]
Tue Jul 31 06:34:13 2018 kern.info kernel: [    1.789907] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:RGMII

So in 1043v1 it should be connected to PHY at rtl8366rb.

If you look onto wndr3800.dts, you see that switch is not connected by fixed-link

rtl8366s {
		compatible = "realtek,rtl8366s";
		gpio-sda = <&gpio 5 GPIO_ACTIVE_HIGH>;
		gpio-sck = <&gpio 7 GPIO_ACTIVE_HIGH>;

		mdio-bus {
			status = "okay";

			phy-mask = <0x10>;

			phy4: ethernet-phy@4 {
				reg = <4>;
				phy-mode = "rgmii";
			};
		};
	};
&eth0 {
	status = "okay";

	pll-data = <0x11110000 0x00001099 0x00991099>;

	mtd-mac-address = <&art 0x00>;

	fixed-link {
		speed = <1000>;
		full-duplex;
	};
};

&eth1 {
	status = "okay";

	pll-data = <0x11110000 0x00001099 0x00991099>;

	mtd-mac-address = <&art 0x06>;

	resets = <&rst 13>;
	reset-names = "mac";

	phy-handle = <&phy4>;
};