OpenWrt support for Xiaomi AX9000

Just out of curiosity, I extracted and loaded that wifi firmware to my AX6, it works but still has wrong ETSI countries, no channel 13, powers are also incorrect.

Dont worry they didnt update the regulatory info even in 2.5

I know, but if the theory is that the firmware has the regdb, and with the stock fw channel 13 works, I kinda hoped that a xiaomi extracted firmware might solve this issue. I checked the latest AX6 stock firmware and that is still version 2.0, so I am not going back to that, but if I can find a 2.4 version with correct regdb, that might be a solution :slight_smile:

I honestly wouldnt be surprised to find that there is a mode to ignore the regdb completely.
Also, the person whom I contacted provided me with 2021.04 regdb to add to BDF and with that added ath11k doesn't complain and will change the regulatory info.
However the limits don't match the wireless-regdb one but are outdated as well.
So it looks like QCN9074 requires that, but all of the 5G channels are enabled on the QCN apparently with the default regdb.

root@OpenWrt:/# iw phy
Wiphy phy1
        wiphy index: 1
        max # scan SSIDs: 16
        max scan IEs length: 142 bytes
        max # sched scan SSIDs: 0
        max # match sets: 0
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports AP-side u-APSD.
        Available Antennas: TX 0xf RX 0xf
        Configured Antennas: TX 0xf RX 0xf
        Supported interface modes:
                 * managed
                 * AP
                 * monitor
                 * mesh point
        Band 2:
                Capabilities: 0x19ef
                        RX LDPC
                        HT20/HT40
                        SM Power Save disabled
                        RX HT20 SGI
                        RX HT40 SGI
                        TX STBC
                        RX STBC 1-stream
                        Max AMSDU length: 7935 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: No restriction (0x00)
                HT TX/RX MCS rate indexes supported: 0-31
                VHT Capabilities (0x738bf9b2):
                        Max MPDU length: 11454
                        Supported Channel Width: neither 160 nor 80+80
                        RX LDPC
                        short GI (80 MHz)
                        TX STBC
                        SU Beamformer
                        SU Beamformee
                        MU Beamformer
                        RX antenna pattern consistency
                        TX antenna pattern consistency
                VHT RX MCS set:
                        1 streams: MCS 0-9
                        2 streams: MCS 0-9
                        3 streams: MCS 0-9
                        4 streams: MCS 0-9
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT RX highest supported: 0 Mbps
                VHT TX MCS set:
                        1 streams: MCS 0-9
                        2 streams: MCS 0-9
                        3 streams: MCS 0-9
                        4 streams: MCS 0-9
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT TX highest supported: 0 Mbps
                HE Iftypes: Station
                        HE MAC Capabilities (0x000b9a181040):
                                +HTC HE Supported
                                TWT Requester
                                Dynamic BA Fragementation Level: 1
                                BSR
                                Broadcast TWT
                                OM Control
                                Maximum A-MPDU Length Exponent: 3
                                RX Control Frame to MultiBSS
                                A-MSDU in A-MPDU
                                OM Control UL MU Data Disable RX
                        HE PHY Capabilities: (0x1c604c89ffdb839c110c00):
                                HE40/HE80/5GHz
                                HE160/5GHz
                                HE160/HE80+80/5GHz
                                LDPC Coding in Payload
                                HE SU PPDU with 1x HE-LTF and 0.8us GI
                                STBC Tx <= 80MHz
                                STBC Rx <= 80MHz
                                Full Bandwidth UL MU-MIMO
                                DCM Max Constellation: 1
                                DCM Max Constellation Rx: 1
                                SU Beamformer
                                SU Beamformee
                                MU Beamformer
                                Beamformee STS <= 80Mhz: 7
                                Beamformee STS > 80Mhz: 7
                                Sounding Dimensions <= 80Mhz: 3
                                Sounding Dimensions > 80Mhz: 3
                                Ng = 16 SU Feedback
                                Ng = 16 MU Feedback
                                Codebook Size SU Feedback
                                Codebook Size MU Feedback
                                PPE Threshold Present
                                HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
                                Max NC: 3
                                STBC Rx > 80MHz
                                HE ER SU PPDU 4x HE-LTF 0.8us GI
                                HE ER SU PPDU 1x HE-LTF 0.8us GI
                                TX 1024-QAM
                                RX 1024-QAM
                        HE RX MCS and NSS set <= 80 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: MCS 0-11
                                4 streams: MCS 0-11
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE TX MCS and NSS set <= 80 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: MCS 0-11
                                4 streams: MCS 0-11
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE RX MCS and NSS set 160 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: MCS 0-11
                                4 streams: MCS 0-11
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE TX MCS and NSS set 160 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: MCS 0-11
                                4 streams: MCS 0-11
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                HE Iftypes: AP
                        HE MAC Capabilities (0x000d9a181040):
                                +HTC HE Supported
                                TWT Responder
                                Dynamic BA Fragementation Level: 1
                                BSR
                                Broadcast TWT
                                OM Control
                                Maximum A-MPDU Length Exponent: 3
                                RX Control Frame to MultiBSS
                                A-MSDU in A-MPDU
                                OM Control UL MU Data Disable RX
                        HE PHY Capabilities: (0x1c604c88ffdb839c110c00):
                                HE40/HE80/5GHz
                                HE160/5GHz
                                HE160/HE80+80/5GHz
                                LDPC Coding in Payload
                                HE SU PPDU with 1x HE-LTF and 0.8us GI
                                STBC Tx <= 80MHz
                                STBC Rx <= 80MHz
                                Full Bandwidth UL MU-MIMO
                                DCM Max Constellation Rx: 1
                                SU Beamformer
                                SU Beamformee
                                MU Beamformer
                                Beamformee STS <= 80Mhz: 7
                                Beamformee STS > 80Mhz: 7
                                Sounding Dimensions <= 80Mhz: 3
                                Sounding Dimensions > 80Mhz: 3
                                Ng = 16 SU Feedback
                                Ng = 16 MU Feedback
                                Codebook Size SU Feedback
                                Codebook Size MU Feedback
                                PPE Threshold Present
                                HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
                                Max NC: 3
                                STBC Rx > 80MHz
                                HE ER SU PPDU 4x HE-LTF 0.8us GI
                                HE ER SU PPDU 1x HE-LTF 0.8us GI
                                TX 1024-QAM
                                RX 1024-QAM
                        HE RX MCS and NSS set <= 80 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: MCS 0-11
                                4 streams: MCS 0-11
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE TX MCS and NSS set <= 80 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: MCS 0-11
                                4 streams: MCS 0-11
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE RX MCS and NSS set 160 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: MCS 0-11
                                4 streams: MCS 0-11
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE TX MCS and NSS set 160 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: MCS 0-11
                                4 streams: MCS 0-11
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                HE Iftypes: Mesh
                        HE MAC Capabilities (0x00098a081040):
                                +HTC HE Supported
                                Dynamic BA Fragementation Level: 1
                                BSR
                                OM Control
                                Maximum A-MPDU Length Exponent: 1
                                RX Control Frame to MultiBSS
                                A-MSDU in A-MPDU
                                OM Control UL MU Data Disable RX
                        HE PHY Capabilities: (0x1c600c80fd5b811c100000):
                                HE40/HE80/5GHz
                                HE160/5GHz
                                HE160/HE80+80/5GHz
                                LDPC Coding in Payload
                                HE SU PPDU with 1x HE-LTF and 0.8us GI
                                STBC Tx <= 80MHz
                                STBC Rx <= 80MHz
                                SU Beamformer
                                SU Beamformee
                                Beamformee STS <= 80Mhz: 7
                                Beamformee STS > 80Mhz: 7
                                Sounding Dimensions <= 80Mhz: 3
                                Sounding Dimensions > 80Mhz: 3
                                Ng = 16 SU Feedback
                                Codebook Size SU Feedback
                                PPE Threshold Present
                                HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
                                Max NC: 3
                                HE ER SU PPDU 1x HE-LTF 0.8us GI
                        HE RX MCS and NSS set <= 80 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: MCS 0-11
                                4 streams: MCS 0-11
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE TX MCS and NSS set <= 80 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: MCS 0-11
                                4 streams: MCS 0-11
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE RX MCS and NSS set 160 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: MCS 0-11
                                4 streams: MCS 0-11
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE TX MCS and NSS set 160 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: MCS 0-11
                                4 streams: MCS 0-11
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                Frequencies:
                        * 5180 MHz [36] (30.0 dBm)
                        * 5200 MHz [40] (30.0 dBm)
                        * 5220 MHz [44] (30.0 dBm)
                        * 5240 MHz [48] (30.0 dBm)
                        * 5260 MHz [52] (24.0 dBm) (radar detection)
                        * 5280 MHz [56] (24.0 dBm) (radar detection)
                        * 5300 MHz [60] (24.0 dBm) (radar detection)
                        * 5320 MHz [64] (24.0 dBm) (radar detection)
                        * 5500 MHz [100] (24.0 dBm) (radar detection)
                        * 5520 MHz [104] (24.0 dBm) (radar detection)
                        * 5540 MHz [108] (24.0 dBm) (radar detection)
                        * 5560 MHz [112] (24.0 dBm) (radar detection)
                        * 5580 MHz [116] (24.0 dBm) (radar detection)
                        * 5600 MHz [120] (24.0 dBm) (radar detection)
                        * 5620 MHz [124] (24.0 dBm) (radar detection)
                        * 5640 MHz [128] (24.0 dBm) (radar detection)
                        * 5660 MHz [132] (24.0 dBm) (radar detection)
                        * 5680 MHz [136] (24.0 dBm) (radar detection)
                        * 5700 MHz [140] (24.0 dBm) (radar detection)
                        * 5720 MHz [144] (24.0 dBm) (radar detection)
                        * 5745 MHz [149] (30.0 dBm)
                        * 5765 MHz [153] (30.0 dBm)
                        * 5785 MHz [157] (30.0 dBm)
                        * 5805 MHz [161] (30.0 dBm)
                        * 5825 MHz [165] (30.0 dBm)
                        * 5845 MHz [169] (30.0 dBm)
                        * 5865 MHz [173] (30.0 dBm)
        valid interface combinations:
                 * #{ managed } <= 1, #{ AP, mesh point } <= 16,
                   total <= 16, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz }

        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        max # scan plans: 1
        max scan plan interval: -1
        max scan plan iterations: 0
        Maximum associated stations in AP mode: 512
        Supported extended features:
                * [ RRM ]: RRM
                * [ FILS_STA ]: STA FILS (Fast Initial Link Setup)
                * [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
                * [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
                * [ STA_TX_PWR ]: TX power control per station
                * [ CONTROL_PORT_NO_PREAUTH ]: disable pre-auth over nl80211 control port support
                * [ SCAN_FREQ_KHZ ]: scan on kHz frequency support
                * [ CONTROL_PORT_OVER_NL80211_TX_STATUS ]: tx status for nl80211 control port support

Does anybody have a print from stock FW?

Is that regdb correct?
If so, if I give you a BDF file, can you update the regdb in that?

I trust the person, it's the upstream wireless-regdb converted to the BDF format per country so it should be correct.

Yeah, I should be able to replace the regulatory in the BDF(In theory at least).
Its a bit painful however.

Well, if you can apply this to my BDF, then the reg problems with both the AX3600 and AX6 will be resolved, and we can use the newer ath11k-firmwares. So I'd say it worth a try.

Ok, we can try however this is all trial and error.
Send me the BDF and I will give it a go

1 Like

Here it is, hopefully I didnt mess it up

Hm... No you did not mess it up, the file boots with 2.5.0.1 firmware just fine.

The regdb for Hungary changed now:

root@XAX6:~# iw reg get
global
country HU: DFS-ETSI
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
        (5725 - 5875 @ 80), (N/A, 13), (N/A)
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#1 (self-managed)
country HU: DFS-ETSI
        (2400 - 2472 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5590 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
        (5590 - 5650 @ 40), (N/A, 23), (600000 ms), DFS, AUTO-BW
        (5650 - 5725 @ 40), (N/A, 23), (0 ms), DFS, AUTO-BW
        (5725 - 5730 @ 5), (N/A, 13), (0 ms), DFS, AUTO-BW
        (5730 - 5850 @ 80), (N/A, 13), (N/A), AUTO-BW

phy#0 (self-managed)
country HU: DFS-ETSI
        (2400 - 2472 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5590 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
        (5590 - 5650 @ 40), (N/A, 23), (600000 ms), DFS, AUTO-BW
        (5650 - 5725 @ 40), (N/A, 23), (0 ms), DFS, AUTO-BW
        (5725 - 5730 @ 5), (N/A, 13), (0 ms), DFS, AUTO-BW
        (5730 - 5850 @ 80), (N/A, 13), (N/A), AUTO-BW

Still not correct (no channel 13), but definitely changed.

               Frequencies:
                        * 5180 MHz [36] (23.0 dBm)
                        * 5200 MHz [40] (23.0 dBm)
                        * 5220 MHz [44] (23.0 dBm)
                        * 5240 MHz [48] (23.0 dBm)
                        * 5260 MHz [52] (20.0 dBm) (radar detection)
                        * 5280 MHz [56] (20.0 dBm) (radar detection)
                        * 5300 MHz [60] (20.0 dBm) (radar detection)
                        * 5320 MHz [64] (20.0 dBm) (radar detection)
                        * 5500 MHz [100] (23.0 dBm) (radar detection)
                        * 5520 MHz [104] (23.0 dBm) (radar detection)
                        * 5540 MHz [108] (23.0 dBm) (radar detection)
                        * 5560 MHz [112] (23.0 dBm) (radar detection)
                        * 5580 MHz [116] (23.0 dBm) (radar detection)
                        * 5600 MHz [120] (23.0 dBm) (radar detection)
                        * 5620 MHz [124] (23.0 dBm) (radar detection)
                        * 5640 MHz [128] (23.0 dBm) (radar detection)
                        * 5660 MHz [132] (23.0 dBm) (radar detection)
                        * 5680 MHz [136] (23.0 dBm) (radar detection)
                        * 5700 MHz [140] (23.0 dBm) (radar detection)
                        * 5720 MHz [144] (disabled)
                        * 5745 MHz [149] (13.0 dBm)
                        * 5765 MHz [153] (13.0 dBm)
                        * 5785 MHz [157] (13.0 dBm)
                        * 5805 MHz [161] (13.0 dBm)
                        * 5825 MHz [165] (13.0 dBm)
                        * 5845 MHz [169] (disabled)
                        * 5865 MHz [173] (disabled)

The first few was 30dBm before your mods, and above channel 140 was all disabled.

Should I try a different country code?

Yes here: https://drive.google.com/file/d/1qOMGkaLl8chl4IwQLkdaEdJ2-4kcj6R9/view?usp=sharing

So I messed it up somehow, It can also be that the template from 11.4 that is made for FW 2.5 breaks it somehow.
I just wish that I had some docs to go along so that I would what I am doing.
They have some kind of Excell script but its really fuzzy how to use it.

So it still enables channels that its not supposed to.

Want me to try with 2.4?

Same thing, they added a bunch of stuff in 2.5

Tried with 2.4, exactly the same channels as with 2.5 (with your mods in BDF).

Non the less, we are getting there, as the mods did applied.

1 Like

Ahh, I wish we had more cheap devices so that we can compare and not rely on Xiaomi only.
GPL sources would also help a lot.
That Qnap Qhora looks really good, especially the dual 10G ports.
Also, I see constant firmware updates for it but its 290 EUR.
Too much for me to play around.

How much control you have over the BDF now? Can we play around and try different settings? Happy to help.

Full control, once you convert it it's just a bunch of strings with values.
But it's a lot and I mean a lot, like 7MB of strings and values.