Adding OpenWrt Support for Netgear RAX120 (Nighthawk AX12)

So it is empty, thanks for the confirmation.

And btw: it is a easier if you post it as text instead of as an image. That way you search the topic or forum it will show up.

1 Like

Hi @patient0 any news ? Are you getting closer to a semi-stable build?

Nope, still on getting it merged. It's a slow process.

Hi I had some time today so i got to the serial and installed the last may build from your repo @patient0 . I managed to run multi gig, but interestingly, it reports 10gbps because it is actually connected to such a port, however, iperf indicates 2-2.5gbps. Unfortunately, the biggest problem I see with this build is wifi, I set everything according to the recommendations, i.e. one radio for low band 5ghz and the other radio for high band 5g, unfortunately both of these radios are practically unusable because all my devices are automatically dropped to 2.4 and only when I force 5ghz on client they stay, another topic is that I am not able to set 160mhz, only 80mhz works, however, the range itself is tragic and the performance is barely 300mbps. To sum up, I am very happy that something is happening with rax support, the above is just my thoughts and I am grateful that you are dragging the whole support practically alone because unfortunately @jewest has disappeared, obviously not forgetting about @robimarko . If you need any tests on a living organism or something, feel free to ask.

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/c000000.wifi'
        option channel '120'
        option band '5g'
        option htmode 'HE80'
        option disabled '0'
        option country 'US'
        option cell_density '0'
        option txpower '24'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'myssid'
        option encryption 'sae-mixed'
        option ifname 'lede2'
        option key 'mypassword'
        option skip_inactivity_poll '1'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/soc/c000000.wifi+1'
        option channel '3'
        option band '2g'
        option htmode 'HE40'
        option disabled '0'
        option country 'US'
        option cell_density '0'
        option txpower '30'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'myssid'
        option encryption 'sae-mixed'
        option ifname 'lede0'
        option key 'mypassword'
        option skip_inactivity_poll '1'

config wifi-device 'radio2'
        option type 'mac80211'
        option path 'platform/soc/c000000.wifi+2'
        option channel '60'
        option band '5g'
        option htmode 'HE80'
        option disabled '0'
        option country 'US'
        option cell_density '0'
        option txpower '24'

config wifi-iface 'default_radio2'
        option device 'radio2'
        option network 'lan'
        option mode 'ap'
        option ssid 'myssid'
        option encryption 'sae-mixed'
        option ifname 'lede1'
        option key 'mypassword'
        option skip_inactivity_poll '1'
Settings for lan5:
        Supported ports: [  ]
        Supported link modes:   100baseT/Half 100baseT/Full
                                1000baseT/Full
                                10000baseT/Full
                                1000baseKX/Full
                                10000baseKX4/Full
                                10000baseKR/Full
                                2500baseT/Full
                                5000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  100baseT/Half 100baseT/Full
                                1000baseT/Full
                                10000baseT/Full
                                1000baseKX/Full
                                10000baseKX4/Full
                                10000baseKR/Full
                                2500baseT/Full
                                5000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  100baseT/Half 100baseT/Full
                                             10000baseT/Full
                                             2500baseT/Full
                                             5000baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 10000Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: MII
        PHYAD: 7
        Transceiver: external
        Link detected: yes

Thank you for testing and reporting back, much appreciated!

... I managed to run multi gig, but interestingly, it reports 10gbp ...

That is true, I forgot about that. You can manually run ethtool -s lan5 advertise 0x1000000000000 and it will connect to max 5G. @robimarko mentioned in the PR that the AQR (the 5GbE port) uses a lot of vendor specific register. Maybe when we're able to set them the performance will be better. On the other hand maybe the CPU is the limiting factor (not tested much yet either).

Unfortunately, the biggest problem I see with this build is wifi

I haven't tested wifi much yet. How was your setup? A wired client running an iperf3 server and you connect to it per wifi client? Or an internet speed test? Have you really set the same SSID for all three wifi interfaces?

@wangyu : With your help I was able to modify the image creation so that the stock web gui accepts and uploads the firmware. But right now the rootfs can't be found after reboot (but u-boot env doesn't have to be touched anymore).
The same settings work for the sysupgrade image so clearly I'm missing something for the factory image. I'll investigate further, maybe the rootfs image is not properly aligned.

At the moment, the tests I have done have been carried out to the openspeedtest server from mbp, which is virtualized on my server, which is connected to a 10gbps switch. The problem with the wifi network manifests itself in poor coverage - at 2.4ghz it is great -29/-30dbm, but at 5ghz -70/-80dbm in a place where on the redmi ax6000 router I have from -49dbm to -52dbm, adding that on the stock firmware "between reboots” if you know what I mean XD these values ​​were around -50dbm the same as on the ax6000. To answer your question, yes I have set the same ssid for all three networks, to be honest it hasn't caused any problems on any of my routers so far. I also tested different configurations, taking into account different regions, mine, i.e. Poland as well as the United States and the default driver, there are problems with coverage on all of them. Maybe you have any suggestions as to what could be affecting the poor 5ghz range?

Edit:

@patient0 I done additional tests today and came to interesting conclusions. Firstly, after setting the radio to 160MHz, it jumps to frequencies above 6GHz, which doesn't seem promising (first screen). Secondly, I did a small investigation regarding the range, and it appears that OpenWRT or Apple devices report the actual range incorrectly. Specifically, as you can see in the second screenshot taken with an iPhone, it reports -50dBm to -60dBm, while Luci indicates -29dBm to -31dBm. I was sitting with the phone about 10cm away from the router. The third screenshot shows the connection between the MacBook and the Netgear, where there is also a significant discrepancy between what Luci shows and what the Netgear shows. In this case, the distance between the laptop and the router was about 2 meters. Finally, doing speed tests while sitting 10 cm away from the router, the speeds were around 600/600 Mbps. However, when moving 2 meters away from the router, the speeds drop to approximately 90/90 Mbps.

160mhz

Thank you @WiZaR5789 for the extensive tests. I haven't had time for wifi tests yet, your results indicate indeed that something is off with it.

I did some tests with the 5G lan interface and the same as you I don't get over 2.5 Gbps with one iperf3 client. Running two iperf3 in parallel to an iperf3 server running two instances (on different ports of course) I get around 3Gbps in total. From my perspective the CPU is the limiting factor here (iperf3 is single threaded).

@patient0 yap i agree with you most likely the cpu is the limiting factor here. Maybe @robimarko has some thoughts on the wifi situation ? Maybe I can do some additional testing to clarify this situation ?

I am repeating myself, but ethernet controller driver is crap, its badly written and lacks even basic offloads so just calculating checksums takes a lot of time and we cannot even utilize threaded NAPI with the current design.

@robimarko sorry for asking but are you talking about wifi or ethernet driver. Because in the post in which I tagged you, I meant my earlier post about wifi.

Well, I read it as in you used the 5G interface to run iperf3 through it and over the WLAN?

@robimarko I used both 5g lan and a regular 1g port, I'm more concerned with situations with range and 160mhz.

If the signal is really bad, it could be a bad BDF

@WiZaR5789 is it clear that 160MHz can be handled by the chip? A similar question on the Netgear forum could indicate that it can't ... but the info in the forum could be totally wrong.

@robimarko I could try to fetch a BDF from stock firmware, the current one is from @jewest repo.
Can I grab 'IPQ8074/bdwlan.bin' from '/lib/firmware'? Or does it have to be converted?
I didn't find any useful on how to extract the BDF, would you be able to provide a link or some keyword I can search for?

[   42.154531] cnss: BDF location : 0x000000004b0c0000
[   42.159051] cnss: BDF IPQ8074/bdwlan.bin size 131072

Edit: Having a look with hexdump I see the BDF is a bdwlan*.bin + a header of 108 bytes. If I could get a hint what tool to use to create it, that be great.

@patient0 I conclude from the fact that the xiaomi ax3600 that I had earlier had the same chip and gave 160mhz, unless it was some kind of magic by @robimarko

1 Like

Well, it seems it was already upstreamed to OpenWrt-s BDF repo.

You can however boot an image, remove the board-2.bin and just place the bdwlan.bin from the stock FW.

Then rmmod ath11k_ahb; rmmod ath11k; modprobe ath11k_ahb

SoC itself can do 160MHz, however its up to the BDF in the end whether its allowed to by the vendor.

rmmod ath11k_ahb; rmmod ath11k; modprobe ath11k_ahb

Unfortunately that doesn't work for me (even after I copy back the board-2.bin) when run from initramfs:

root@OpenWrt:/lib/firmware/ath11k/IPQ8074/hw2.0# modprobe ath11k_ahb
[  137.341955] ath11k c000000.wifi: ipq8074 hw2.0
[  137.341991] ath11k c000000.wifi: FW memory mode: 0
[  137.345520] remoteproc remoteproc0: powering up cd00000.q6v5_wcss
[  137.350162] remoteproc remoteproc0: Booting fw image IPQ8074/q6_fw.mdt, size 668
[  142.648307] qcom-q6v5-wcss-pil cd00000.q6v5_wcss: start timed out
[  142.648352] remoteproc remoteproc0: can't start rproc cd00000.q6v5_wcss: -110
[  142.653407] ath11k c000000.wifi: failed to boot the remote processor Q6
[  142.660520] ath11k c000000.wifi: failed to power up :-110
[  142.698280] ath11k c000000.wifi: failed to create soc core: -110
[  142.698307] ath11k c000000.wifi: failed to init core: -110
[  142.703546] ath11k: probe of c000000.wifi failed with error -110

Ok, so the good old broken remoteproc that doesnt allow restarting the remoteproc.

You can then unselect the ipq-wifi package and put the bdwlan.bin manually in the image by using the files directory

1 Like

@robimarko if I do some iperf3 tests either with the BDF in the repo or with the one from stock firmware (with 108 bytes header, otherwise it won't work) I get crashes:

dmesg crash log
[ 1063.615003] qcom-q6v5-wcss-pil cd00000.q6v5_wcss: fatal error received:
[ 1063.615003] QC Image Version: QC_IMAGE_VERSION_STRING=WLAN.HK.2.9.0.1-01385-QCAHKSWPL_SILICONZ-1
[ 1063.615003] Image Variant : IMAGE_VARIANT_STRING=8074.wlanfw.eval_v2Q
[ 1063.615003]
[ 1063.615003] NOC_error.c:474 NOCError: FATAL ERRORparam0 :zero, param1 :zero, param2 :zero.
[ 1063.615003] Thread ID      : 0x00000070  Thread name    : ABTIST182  Process ID     : 0
[ 1063.615003] Register:
[ 1063.615003] SP : 0x4b5cf438
[ 1063.615003] FP : 0x4b5cf440
[ 1063.615003] PC : 0x4b1080c4
[ 1063.615003] SSR : 0x00000008
[ 1063.615003] BADVA : 0x00020000
[ 1063.615003] LR : 0x4b107860
[ 1063.615003]
[ 1063.615003] Stack Dump
[ 1063.615003] from : 0x4b5cf438
[ 1063.615003] to   : 0x4b5cf510
[ 1063.615003]
[ 1063.661896] remoteproc remoteproc0: crash detected in cd00000.q6v5_wcss: type fatal error
[ 1063.684141] remoteproc remoteproc0: handling crash #1 in cd00000.q6v5_wcss
[ 1063.692371] remoteproc remoteproc0: recovering cd00000.q6v5_wcss
[ 1063.724963] remoteproc remoteproc0: stopped remote processor cd00000.q6v5_wcss
[ 1069.016007] ath11k c000000.wifi: failed to send WMI_PDEV_BSS_CHAN_INFO_REQUEST cmd
[ 1069.016058] ath11k c000000.wifi: failed to send pdev bss chan info request
[ 1069.022773] ath11k c000000.wifi: failed to send WMI_PDEV_SET_PARAM cmd
[ 1069.029357] ath11k c000000.wifi: Failed to set beacon mode for VDEV: 0
[ 1069.035865] ath11k c000000.wifi: failed to send WMI_BCN_TMPL_CMDID
[ 1069.042372] ath11k c000000.wifi: failed to submit beacon template command: -108
[ 1069.047968] qcom-q6v5-wcss-pil cd00000.q6v5_wcss: start timed out
[ 1069.048540] ath11k c000000.wifi: failed to update bcn template: -108
[ 1069.055726] remoteproc remoteproc0: can't start rproc cd00000.q6v5_wcss: -110
[ 1069.061993] ath11k c000000.wifi: failed to send WMI_VDEV_SET_PARAM_CMDID
[ 1069.075433] ath11k c000000.wifi: failed to set BA BUFFER SIZE 256 for vdev: 0
[ 1069.082218] ath11k c000000.wifi: failed to send WMI_VDEV_SET_PARAM_CMDID
[ 1075.091919] ath11k_warn: 9 callbacks suppressed
[ 1075.091936] ath11k c000000.wifi: failed to send WMI_PDEV_BSS_CHAN_INFO_REQUEST cmd
[ 1075.095276] ath11k c000000.wifi: failed to send pdev bss chan info request
[ 1075.103212] ath11k c000000.wifi: failed to send WMI_PDEV_SET_PARAM cmd
[ 1075.109788] ath11k c000000.wifi: Failed to set beacon mode for VDEV: 0
[ 1075.116292] ath11k c000000.wifi: failed to send WMI_BCN_TMPL_CMDID

As you mentioned in the Xiaomi AX9000 thread I tried adding the ath11k-pci module and with that no more crashes. Does that make sense to you?

Just including ath11k-pci does nothing if it doesn't match one of the supported PCI ID