Adding OpenWrt support for Xiaomi "Redmi Router AX6S"/"Xiaomi Router AX3200"

Could you please share them with me? I have started with same problem as you - missing net/ra_nat.h file. Seems I solved that problem incorrectly, maybe you have some glues how to make it correct way.

i get it now why that error is coming in, drivers are looking for hardware nat, i just build an immage with that repository and the firmware compile, but the dts is different, if you give me time i 'll make two different drivers repo.
one for hardware nat, and the other if you need use sqm.

@spwnrpe

are you able to compile it right?
or still not working

No, nothing has changed on my end

This sounds promising

yes but my folder should work right if you clone openwrt 22.03.0
that is strange

I havent received anything/folder from you though

i have send it

Maybe it got stuck in your outbox? (i.e. to big attachment?)

don't think so

No, it got stuck in "spam", I've got it now and I'll make an attempt tomorrow!

ok it will work

Could you please give me your folder as well somehow?

I can try right away.

Meanwhile - does our chips even support Fast-NAT/HW Nat?

yes it support it i don't have that ready please wait

Well, I would be happy to get done even w/o hwnat at the moment, if it even possible.

Maybe its time for @bricco1981 to open up a repo at Github?

Your mtwifi differs a lot from immortalwrt though:

diff -qr mtwifi mtwifi-immortalwrt
Files mtwifi/luci-app-mtwifi/files/mt7615.1.dat and mtwifi-immortalwrt/luci-app-mtwifi/files/mt7615.1.dat differ
Files mtwifi/luci-app-mtwifi/files/mt7615.2.dat and mtwifi-immortalwrt/luci-app-mtwifi/files/mt7615.2.dat differ
Files mtwifi/luci-app-mtwifi/files/mt7615e.1.dat and mtwifi-immortalwrt/luci-app-mtwifi/files/mt7615e.1.dat differ
Files mtwifi/luci-app-mtwifi/files/mt7615e.2.dat and mtwifi-immortalwrt/luci-app-mtwifi/files/mt7615e.2.dat differ
Files mtwifi/luci-app-mtwifi/files/mt7615.lua and mtwifi-immortalwrt/luci-app-mtwifi/files/mt7615.lua differ
Files mtwifi/luci-app-mtwifi/luasrc/controller/mtkwifi.lua and mtwifi-immortalwrt/luci-app-mtwifi/luasrc/controller/mtkwifi.lua differ
Files mtwifi/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_apcli.htm and mtwifi-immortalwrt/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_apcli.htm differ
Files mtwifi/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_dev_cfg.htm and mtwifi-immortalwrt/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_dev_cfg.htm differ
Files mtwifi/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_overview.htm and mtwifi-immortalwrt/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_overview.htm differ
Files mtwifi/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_vif_cfg.htm and mtwifi-immortalwrt/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_vif_cfg.htm differ
Files mtwifi/luci-app-mtwifi/root/sbin/mtkwifi and mtwifi-immortalwrt/luci-app-mtwifi/root/sbin/mtkwifi differ
Files mtwifi/luci-app-mtwifi/root/usr/lib/lua/mtkwifi.lua and mtwifi-immortalwrt/luci-app-mtwifi/root/usr/lib/lua/mtkwifi.lua differ
Only in mtwifi-immortalwrt/mt7622: files
Files mtwifi/mt7622/Makefile and mtwifi-immortalwrt/mt7622/Makefile differ
Files mtwifi/mt7622/src/mt_wifi/include/os/rt_linux.h and mtwifi-immortalwrt/mt7622/src/mt_wifi/include/os/rt_linux.h differ
Files mtwifi/mt7622/src/mt_wifi_ap/Makefile and mtwifi-immortalwrt/mt7622/src/mt_wifi_ap/Makefile differ
Files mtwifi/mt_wifi/config.in and mtwifi-immortalwrt/mt_wifi/config.in differ
Only in mtwifi-immortalwrt/mt_wifi: files
Files mtwifi/mt_wifi/Makefile and mtwifi-immortalwrt/mt_wifi/Makefile differ
Files mtwifi/mt_wifi/src/mt_wifi/embedded/common/cmm_mac_pci.c and mtwifi-immortalwrt/mt_wifi/src/mt_wifi/embedded/common/cmm_mac_pci.c differ
Files mtwifi/mt_wifi/src/mt_wifi/embedded/plug_in/whnat/wed.c and mtwifi-immortalwrt/mt_wifi/src/mt_wifi/embedded/plug_in/whnat/wed.c differ
Files mtwifi/mt_wifi/src/mt_wifi/embedded/plug_in/whnat/woe_client_jedi.c and mtwifi-immortalwrt/mt_wifi/src/mt_wifi/embedded/plug_in/whnat/woe_client_jedi.c differ
Files mtwifi/mt_wifi/src/mt_wifi/embedded/plug_in/whnat/woe_hw.c and mtwifi-immortalwrt/mt_wifi/src/mt_wifi/embedded/plug_in/whnat/woe_hw.c differ
Files mtwifi/mt_wifi/src/mt_wifi/embedded/plug_in/whnat/woe_main.c and mtwifi-immortalwrt/mt_wifi/src/mt_wifi/embedded/plug_in/whnat/woe_main.c differ
Files mtwifi/mt_wifi/src/mt_wifi/embedded/plug_in/whnat/woe_proc.c and mtwifi-immortalwrt/mt_wifi/src/mt_wifi/embedded/plug_in/whnat/woe_proc.c differ
Files mtwifi/mt_wifi/src/mt_wifi/embedded/plug_in/whnat/woe_ser.c and mtwifi-immortalwrt/mt_wifi/src/mt_wifi/embedded/plug_in/whnat/woe_ser.c differ
Files mtwifi/mt_wifi/src/mt_wifi/include/os/rt_linux.h and mtwifi-immortalwrt/mt_wifi/src/mt_wifi/include/os/rt_linux.h differ
Files mtwifi/mt_wifi/src/mt_wifi_ap/Makefile and mtwifi-immortalwrt/mt_wifi/src/mt_wifi_ap/Makefile differ

Didnt you say that https://github.com/padavanonly/immortalwrtmt7622 was your source?

git clone https://github.com/padavanonly/immortalwrtmt7622.git -b openwrt-18.06-k5.4 immortalwrt
mkdir mtwifi-immortalwrt
cp -r immortalwrt/package/luci-app-mtwifi immortalwrt/package/mt7622 immortalwrt/package/mt_wifi mtwifi-immortalwrt/

Building now...

New error, maybe unrelated... but it feels like it should build using Openwrt sources from Github and "official" build vm instructions?

/home/openwrt/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.2.0/../../../../aarch64-openwrt-linux-musl/bin/ld: fuzz_client.c:(.text.LLVMFuzzerTestOneInput+0x230): undefined reference to `mbedtls_test_cas_pem'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make[3]: *** [Makefile:141: /home/openwrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/mbedtls-2.28.1/.built] Error 1
make[3]: Leaving directory '/home/openwrt/openwrt/package/libs/mbedtls'
time: package/libs/mbedtls/compile#0.17#0.05#0.18
    ERROR: package/libs/mbedtls failed to build.
make[2]: *** [package/Makefile:116: package/libs/mbedtls/compile] Error 1
make[2]: Leaving directory '/home/openwrt/openwrt'
make[1]: *** [package/Makefile:110: /home/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/openwrt/openwrt'
make: *** [/home/openwrt/openwrt/include/toplevel.mk:230: world] Error 2

clone openwrt 22.03.0 add that folder to package