Adding OpenWrt support for Xiaomi AX3600 (Part 1)

Did you also mod the makefile to target the correct version ?

I reverted your patch that added the 11.3 compatibility completely.
I was seeing it before the FW change along with the 1G mode on the 2.5G port not passing traffic.

I mean, this is essentially what I was afraid of, you cant reliably maintain the kernel patches and the whole NSS package mess working.

1 Like

after reflashing with 11.4 iperf results got slightly better on wireless:

Wireless 11.4 (Using AX210)

[  4] local 192.168.3.196 port 64203 connected to 192.168.3.1 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  60.0 MBytes   503 Mbits/sec
[  4]   1.00-2.00   sec  62.1 MBytes   521 Mbits/sec
[  4]   2.00-3.00   sec  61.6 MBytes   516 Mbits/sec
[  4]   3.00-4.00   sec  60.0 MBytes   504 Mbits/sec
[  4]   4.00-5.00   sec  61.6 MBytes   518 Mbits/sec
[  4]   5.00-6.00   sec  60.8 MBytes   510 Mbits/sec
[  4]   6.00-7.00   sec  61.0 MBytes   512 Mbits/sec
[  4]   7.00-8.00   sec  57.6 MBytes   483 Mbits/sec
[  4]   8.00-9.00   sec  59.9 MBytes   502 Mbits/sec
[  4]   9.00-10.00  sec  61.8 MBytes   518 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   606 MBytes   509 Mbits/sec                  sender
[  4]   0.00-10.00  sec   606 MBytes   509 Mbits/sec                  receiver

iperf Done.

Wireless 11.3 (Using AX210)

[  4] local 192.168.3.196 port 50898 connected to 192.168.3.1 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  55.6 MBytes   467 Mbits/sec
[  4]   1.00-2.00   sec  60.8 MBytes   510 Mbits/sec
[  4]   2.00-3.00   sec  60.5 MBytes   507 Mbits/sec
[  4]   3.00-4.00   sec  39.1 MBytes   327 Mbits/sec
[  4]   4.00-5.00   sec  34.1 MBytes   286 Mbits/sec
[  4]   5.00-6.00   sec  48.8 MBytes   410 Mbits/sec
[  4]   6.00-7.00   sec  61.6 MBytes   517 Mbits/sec
[  4]   7.00-8.00   sec  56.4 MBytes   473 Mbits/sec
[  4]   8.00-9.00   sec  51.8 MBytes   433 Mbits/sec
[  4]   9.00-10.00  sec  35.0 MBytes   294 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   504 MBytes   422 Mbits/sec                  sender
[  4]   0.00-10.00  sec   504 MBytes   422 Mbits/sec                  receiver

iperf Done.

Wired 11.4 (Using Rpi3)

[  5] local 192.168.3.150 port 49124 connected to 192.168.3.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  34.1 MBytes   286 Mbits/sec    0    492 KBytes
[  5]   1.00-2.00   sec  33.4 MBytes   280 Mbits/sec    0    492 KBytes
[  5]   2.00-3.00   sec  33.0 MBytes   277 Mbits/sec    0    492 KBytes
[  5]   3.00-4.00   sec  34.9 MBytes   293 Mbits/sec    0    576 KBytes
[  5]   4.00-5.00   sec  35.1 MBytes   294 Mbits/sec    0    636 KBytes
[  5]   5.00-6.00   sec  35.3 MBytes   296 Mbits/sec    0    667 KBytes
[  5]   6.00-7.03   sec  34.3 MBytes   279 Mbits/sec    0    730 KBytes
[  5]   7.03-8.04   sec  35.0 MBytes   293 Mbits/sec    0    796 KBytes
[  5]   8.04-9.01   sec  33.8 MBytes   291 Mbits/sec    0    858 KBytes
[  5]   9.01-10.01  sec  35.0 MBytes   293 Mbits/sec    0    858 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.01  sec   344 MBytes   288 Mbits/sec    0             sender
[  5]   0.00-10.02  sec   344 MBytes   288 Mbits/sec                  receiver

iperf Done.

Wired 11.3 (Using Rpi3)

[  5] local 192.168.3.150 port 49132 connected to 192.168.3.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  34.8 MBytes   292 Mbits/sec    0    519 KBytes
[  5]   1.00-2.00   sec  34.8 MBytes   292 Mbits/sec    0    546 KBytes
[  5]   2.00-3.00   sec  34.9 MBytes   293 Mbits/sec    0    604 KBytes
[  5]   3.00-4.00   sec  35.0 MBytes   294 Mbits/sec    0    700 KBytes
[  5]   4.00-5.00   sec  34.9 MBytes   293 Mbits/sec    0    735 KBytes
[  5]   5.00-6.00   sec  34.3 MBytes   287 Mbits/sec    0    735 KBytes
[  5]   6.00-7.00   sec  35.2 MBytes   295 Mbits/sec    0    735 KBytes
[  5]   7.00-8.00   sec  34.4 MBytes   289 Mbits/sec    0    772 KBytes
[  5]   8.00-9.00   sec  35.0 MBytes   294 Mbits/sec    0    772 KBytes
[  5]   9.00-10.00  sec  34.8 MBytes   292 Mbits/sec    0    772 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   348 MBytes   292 Mbits/sec    0             sender
[  5]   0.00-10.01  sec   347 MBytes   290 Mbits/sec                  receiver

iperf Done.

Note about the wired connection: I am using RPI3, although it has "gigabit ethernet" I read that it is limited to about 400Mbps

@robimarko good news robi... one part of the tsens patch got applied... i need to send v3 and we are good to go!

5 Likes

Awesome, I will split the IPQ807x tsens support over the weekend and send it after your second patch gets merged.

At least something is moving, but DTS changes I send for IPQ8074 are not being reviewed at all, socinfo one was by QCA and even so the same day.

4 Likes

Managed to brick my AX3600. Would appreciate any ideas.
Boot process stops at:

B -    441426 - Error code 1000001 at boot_config.c Line 280

I am no expert, but as much as it seems: you manage to break the bootloader, and as there is no JTAG on this device, the only way to recover is to directly write the flash on the device. And that is not something you can do (likely).

Yeah, I would say that you corrupted the SBL itself and that is a big issue as QCA didn't include any kind of UART-based recovery.

So, you would need to reflash the NAND with a backup using an external programmer.
Another option would be flashing everything except the FW on a SPI-NOR as Xiaomi has left the pads for that as they clearly used SPI-NOR for booting during development just for this case as its hard to brick it, even if you brick it its easily flashable with a CH341A.
But that would require figuring out where is bootstrap config set and changing that to boot from SPI

2 Likes

I also checked out his master branch, but there's also a memory leak. Slow, but constantly reducing free mem over 1 day now, also fast transition doesn't work, a no go for me.
I'll wait for a good solution. I hope robimarko finds the leak(s) inside this painfull ath11k crap.

I think fast transition is working here using lede's branch..

Also I can't reproduce memory leak. I have turned off 2.4ghz radio and use only the 5Ghz one.

Every about 12 hours my router gets into state that it doesn't have anymore free memory due to the leak and kills process. this usually result that the router doesn't reboot but requires a manual reboot in order to work properly.

I collected dmesg log by using serial connection:
AX6 Memory leak dmesg (github.com)

And this is my build config:
AX6 config.buildinfo (github.com)

Right now running with 11.4 NSS but the same problem exists in 11.3 too.

Applying this commit as a patch to the AX3600-5.10-restart branch completes and builds cleanly, but the resulting image causes boot loops on AX6. Unfortunately I don't have UART connected so can't see the console outputs.

@dchard and @hgblob, is the 512MB profile patch still working for you?

This is the underlying ath11k memory leak everybody talks about. I see the same thing here: automatic reboots sometimes, but needing a manual power cycle other times.

It all depends on Wi-Fi traffic. One of my AX3600 is a remote lesser-used WDS AP and rebooted a few times a day, or got stuck and needed manual intervention. My workaround is a cron job to run a 10-second iperf3 burst every 30 minutes. 2 weeks uptime and > 100Mb free ever since.

The leak doesn't really affect my main AX3600 due to continuous traffic on ath11k.

I also built and flashed coolsnowwolf/lede master branch out of curiosity. I used it on my 2 AX3600 in dumb AP mode, and I had serious issues with roaming: not only 802.11r, just plain switching from one AP to the other caused my android phone to hang in DHCP lease acquiring state. I eventually gave up and returned to my previous xiaomi firmware. I too didn't observe memory leaks, including low-traffic (often zero WiFi clients) scenario for the 2 days I was running it, but I didn't measure free memory accurately, just noticed it always stayed 200MB+

@Ansuel Did your tsens patch get merged?
I see that Bjorn has been on a review streak, even replied regarding SMEM and TCSR.

2 Likes

Still no response to v3...

OK, it was missing from the linux-msm so it got me confused but they just marked it not applicable as its
gonna go through a different tree then.

So it's sched to be applied ? Probably thermal-next?

No idea
https://patchwork.kernel.org/project/linux-arm-msm/patch/20210917211403.19640-1-ansuelsmth@gmail.com/

(ot: anyway it's actually incredibile how good the net-next branch works compared to msm... they comment/review/approve patch in max 1-2 days... it's so good to push changes and gets an actual response...)

4 Likes