The 3rd patch does fix setting the IF, but it is a bit hacky. That was the reason that it wasn't merged.
So my first guess was correct. The problem was in your u-boot.
If I look at the WNDR3700 implementation in ar71xx, the mach file explicitly sets RGMII mode for both eth0 and eth1, so I guess that it might be needed in ath79, too.
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ar71xx/files/arch/mips/ath79/mach-wndr3700.c;hb=HEAD#l131
We do have it in ar7100.dtsi
But it doesn't work
The puzzle is why did it work before
@981213 It may be not so bad really, if we replace ar7100-eth with ar7100-eth0 and ar7100-eth1 everywhere.
These are actually two different devices with different settings.
@Borromini
I am curious, as your own fresh build seemed to work a few hours ago.
is you wan link speed 100 Mbit or 1000 Mbit?
cat /sys/class/net/eth1/speed
@hnyman I was just reading the newer responses . In fact, I only tested the WNDR3700 as an AP. My build is r7862-ae9c3105a3.
Let me swap in the WNDR3700 as WAN real quick, I'll report back.
If you want to test a patched build, I am writing this with WNDR3800 using my new test build ath79-kernel4.14-master-test-20180815-with-patch that includes also devmem in kernel plus also ethtool. I uploaded that build into the download dir.
And that would be needed to fix the issue at hand, those patches?
Just the one patch left in the PR 1271:
https://github.com/openwrt/openwrt/pull/1271/commits/7416bf615074c093a0aa7c7919cb49229ca45d4e
Not really. The whole eth0 mode etc. discussion is not my specialty. @Pilot6 and @981213 have much more knowledge on that field.
OK. It seems somewhere with my PER_DEVICE_ROOTFS tinkering and my migration to master ppp-mod-pppoe
disappeared from my build, and I'm on VDSL2, so I'm not sure if my eth1 value is relevant at this point? Cat showed 100 Mbit.
I then flashed your build (kept settings, figured it wouldn't do any harm), but wireless didn't come up (powercycled more than once), and I just have the laptop at the moment. Have to call it a day for now. Will investigate further later this week.
This build working good - WAN under 1Gb is work as expected.
BTW:
You use two or tree patches on clean master tree sources ?
I'm not big developer, just beginner
I'm still will recreate yours compiling environment from yours scripts for build custom builds, but for now without success
Somee scripts not work properly.
You don't really need the build automation scripts so much. It is a bit hacky with my ath79 scripts because they are located on the side of normal ar71xx build scripts. I have mostly provided them as a reference for myself. Ath79.config is the seed config file and all scripts are in ath79scripts dir.
Regarding ath79 source code, I use currently only one extra patch like I describe in above discussion. (The other two patches from PR 1271 are already in master sources, so the "clean master" is different than it was a few days ago.)
Easiest for your testing might be to clone clean sources and then just download and apply that one patch from 1271.
It's OK, i build my own img of wndr3700v2 from ath79 and eth1 work well.
Thank's for tips help. Only output image is litle big (8,5MB) but works as I expected .
BTW output from devmem:
devmem 0x18070004
0x00000020
devmem 0x18050014
0x11110000
and cat /sys/class/net/eth1/speed
1000
You probably added to many packages. My sysupgrade image is 4.2 MB.
@hnyman It looks we have a problem with IRQs.
Can you disable 5Ghz wireless and check if 2.4 works? In my case it doesn't.
And 5Ghz performs poorly. In your case 2.4 may perform poorly, since it is the second one.
Both 5 GHz and 2.4 GHz work for me.
But speeds with both of them are some 25 Mbit/s down and 9 Mbit/s up, when it should be something like 85 / 10.
(Note that I tested with PC -wifi- WNDR3700v2 -wired- R7800 -wired- ISP
. The connection to the WNDR3700v2 at other end of the house might be a bit weak slowing down speeds. I did not bother to disconnect R7800 and place WDNR3800 next to PC this time )
So, the performance is not that great.
But step by step. At least both bands of the wifi work.
(r7866-8c91807214, clean sources + that one patch from 1271)
Ps. lately the wifi order has been normal again. wlan0=phy0=2.4GHz. Maybe the addresses really need to be @0,11 and @0,12 like mkresin changed for WNDR3700.dtsi. You have that in 825, so that does not explain the failure. butI also noticed at one reboot that at least once the firmware extract only did one file, and the second one for the other band was then created at the next wifi up (or reboot).
Look at this:
ath79
root@Router:~# cat /proc/interrupts
CPU0
3: 0 MIPS 3 ehci_hcd:usb1
4: 6325117 MIPS 4 19000000.eth
5: 6409628 MIPS 5 1a000000.eth
7: 802886 MIPS 7 timer
8: 12 MISC 3 ttyS0
11: 0 MISC 6 ohci_hcd:usb2
12: 887718 AR71XX PCI 1 ath9k, ath9k
ERR: 631
ar71xx
root@OpenWrt:~# cat /proc/interrupts
CPU0
3: 0 MIPS 3 ehci_hcd:usb1
4: 859 MIPS 4 eth0
5: 565 MIPS 5 eth1
7: 9006 MIPS 7 timer
11: 12 MISC 3 serial
14: 0 MISC 6 ohci_hcd:usb2
40: 0 AR71XX PCI 0 ath9k
41: 0 AR71XX PCI 1 ath9k
ERR: 0