Adding OpenWrt support for Xiaomi AX3600 (Part 1)

by the bad noise the router emit when using 30db IMHO they actually goes that high... not 30 but 27 can totally be... and 27 is still half a W

FW does all of that, the driver just makes the WMI call.

AFAIK, this should be part of the CTL section in BDF which vendors must populate properly with antenna and amplifier gains so the limits that are generated newer go outside of regulatory.

BTW, ETSI limits 2.4GHz to 20dBm/100mW per spec.

Fun patch series for MU-MIMO: https://patchwork.kernel.org/project/linux-wireless/cover/1665599807-12908-1-git-send-email-quic_msinada@quicinc.com/

What I meant is what kind of power do we need to request via WMI in order to get whatever we want? For example if I want 24dBm, do I need to request 24dBm, or do I need to request 18dBm because it will be multiplied by 4? With other words, if I request 24dBm, then the FW will recalculate it internally to meet it and set each chain accordingly?

That I dont know, could probably figure it out if I knew the op that is used to set TX power.

Ok, it was easy to find:

/* txpwr is set as 2 units per dBm in FW*/
	txpower = min_t(u32, max_t(u32, ar->min_tx_power, txpower),
			ar->max_tx_power) * 2;

	ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "txpower to set in hw %d\n",
		   txpower / 2);

This is what ath11k does in ath11k_mac_txpower_recalc.

So you just tell the FW what you want, some FW bindings I found say that TX power is expected in 0.5 dBm.

Agreed, and it's clearly shown on the AX3600 2.4/5GHz amplifier datasheets. The best MCS11 HE40/HE80 rates are unachievable at higher powers; TX noise (EVM) rising above a -43dB threshold. It's possible to get a better net data rate with a lower power signal. There are diminishing returns from turning power up too high.

https://www.qorvo.com/products/p/QPF4288
https://www.qorvo.com/products/p/QPF4588

I can't say how the +18/+19dB max rate PA gain relates to absolute TX dBm - depends on the raw signal from Qualcomm before gain.

Those have already been fixed in OpenWrt, I have found why AQR on Qnap wasn't working as well so a new release will go out today

3 Likes

Wifi crashes are happening more often lately with these messages in the log:

Thu Oct 13 14:57:24 2022 kern.warn kernel: [365895.201706] ath11k_warn: 47 callbacks suppressed

Thu Oct 13 14:57:24 2022 kern.warn kernel: [365895.201729] ath11k c000000.wifi: failed to send WMI_PDEV_BSS_CHAN_INFO_REQUEST cmd

Thu Oct 13 14:57:24 2022 kern.warn kernel: [365895.205417] ath11k c000000.wifi: failed to send pdev bss chan info request

Thu Oct 13 14:57:24 2022 kern.warn kernel: [365895.213112] ath11k c000000.wifi: failed to send WMI_PDEV_SET_PARAM cmd

Thu Oct 13 14:57:24 2022 kern.warn kernel: [365895.219871] ath11k c000000.wifi: Failed to set beacon mode for VDEV: 1

Thu Oct 13 14:57:24 2022 kern.warn kernel: [365895.226449] ath11k c000000.wifi: failed to send WMI_BCN_TMPL_CMDID

Thu Oct 13 14:57:24 2022 kern.warn kernel: [365895.233022] ath11k c000000.wifi: failed to submit beacon template command: -108

Thu Oct 13 14:57:24 2022 kern.warn kernel: [365895.239311] ath11k c000000.wifi: failed to update bcn template: -108

Thu Oct 13 14:57:24 2022 kern.warn kernel: [365895.246951] ath11k c000000.wifi: failed to send WMI_VDEV_SET_PARAM_CMDID

Thu Oct 13 14:57:24 2022 kern.warn kernel: [365895.253248] ath11k c000000.wifi: Failed to set dtim period for VDEV 1: -108

Thu Oct 13 14:57:24 2022 kern.warn kernel: [365895.260185] ath11k c000000.wifi: failed to send WMI_VDEV_SET_PARAM_CMDID

Thu Oct 13 14:57:30 2022 kern.warn kernel: [365901.272204] ath11k_warn: 47 callbacks suppressed

Thu Oct 13 14:57:30 2022 kern.warn kernel: [365901.272228] ath11k c000000.wifi: failed to send WMI_PDEV_BSS_CHAN_INFO_REQUEST cmd

Thu Oct 13 14:57:30 2022 kern.warn kernel: [365901.275951] ath11k c000000.wifi: failed to send pdev bss chan info request

Thu Oct 13 14:57:30 2022 kern.warn kernel: [365901.283762] ath11k c000000.wifi: failed to send WMI_PDEV_SET_PARAM cmd

Thu Oct 13 14:57:30 2022 kern.warn kernel: [365901.290391] ath11k c000000.wifi: Failed to set beacon mode for VDEV: 1

Thu Oct 13 14:57:30 2022 kern.warn kernel: [365901.296985] ath11k c000000.wifi: failed to send WMI_BCN_TMPL_CMDID

Thu Oct 13 14:57:30 2022 kern.warn kernel: [365901.303521] ath11k c000000.wifi: failed to submit beacon template command: -108

Thu Oct 13 14:57:30 2022 kern.warn kernel: [365901.309806] ath11k c000000.wifi: failed to update bcn template: -108

Thu Oct 13 14:57:30 2022 kern.warn kernel: [365901.317454] ath11k c000000.wifi: failed to send WMI_VDEV_SET_PARAM_CMDID

Thu Oct 13 14:57:30 2022 kern.warn kernel: [365901.323749] ath11k c000000.wifi: Failed to set dtim period for VDEV 1: -108

Thu Oct 13 14:57:30 2022 kern.warn kernel: [365901.330704] ath11k c000000.wifi: failed to send WMI_VDEV_SET_PARAM_CMDID

Thu Oct 13 14:57:36 2022 kern.warn

This is my wireless config in case someone else experiencing the same issue can find a pattern:


config wifi-device 'radio0'
        option type 'mac80211'
        option path 'soc/20000000.pci/pci0000:00/0000:00:00.0/0000:01:00.0'        option band '5g'
        option cell_density '0'
        option country 'ES'
        option htmode 'VHT40'
        option hwmode '11a'
        option channel 'auto'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/soc/c000000.wifi'
        option band '5g'
        option cell_density '0'
        option htmode 'HE80'
        option channel '36'
        option disabled '0'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'SSID_5G'
        option encryption 'sae-mixed'
        option key 'password'

config wifi-device 'radio2'
        option type 'mac80211'
        option path 'platform/soc/c000000.wifi+1'
        option band '2g'
        option cell_density '0'
        option htmode 'HT20'
        option channel 'auto'

config wifi-iface 'wifinet1'
        option device 'radio2'
        option mode 'ap'
        option encryption 'psk2'
        option network 'lan'
        option ssid 'SSID'
        option key 'password'

config wifi-iface 'wifinet2'
        option device 'radio2'
        option mode 'ap'
        option ssid 'IOT'
        option encryption 'psk2'
        option key 'password'
        option network 'iot'
        option isolate '1'

Those messages effectively dont mean anything, they just mean that FW did not respond in expected time and that it basically crapped itself.

That patchset doesn't even seems to compile:

https://lore.kernel.org/linux-wireless/166564252533.7747.3943450152611127759.kvalo@kernel.org/

1 Like

Classic QCA

Have you seen this one?

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?id=3811fa1f231f1a3e29759efef4992116604aab8b

Yes, but I dont think we are hitting that one.
I am working on using the backports that nbd prepared and that are based of what will be 6.1 RC so a lot of patches can be dropped

1 Like

Today,s build looks fine to me. What I noticed:

image

This is a 600Mbit AX wifi iperf (uplink, non-NAT), there are more NAPi threads and it seems the load is spread more evenly. Not sure if this is something new.

The PPPoE DL NAT test looks the same (900Mbit DL):

image

@robimarko
I noticed that the interfaces wlan1, wlan2, changed their names to phy1-ap0, phy2-ap0:
image
ip link show

7: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
10: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
11: phy1-ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP qlen 4096
12: phy2-ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP qlen 4096

Beside that it's board specific. So it does not change on all devices.

i have ax3600 everytime i do sysupgrade the device just goes to dead mode (orange light ) and should restor it to sock firmware using xaimi tool and idea y

Propably flashed only one partition. Look at docks once again and find information about flashing both partitions. After that sysupgrade will work properly.

1 Like

"Opkg update" is not a sysupgrade. "Opkg update" won't work because this is not a full release in terms of every package is compiled/available in the repository. In addition to that the repository is under heavy development. So it is very likely that the package base is outdated within a few days/hours.

If you have really issues with sysupgrade you probably missed point 7 from the Wiki "Flashing OpenWrt".

I did the same mistake in the past. Simply forgot to flash 2nd partition again after I flashed back to stock at the beginning (stock was more stable/usable in the past) and reflashing OpenWrt.

It is essential to flash both partitions with the proper factory image to make sysupgrade working.

2 Likes

ok, I just found out that I have bual os on my router so if I did sysupgrade will the router crash again ???