Support for WAVE 300 Wi-Fi chip

Realistically, chances for that are somewhere between minimal and non-existent (and that's already optimistic).

I am trying to compile the wave300 with the release candidates of OpenWrt (kernel 5.4), but it fails on building "mtlkroot" with this:

make[4]: Entering directory '/home/user/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-5.4.137'
scripts/kconfig/conf  --syncconfig Kconfig
net/sched/Kconfig:45: warning: menuconfig statement without prompt
  CALL    scripts/
  CALL    scripts/atomic/
  Building modules, stage 2.
  MODPOST 951 modules
make[4]: Leaving directory '/home/user/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-5.4.137'
/home/user/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/bin/mips-openwrt-linux-strip: 'mtlkroot.ko': No such file
cp: could not find 'drv_toolchain_info' # translated original error message
Makefile:485: recipe for target 'mtlkroot.ko' failed
make[3]: *** [mtlkroot.ko] Error 11
make[3]: Leaving directory '/home/user/wave300/builds/ugw5.4-vrx288/tools/mtlkroot'

Until version 19 the output was:

make[4]: Entering directory '/home/user/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.221'
Generating drv_info.c...
Generating drv_toolchain_info...
  CC [M]  /home/user/wave300/builds/ugw5.4-vrx288/tools/mtlkroot/linux/tools/mtlkroot/linux/drv_info.o
  LP      /home/user/wave300/builds/ugw5.4-vrx288/tools/mtlkroot/linux/tools/mtlkroot/linux/drv_info.c
  LP      /home/user/wave300/builds/ugw5.4-vrx288/config.h 
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/user/wave300/builds/ugw5.4-vrx288/tools/mtlkroot/linux/mtlkroot.mod.o
  LD [M]  /home/user/wave300/builds/ugw5.4-vrx288/tools/mtlkroot/linux/mtlkroot.ko
make[4]: Leaving directory '/home/user/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.14.221'

The last command executed by "/wave300/builds/ugw5.4-vrx288/tools/mtlkroot/" was:

   mkdir -p linux 
&& (test -e /home/user/wave300/builds/ugw5.4-vrx288/tools/mtlkroot/linux/Kbuild || ln -s /home/user/wave300/builds/ugw5.4-vrx288/../../tools/mtlkroot/linux/Kbuild /home/user/wave300/builds/ugw5.4-vrx288/tools/mtlkroot/linux/Kbuild) 
&& cd linux 
&& echo -n > .mtlk_kernel_target 
&& { test x"" = x"y" || echo modules > .mtlk_kernel_target; } 
&& make -C /home/user/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-5.4.137 \
        SUBDIRS=/home/user/wave300/builds/ugw5.4-vrx288/tools/mtlkroot/linux \
        `cat .mtlk_kernel_target` \      # this evaluates to: "modules"
        abs_srcdir=/home/user/wave300/tools/mtlkroot/linux/ \
        top_srcdir=../../../../../ \
        abs_top_builddir=/home/user/wave300/builds/ugw5.4-vrx288/ \
        abs_builddir=/home/user/wave300/builds/ugw5.4-vrx288/tools/mtlkroot/linux/ \
        top_builddir=../../../ \
        abs_top_srcdir=/home/user/wave300/ \
        srcdir=../../../../../tools/mtlkroot/linux/ \
        KERNELDIR=/home/user/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-5.4.137 \
        MTLK_KERNEL_CFLAGS="-mlong-calls" \
        ARCH=mips \
        CROSS_COMPILE="/home/user/wave300/support/ /home/user/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/bin/mips-*linux-" \
        LD_LIBRARY_PATH= \
&& { { test x"" != x"y"; } || echo lib.a > .built_binary_name; } 
&& { { test x"" = x"y"; } || echo mtlkroot.ko > .built_binary_name; } 
&& ( /home/user/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/bin/mips-*linux-strip -dx `cat .built_binary_name`; true) 
&& ( cp -R --remove-destination -p -u drv_toolchain_info /home/user/wave300/builds/ugw5.4-vrx288/tools/mtlkroot) 
&& cp -R --remove-destination -p -u `cat .built_binary_name` /home/user/wave300/builds/ugw5.4-vrx288/tools/mtlkroot/mtlkroot.ko || ( rm -f /home/user/wave300/builds/ugw5.4-vrx288/tools/mtlkroot/mtlkroot.ko && exit 11 ) 

The above command is almost the same when compiling against kernel 4.14 and gcc 7.5, except for those paths.

I am stuck on this for a month, need help, thx

p.s.: included the fix for the duplicate toolchain directories, that was shared on this thread

Made some progress, now it almost finish the compilation, its failing with lots of:

ERROR: "mtlk_aocs_set_measurement_window" [/home/user/wave300/builds/ugw5.4-vrx288/wireless/driver/linux/mtlk.ko] undefined!
ERROR: "mtlk_20_40_get_active_total_per_channel" [/home/user/wave300/builds/ugw5.4-vrx288/wireless/driver/linux/mtlk.ko] undefined!
ERROR: "mtlk_20_40_set_wait_for_scan_results_interval" [/home/user/wave300/builds/ugw5.4-vrx288/wireless/driver/linux/mtlk.ko] undefined!
ERROR: "mtlk_eeprom_get_lna_gain_bypass" [/home/user/wave300/builds/ugw5.4-vrx288/wireless/driver/linux/mtlk.ko] undefined!

This is probably because modpost is not exporting those symbols.

Beyond that, it will be required to convert 3 pieces of code that use old kernel timer, that I just "#if" it out.

Hello, Successfully compiled.

Now, we need to convert 3 pieces of code that use old kernel timer, that I just "#if" it out.

Hi, kernel 5 timer API included, could someone test it with OpenWrt 21+ ? thx

P.S: Would be good to hear the progress you got

1 Like

Hi, i can test the driver, is the script working?
i have the vr200v with wave300 for 2.4ghz only

Yes, unless some bug happens


Mtlk-root is loading, but insmod can't load the driver because of the missing symbols that I instructed kbuild to ignore, wich was the default behavior on previous kernels.

code for function mtlk_aocs_set_measurement_window

can found in repositories

I found the functions, If I remember correctly, they were in rflib, but the export macro was missing, I tried to export before reconfiguring kbuild flag.

Fixed, it was not missing the export, actually it was not including mltk_rtlib.a in the module ko file

1 Like

Working with OpenWrt 21.02.1

1 Like

Does the wifi work with or without encryption?

Yes, wpa/wpa2

Does that mean that, for example, this router now will have 2.4Ghz wireless support?

I was looking for some info on that model, and I found this table:

It says "unsupported wireless 2.4Ghz" and that it uses the WAVE 300 chip. Theoretically it should work now? I mean, it's current OS version is the 21.02.1

No and will not have

It's working, but not on the official distribution. For that it would be required some patches in the building for devices using wave300, and a feed for the driver.

To use the driver, you need to build: openwrt, the driver and hostapd, there are scripts for those tasks and to copy and configure everything.
And before that, you need to change the 5ghz name on luci, from wlan0 to wlan5.

Meu roteador foi comprado ali no py
Good luck


Hello everyone. I have a TP-Link W8980 with OpenWrt 19.07.2 (with the Wave 300 for the 5 ghz band).
More than an year ago I managed to read most of this topic, but now I see there is some interesting activity.
Can someone please provide an update on the status? I can make my device available for testing, as I'm not currently using it (I'm a developer, so quite into these topics even though my interests are slightly different; I never built openwrt by myself up until now, but I can sure give a try if needed).
I've also seen the W8980 page reports the 21.02.1 version as compatible, and it doesn't report the 5 ghz as unsupported. Should I try to update from v19?

Thanks in advance

I think @ahmar16 have a similar device.

You can do everything with the four scripts.

You could create a new summary post with the last recap from 28.02.2021, to make it easy for people starting now.

Another thing is to create a patch from the modified hostapd and the original v2.7. Then try to apply it inside the current openwrt hostapd.

Yeat another thing, is to check if all the modification by @suleiman are required on openwrt build.

Good luck

Thx i have make package feeds from your work:

It can be build with the 21.02.2 SDK

It works on the Speedport W921v but only one wlan device with 5GHz only.

1 Like