Adding OpenWrt support for Xiaomi AX3600 (Part 1)

Ok, rants aside: if you want to improve matters, you could try to experiment with oom_score.
It can be configured so that important processes don't get killed despite using the most memory (like the ath11k). I dont know how this is done, so please ask the duck for details :slight_smile:

See if you want to use or adapt this:
You need to run htop and configure setup options to show 'kernel threads' and sort by MEM.
Then read here: https://askubuntu.com/questions/726333/how-to-save-htop-output-to-file
There are several ways to pipe htop, try this one:
echo q | htop | head -c -10 | tail -c +10 >> /tmp/mem.log
Maybe run it in a loop with sleep 3600 seconds.
To see the file: cat /tmp/mem.log
htop is not designed to be pipped into a file, so if you edit mem.log, it will be full of console codes, above link also shows how to remove them, but that's the way htop works.

There's also top -b -d 3600 >> /tmp/mem.log, but in openwrt it's in the in busybox with very few parameters. Using with -n 10 arg will run for 10 iterations.

Ok, so I rebased everything, and since backports have been updated ath11k needed a refresh.
So, I dropped all of the existing backported patches as it was a mess and backported everything up to yesterdays ath-next HEAD dropping whatever was already backported to 5.15.33.
There will be some patches that have already been upstreamed but quilt has applied them happily, so any eyes that can compare the patches are appreciated.

I only did basic testing on ath11k AHB, PCI has not been tested and I assume it wont work due to backports shipping MHI and QRTR MHI internally so it will conflict.

Tried replacing wpad-basic with the full version but since its defined in the target default packages you cant override it this way.

So, like always testing is really appreciated

10 Likes

fyi - I had PCI enabled - and got the following ... will disable pci now

build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-5.15.33-1/drivers/net/wireless/ath/ath11k/pci.c:430:21: error: 'struct msi_desc' has no member named 'pci'
430 | if (msi_desc->pci.msi_attrib.is_64) {

Yeah, I know its a genirq change that got half applied to ath11k only

Hm. About OOM. Maybe i can use version of driver with small buffer?


How to change the Free Space? I am a noobie. Thanks

What this mean? Perhaps memory problems can go away?

I doubt it

Sorted that error out, it compiles now but I doubt it works as QRTR and MHI will conflict

1 Like

the ath10k-ct-smallbuffers is selected by default already

On my AX6 the latest build works fine. Gigabit PPPoE speed is OK, wifi can reach 8-900Mbit DL, 5-600Mbit UL. Will monitor memory util.

What I noticed earlier is that when I start to push large amount of data, the receive signal power is down by a large sum. For example my phone is on -55 -56dBm RSSI, then I start a DL Iperf3 test: the RSSI drops to -68 -69dBm and floats around this until the test stops, then goes back to the original -55 -56dBm. Of course the phone is on the bed the whole time, nothing is explaining the large fluctuation. Same issue is not affecting the 2.4GHz AX, only 5GHz AX.

Testing the latest build with two of my three AX3600, no complaints. FYI it looks like you need to use wpad-mesh-openssl or wpad-mesh-wolf to get the 802.11s meshes up.

Yes, you need the mesh of full variants for mesh
@rmandrad ath11k-pci actually still works, they messed up the backports so MHI and QRTR is built there but not packaged which is great for us

But something else broke PCI, its broadcasting but no RX so you cant connect.
I am not in the mood for debugging that today

7 Likes

I dont use iot at all. I mean this for ath11

What is the way to override this? Using the command line when creating the image?

interesting finding the QCA9887 doesn't seem to be picking up the fq_codel

I am monitoring using collectd and get the following

Sat Apr 16 09:33:41 2022 daemon.err collectd[22975]: exec plugin: exec_read_one: error = Unknown qdisc type 'noqueue' on interface 'wlan0'

and tc qdisc show

qdisc noqueue 0: dev wlan0 root refcnt 2

whereas wlan1 and wlan2 show

qdisc mq 0: dev wlan1 root
qdisc fq_codel 0: dev wlan1 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev wlan1 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev wlan1 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev wlan1 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64

another finding I wasn't able to sysupgrade using a sysupgrade image. I had to switch to the other rootfs setting the flag_ota_reboot to 1 and then sysupgrade using the nandfactory image followed by a backup restore. As anyone seen this behaviour ? I was wondering if the rootfs 1 is smaller but it isn't ...

dev:    size   erasesize  name
mtd0: 00100000 00020000 "0:sbl1"
mtd1: 00100000 00020000 "0:mibib"
mtd2: 00300000 00020000 "0:qsee"
mtd3: 00080000 00020000 "0:devcfg"
mtd4: 00080000 00020000 "0:rpm"
mtd5: 00080000 00020000 "0:cdt"
mtd6: 00080000 00020000 "0:appsblenv"
mtd7: 00100000 00020000 "0:appsbl"
mtd8: 00080000 00020000 "0:art"
mtd9: 00080000 00020000 "bdata"
mtd10: 00080000 00020000 "crash"
mtd11: 00080000 00020000 "crash_syslog"
mtd12: 023c0000 00020000 "rootfs"
mtd13: 023c0000 00020000 "rootfs_1"
mtd14: 01ec0000 00020000 "overlay"
mtd15: 00080000 00020000 "rsvd0"

Dont expect anything from QCA9889 its a shit card, all of those Wawe 1 cards arent the best and lack features

1 Like

Using menuconfig when manually building, have you tried removing wpad-basic-wolfssl via opkg and installing wpad-wolfssl