Adding OpenWrt support for Xiaomi AX3600 (Part 1)

Can you be more specific

Classic program via android or ios app. (mycanal).

tried to compile your rebased branch but now qca-ssdk fails to compile with error message:

ssdk_dts.c:791:24: error: too few arguments to function 'of_get_mac_address'
   maddr = (a_uint8_t *)of_get_mac_address(dp_node);
                        ^~~~~~~~~~~~~~~~~~

you need to update the package feed

1 Like

mac addresses of eth1-eth3.
Noticed that in a network configuration without bridging and with 4 lan interfaces and 3 wifi interfaces the mac addresses of lan0 and wifi0-2 automatically have different mac addresses.
But lan1-3 share the same mac address.
Added macaddr options in the network configuration for lan1-3 to give them different mac addresses.
Is this lan1-3 having the same mac address intentional, and can it cause problems?

Update the package feed, that has been fixed.
Yeah, only the WAN port has different MAC, that is what Xiaomi asssigned per board.
You cant just go inventing MAC adresses as you wish.

1 Like

Coverage Class (distance).
Tried setting coverage class but only succeed on radio0 (ath10k driver).
Radios 1 and 2 ignore the setting.
Is ath11k only intended for local nearby use? The ath11k code contains nothing that deals with coverage class or distance. Or is adaptation to distance and its air travel time supposed to be completely automatic?

thanks; will do so. Is there the possibility in base-files/etc/board.d/02_network to change this automatically and assign them different values relative to wan/eth0 ?

You can do it, but should not.
You will be using MAC adresses that have been assigned to somebody else that way.
Whats the point anyway?

my concern is that in a system where all interfaces are supposed to be separate with their own ip subnets, it causes problems when different interfaces have identical mac addresses. How can the routing software keep them apart? But I may be wrong as internally perhaps the interfaces are distinguished by other means than their mac address.
Confusion with other devices is unlikely as I just assigned manually different values to the last byte, like is the case with the radio interfaces.

The switch will handle the forwarding, MAC-s can be the same and have been for almost all of the multi port devices that have an actual switch in OpenWrt.

1 Like

About the leak:

  • a few(~2) or no devices connected to the ath11k radio makes it go crazy with memory usage
  • a lot of devices(~20) plus the 512MB profile patch keeps it stable at 60%

It's not necessarily a leak because if I keep a couple device connected for an hour the memory usage goes up to 80% but if I connect more devices then the memory usage goes back down to 60%.

I have some weird build(many patches swiped from the chinese fork) that has been rock solid with around 20 devices connected to ath11k but @dchard with 2 devices connected gets the OOM after max 2 days.

I guess there is no memory leak per-se but the driver seems to be allocating too much memory that only gets released when there are many devices connected.

Can anybody confirm that hiding ESSID really has an impact on memory usage as outlined by @psi-c?

just tried it here, three radios as AP and all three 'option hidden 1'.
firmware: today's 'restart' with all 'lede' originating patches added to package/kernel/mac80211/patches/ath11k and associated changes that the 512M profile patch requires.
No load from traffic, other than a ssh link via lan3 to see what is going on.
When not 'hidden' the MemFree slowly reduces to 247MB coming from about 280M and then stabilizes.
When 'hidden' this reduction does not take place and MemFree fluctuates close to 279 MB.

1 Like

The image i used yesterday had a few debugging things turned on which themselves were eating RAM. I built a clean image and booted into that yesterday.

Straight after boot

              total        used        free      shared  buff/cache   available
Mem:         375804      138876      199292       30608       37636      178232
Swap:             0           0           0
After 30 minutes
              total        used        free      shared  buff/cache   available
Mem:         375804      144348      193820       30608       37636      172760
Swap:             0           0           0

After 2 hours, free down by 22MB but that's accounted for by buff/cache increasing by the same.

              total        used        free      shared  buff/cache   available
Mem:         375804      144716      172024       30612       59064      161676
Swap:             0           0           0

Now up for 21 hours and still the same as before

              total        used        free      shared  buff/cache   available
Mem:         375804      144532      172252       30612       59020      161880
Swap:             0           0           0

This image is robiarko's AX3600-5.10-restart (forked last week) with my patches for including bridge-mgr (see Roaming Issues Xiaomi AX3600 - #81 by psi-c). No wifi clients, just two devices connected via ethernet.

Not sure if there was any doubt about it being an ath11 problem, but I activated the IOT antenna this afternoon, broadcasting SSID whilst the ath11 was still hidden (previously I had the IOT disabled). Free memory decreased by about 20MB but has stayed stable over the last 11 hours so doesn't seem to be a problem there.

I tried to put the 512M patch to the packages/kernel/mac80211/patches/ath11k folder then run make packages/kernel/mac80211/refresh V=s, but every time the patch gets deleted from the folder. What am I doing wrong?

I'm not very familar with the openwrt build system, but I would have thought the right command is make packages/kernel/mac80211/compile V=s

And in any case if everything else fails just clean and build again everything.

The patch is still not applying. At least it stays in the ath11k folder this time. There is no error, it just simply not applies.

the #998 512M patch in mac80211 is part of a set of patches that add and change .dts files (reserved memory settings) and ath.mk (introduction of a configuration flag). The set can be seen here: https://gitce.net/mirrors/lede/commit/6967bf73f076826e9a6a6891ff204e4f4fdd90cd
The mac80211 patch later got renumbered from 207 to 998 but won't work in splendid isolation.

@robimarko / @Ansuel

blogic has commited a new branch to the tip repo including 11.4 nss binaries.

Readme.text has not been updated, but the bins reporting Version: NSS.HK.11.4.0.5-5-R

Unfortunately the QUIC repo still only contains the 11.3 binaries.

Maybe we can now add the 11.4 binaries to the nss-packages repo (due to the public availability of the bins)?

1 Like