[BPI-R2] internal Wifi/BT (MT6625L) - Kernel

There are a couple things we can try.

Since I don’t know how UINT_8 is typed in your defines. Try this:

typedef struct _BOW_LINK_CONNECTED {
        CHANNEL_DESC rChannel;
        UINT_8 aucReserved;
        uint8_t aucPeerAddress[6];
} BOW_LINK_CONNECTED, *P_BOW_LINK_CONNECTED;

If that doesn’t work, try this:

typedef struct _BOW_LINK_CONNECTED {
        CHANNEL_DESC rChannel;
        UINT_8 aucReserved;
        union {
                unsigned char aucPeerAddress[6];
                uint16_t kludge[3];
        };
} BOW_LINK_CONNECTED, *P_BOW_LINK_CONNECTED;

For code-sections select text and use <> button (empty line before and after the codeblock needed)

The linker-errors are fixed…seems to build with gcc 4.8

Fixed indent, thanks

back to ubuntu 18.4, found crosscompiler…

arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabihf/7/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 7.3.0-16ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --with-as=/usr/bin/arm-linux-gnueabihf-as --with-ld=/usr/bin/arm-linux-gnueabihf-ld --program-suffix=-7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-multilib --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf- --includedir=/usr/arm-linux-gnueabihf/include
Thread model: posix
gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-16ubuntu3) 

strange, now the message of missing stdarg is coming again…

./include/linux/string.h:9:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>

tried -I/usr/lib/gcc-cross/arm-linux-gnueabihf/7/include/ in CFLAGS, but it seems not working…it looks like exported CFLAGS is ignored…after looking through the huge makefile it seems that the param is now named KCFLAGS…

there are many errors compiling with gcc7…build.log (10,7 KB) => made “make clean” and now i’m on the point of the last error “stringop-overflow=”

@dsiq your first example results in same error, second is a bit different:

drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c: In function 'nicRxProcessEventPacket':
drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h:851:53: error: 'memset' writing 6 bytes into a region of size 4 overflows the destination [-Werror=stringop-overflow=]
 #define kalMemZero(pvAddr, u4Size)                  memset(pvAddr, 0, u4Size)
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c:2084:5: note: in expansion of macro 'kalMemZero'
     kalMemZero(prBowLinkConnected->aucPeerAddress, MAC_ADDR_LEN); /* @FIXME */
     ^~~~~~~~~~

Ah ok, this is a linaro release. Makes sense. I would suggest filing a bug with linaro, they have an online bug tracking system. File it with the original code lines.

Another thing to try is, change unsigned char back to UINT8_T and then do: kalMemZero(prBowLinkConnected->kludge, MAC_ADDR_LEN);

typedef struct _BOW_LINK_CONNECTED {
        CHANNEL_DESC rChannel;
        UINT_8 aucReserved;
        union {
                UINT_8 aucPeerAddress[6];
                uint16_t kludge[3];
        };
} BOW_LINK_CONNECTED, *P_BOW_LINK_CONNECTED;

kalMemZero(prBowLinkConnected->kludge, MAC_ADDR_LEN);   /* @FIXME */


drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h:851:53: error: 'memset' writing 6 bytes into a region of size 4 overflows the destination [-Werror=stringop-overflow=]
 #define kalMemZero(pvAddr, u4Size)                  memset(pvAddr, 0, u4Size)
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c:2084:5: note: in expansion of macro 'kalMemZero'
     kalMemZero(prBowLinkConnected->kludge, MAC_ADDR_LEN); /* @FIXME */
     ^~~~~~~~~~

linaro-bug-report (hoping it’s correct): https://bugs.linaro.org/show_bug.cgi?id=3823

apt-get install gcc-5-arm-linux-gnueabihf
update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-7  50
update-alternatives: using /usr/bin/arm-linux-gnueabihf-gcc-7 to provide /usr/bin/arm-linux-gnueabihf-gcc (arm-linux-gnueabihf-gcc) in auto mode
update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-5  100
update-alternatives: using /usr/bin/arm-linux-gnueabihf-gcc-5 to provide /usr/bin/arm-linux-gnueabihf-gcc (arm-linux-gnueabihf-gcc) in auto mode

update-alternatives --config arm-linux-gnueabihf-gcc

now i can compile it without this annoying error…not the best way but better than switching between 14.4 and 18.4

since compiled kernel does not boot and no output on terminal i created new branch from 4.16-main which is booting and merged changes to it

but this does not found include/linux/soc/mediatek/pmic_wrap.h which is there

drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/mtk_wcn_consys_hw.c:32:36: fatal error: soc/mediatek/pmic_wrap.h: No such file or directory
compilation terminated.

Replace #include <soc/mediatek/pmic_wrap.h> with #include <linux/soc/mediatek/pmic_wrap.h>

Then it should build :wink:

thank you…i have moved the file :wink:

first boot with this kernel:

[   71.845717] Internal error: Oops: 17 [#1] SMP ARM                                                                                                           
[   71.850809] Modules linked in: mt7530 dsa_core bridge mtk_thermal thermal_sys spi_mt65xx mt6577_auxadc pwm_mediatek fuse ipv6                                    
[   71.862117] CPU: 0 PID: 950 Comm: mtk_wmtd Not tainted 4.16.7-bpi-r2-wlan #199                                                                                   
[   71.869293] Hardware name: Mediatek Cortex-A7 (Device Tree)                                                                                                      
[   71.874838] PC is at regulator_set_mode+0x18/0xb4                                                                                                                
[   71.879512] LR is at mtk_wcn_consys_hw_reg_ctrl+0x118/0x68c                                                                                                      
[   71.885045] pc : [<c045d5b0>]    lr : [<c04fbb38>]    psr: 600f0013                                                                                              
[   71.891265] sp : d9f69d60  ip : d9f69d88  fp : d9f69d84                                                                                                          
[   71.896451] r10: 00000001  r9 : 00000000  r8 : 00000001                                                                                                          
[   71.901639] r7 : 00000000  r6 : c0f54b50  r5 : c1036d10  r4 : c0f8fda0                                                                                           
[   71.908119] r3 : f97fbb29  r2 : f97fbb29  r1 : 00000008  r0 : 00000000                                                                                           
[   71.914601] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none                                                                                    
[   71.921685] Control: 10c5387d  Table: 9c68806a  DAC: 00000051                                                                                                    
[   71.927394] Process mtk_wmtd (pid: 950, stack limit = 0x17cc419c)                                                                                                
[   71.933445] Stack: (0xd9f69d60 to 0xd9f6a000)                                                                                                                    
[   71.937775] 9d60: 00000000 c0f8fda0 d9f69dc4 c0f8fda0 c1036d10 c0f54b50 d9f69dc4 d9f69d88                                                                        
[   71.945899] 9d80: c04fbb38 c045d5a4 00000000 00000000 00000000 00000000 00000000 c0f54b50                                                                        
[   71.954024] 9da0: 00000000 d9f69eac c0bfbc58 00000000 00000000 00000001 d9f69ddc d9f69dc8                                                                        
[   71.962150] 9dc0: c04fc260 c04fba2c c0f54b3c c0f901a8 d9f69df4 d9f69de0 c04fe058 c04fc21c                                                                        
[   71.970275] 9de0: c0f04c48 d9f69eb0 d9f69e04 d9f69df8 c04da030 c04fdfc4 d9f69e14 d9f69e08                                                                        
[   71.978401] 9e00: c04da11c c04d9fd4 d9f69e9c d9f69e18 c04d64c0 c04da0e4 c0e9cb80 c014a71c                                                                        
[   71.986526] 9e20: ffffffff c014a71c 00000001 00000000 00000000 c0113370 c0f00018 d9150b80                                                                        
[   71.994651] 9e40: 00000001 dec4f8c0 dc2328c0 c0f08200 df7aab80 d9150b80 00000000 dc2328c0                                                                        
[   72.002777] 9e60: c1036ce0 d9150ee8 d9f69edc f97fbb29 c0925ff4 00000002 c0a3a400 c0ff2f64                                                                        
[   72.010902] 9e80: c0bfbc58 c0c10310 c0bfdbb0 c0ff3c18 d9f69ee4 d9f69ea0 c04d85c8 c04d6470                                                                        
[   72.019028] 9ea0: c0f04c48 c0bfbc9c d9f69ef4 00000000 00000000 f97fbb29 c0ff3514 c0ff2f64                                                                        
[   72.027153] 9ec0: 00000000 c0ff3514 c0ff3c18 c04dd454 c1036ce0 c0ff3530 d9f69f14 d9f69ee8                                                                        
[   72.035279] 9ee0: c04d87cc c04d8538 d9f69f34 d9f69ef8 c04edb7c c0ff3c18 c0ff34ec c0ff3514                                                                        
[   72.043404] 9f00: d9f68000 c04dd454 d9f69f24 d9f69f18 c04d63d8 c04d877c d9f69f34 d9f69f28                                                                        
[   72.051530] 9f20: c04d6424 c04d63b0 d9f69f74 d9f69f38 c04dfbb0 c04d6404 c0c01bd0 c0c01c3c                                                                        
[   72.059655] 9f40: c0c01bf8 00000000 db514fdc db514fc0 dc452140 00000000 d9f68000 c0ff34ec                                                                        
[   72.067781] 9f60: db514fdc db31bd9c d9f69fac d9f69f78 c0148cf0 c04dfa1c 00000000 c04dfa10                                                                        
[   72.075906] 9f80: d9f69fac dc452140 c0148bb0 00000000 00000000 00000000 00000000 00000000                                                                        
[   72.084031] 9fa0: 00000000 d9f69fb0 c01010e8 c0148bbc 00000000 00000000 00000000 00000000                                                                        
[   72.092155] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                                                        
[   72.100280] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000                                                                        
[   72.108418] [<c045d5b0>] (regulator_set_mode) from [<c04fbb38>] (mtk_wcn_consys_hw_reg_ctrl+0x118/0x68c)                                                         
[   72.117842] [<c04fbb38>] (mtk_wcn_consys_hw_reg_ctrl) from [<c04fc260>] (mtk_wcn_consys_hw_pwr_on+0x50/0xc4)                                                     
[   72.127609] [<c04fc260>] (mtk_wcn_consys_hw_pwr_on) from [<c04fe058>] (wmt_plat_pwr_ctrl+0xa0/0x124)                                                             
[   72.136687] [<c04fe058>] (wmt_plat_pwr_ctrl) from [<c04da030>] (wmt_ctrl_hw_pwr_on+0x68/0x88)                                                                    
[   72.145160] [<c04da030>] (wmt_ctrl_hw_pwr_on) from [<c04da11c>] (wmt_ctrl+0x44/0xc0)                                                                             
[   72.152854] [<c04da11c>] (wmt_ctrl) from [<c04d64c0>] (wmt_core_ctrl+0x5c/0xe8)                                                                                  
[   72.160118] [<c04d64c0>] (wmt_core_ctrl) from [<c04d85c8>] (opfunc_pwr_on+0x9c/0x244)                                                                            
[   72.167900] [<c04d85c8>] (opfunc_pwr_on) from [<c04d87cc>] (opfunc_func_on+0x5c/0x348)                                                                           
[   72.175767] [<c04d87cc>] (opfunc_func_on) from [<c04d63d8>] (wmt_core_opid_handler+0x34/0x54)                                                                    
[   72.184238] [<c04d63d8>] (wmt_core_opid_handler) from [<c04d6424>] (wmt_core_opid+0x2c/0x6c)                                                                     
[   72.192624] [<c04d6424>] (wmt_core_opid) from [<c04dfbb0>] (wmtd_thread+0x1a0/0x254)                                                                             
[   72.200323] [<c04dfbb0>] (wmtd_thread) from [<c0148cf0>] (kthread+0x140/0x170)                                                                                   
[   72.207504] [<c0148cf0>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)                                                                                   
[   72.214676] Exception stack(0xd9f69fb0 to 0xd9f69ff8)                                                                                                            
[   72.219692] 9fa0:                                     00000000 00000000 00000000 00000000                                                                        
[   72.227817] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                                                        
[   72.235941] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000                                                                                          
[   72.242513] Code: e24cb004 e24dd00c e52de004 e8bd4000 (e5904050)                                                                                                 
ep 2                                                                                                                                                                
                                                                                                                                                                    
Messag[   72.248750] ---[ end trace 7979ff367be9ad55 ]---                                                                                                           
e from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                        
 kernel:[   71.845717] Internal error: Oops: 17 [#1] SMP ARM                                                                                                        
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   71.927394] Process mtk_wmtd (pid: 950, stack limit = 0x17cc419c)                                                                                        
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   71.933445] Stack: (0xd9f69d60 to 0xd9f6a000)                                                                                                            
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   71.937775] 9d60: 00000000 c0f8fda0 d9f69dc4 c0f8fda0 c1036d10 c0f54b50 d9f69dc4 d9f69d88                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   71.945899] 9d80: c04fbb38 c045d5a4 00000000 00000000 00000000 00000000 00000000 c0f54b50                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   71.954024] 9da0: 00000000 d9f69eac c0bfbc58 00000000 00000000 00000001 d9f69ddc d9f69dc8                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   71.962150] 9dc0: c04fc260 c04fba2c c0f54b3c c0f901a8 d9f69df4 d9f69de0 c04fe058 c04fc21c                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   71.970275] 9de0: c0f04c48 d9f69eb0 d9f69e04 d9f69df8 c04da030 c04fdfc4 d9f69e14 d9f69e08                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   71.978401] 9e00: c04da11c c04d9fd4 d9f69e9c d9f69e18 c04d64c0 c04da0e4 c0e9cb80 c014a71c                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   71.986526] 9e20: ffffffff c014a71c 00000001 00000000 00000000 c0113370 c0f00018 d9150b80                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   71.994651] 9e40: 00000001 dec4f8c0 dc2328c0 c0f08200 df7aab80 d9150b80 00000000 dc2328c0                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.002777] 9e60: c1036ce0 d9150ee8 d9f69edc f97fbb29 c0925ff4 00000002 c0a3a400 c0ff2f64                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.010902] 9e80: c0bfbc58 c0c10310 c0bfdbb0 c0ff3c18 d9f69ee4 d9f69ea0 c04d85c8 c04d6470                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.019028] 9ea0: c0f04c48 c0bfbc9c d9f69ef4 00000000 00000000 f97fbb29 c0ff3514 c0ff2f64                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.027153] 9ec0: 00000000 c0ff3514 c0ff3c18 c04dd454 c1036ce0 c0ff3530 d9f69f14 d9f69ee8                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.035279] 9ee0: c04d87cc c04d8538 d9f69f34 d9f69ef8 c04edb7c c0ff3c18 c0ff34ec c0ff3514                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.043404] 9f00: d9f68000 c04dd454 d9f69f24 d9f69f18 c04d63d8 c04d877c d9f69f34 d9f69f28                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.051530] 9f20: c04d6424 c04d63b0 d9f69f74 d9f69f38 c04dfbb0 c04d6404 c0c01bd0 c0c01c3c                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.059655] 9f40: c0c01bf8 00000000 db514fdc db514fc0 dc452140 00000000 d9f68000 c0ff34ec                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.067781] 9f60: db514fdc db31bd9c d9f69fac d9f69f78 c0148cf0 c04dfa1c 00000000 c04dfa10                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.075906] 9f80: d9f69fac dc452140 c0148bb0 00000000 00000000 00000000 00000000 00000000                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.084031] 9fa0: 00000000 d9f69fb0 c01010e8 c0148bbc 00000000 00000000 00000000 00000000                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.092155] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.100280] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000                                                                
                                                                                                                                                                    
Message from syslogd@bpi-r2 at Apr 17 20:05:25 ...                                                                                                                  
 kernel:[   72.242513] Code: e24cb004 e24dd00c e52de004 e8bd4000 (e5904050)                                                                                         
+ sleep 5                                                                                                                                                           
+ stp_uart_launcher -p /etc/firmware                                                                                                                                
open device node[   73.856797] [WMT-PLAT][W]wmt_plat_wake_lock_ctrl:WMT-PLAT: wakelock status(1), counter(2)                                                        
 succeed.(Node:/dev/stpwmt, fd:3)                                                                                                                                   
chip id is 0x7623                                                                                                                                                   
chiId:0x7623, setting to property((null))                                                                                                                           
chiId:0x7623                                                                                                                                                        
run SOC chip flow                                                                                                                                                   
create pwr on thread ok                                                                                                                                             
+ echo 0                                                                                                                                                            
[   78.853730] [MTK-WIFI] WIFI_open: WIFI_open: major 155 minor 0 (pid 924)                                                                                         
[   78.861250] [MTK-WIFI] WIFI_write: WIFI_write 0                                                                                                                  
[   78.861250]                                                                                                                                                      
[   78.867262] [MTK-WIFI] WIFI_write: WIFI is already power off!                                                                                                    
[   78.873000] [MTK-WIFI] WIFI_close: WIFI_close: major 155 minor 0 (pid 924)                                                                                       
+ sleep 5                                                                                                                                                           
+ echo A                                                                                                                                                            
[   83.884110] [MTK-WIFI] WIFI_open: WIFI_open: major 155 minor 0 (pid 924)                                                                                         
[   83.891572] [MTK-WIFI] WIFI_write: WIFI_write A                                                                                                                  
[   83.891572]                                                                                                                                                      
[   83.897590] [WMT-PLAT][W]wmt_plat_wake_lock_ctrl:WMT-PLAT: wakelock status(1), counter(3)

You have to update dts file too, for example I don’t see any reference to vcn18 in your arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts

damn…had forgotten to add them…now all nodes should be there, but kernel crashes again

[   81.563249] [<c045d32c>] (regulator_ops_is_valid) from [<c045f334>] (regulator_set_voltage_unlocked+0x44/0x33c)                                                  
[   81.573277] [<c045f334>] (regulator_set_voltage_unlocked) from [<c045f668>] (regulator_set_voltage+0x3c/0x68)                                                    
[   81.583131] [<c045f668>] (regulator_set_voltage) from [<c04fbed4>] (mtk_wcn_consys_hw_reg_ctrl+0x4b4/0x68c)                                                      
[   81.592812] [<c04fbed4>] (mtk_wcn_consys_hw_reg_ctrl) from [<c04fc260>] (mtk_wcn_consys_hw_pwr_on+0x50/0xc4)                                                     
[   81.602578] [<c04fc260>] (mtk_wcn_consys_hw_pwr_on) from [<c04fe058>] (wmt_plat_pwr_ctrl+0xa0/0x124)                                                             
[   81.611656] [<c04fe058>] (wmt_plat_pwr_ctrl) from [<c04da030>] (wmt_ctrl_hw_pwr_on+0x68/0x88)                                                                    
[   81.620128] [<c04da030>] (wmt_ctrl_hw_pwr_on) from [<c04da11c>] (wmt_ctrl+0x44/0xc0)                                                                             
[   81.627823] [<c04da11c>] (wmt_ctrl) from [<c04d64c0>] (wmt_core_ctrl+0x5c/0xe8)                                                                                  
[   81.635087] [<c04d64c0>] (wmt_core_ctrl) from [<c04d85c8>] (opfunc_pwr_on+0x9c/0x244)                                                                            
[   81.642868] [<c04d85c8>] (opfunc_pwr_on) from [<c04d87cc>] (opfunc_func_on+0x5c/0x348)                                                                           
[   81.650735] [<c04d87cc>] (opfunc_func_on) from [<c04d63d8>] (wmt_core_opid_handler+0x34/0x54)                                                                    
[   81.659207] [<c04d63d8>] (wmt_core_opid_handler) from [<c04d6424>] (wmt_core_opid+0x2c/0x6c)                                                                     
[   81.667593] [<c04d6424>] (wmt_core_opid) from [<c04dfbb0>] (wmtd_thread+0x1a0/0x254)                                                                             
[   81.675291] [<c04dfbb0>] (wmtd_thread) from [<c0148cf0>] (kthread+0x140/0x170)                                                                                   
[   81.682472] [<c0148cf0>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)     
...
+ stp_uart_launcher -p /etc/firmware                                                                                                                                
open device node[   83.276226] [WMT-PLAT][W]wmt_plat_wake_lock_ctrl:WMT-PLAT: wakelock status(1), counter(2)                                                        
 succeed.(Node:/dev/stpwmt, fd:3)                                                                                                                                   
chip id is 0x7623                                                                                                                                                   
chiId:0x7623, setting to property((null))                                                                                                                           
chiId:0x7623                                                                                                                                                        
run SOC chip flow                                                                                                                                                   
create pwr on thread ok                                                                                                                                             
+ echo 0                                                                                                                                                            
[   88.272752] [MTK-WIFI] WIFI_open: WIFI_open: major 155 minor 0 (pid 995)                                                                                         
[   88.280310] [MTK-WIFI] WIFI_write: WIFI_write 0                                                                                                                  
[   88.280310]                                                                                                                                                      
[   88.286315] [MTK-WIFI] WIFI_write: WIFI is already power off!                                                                                                    
[   88.292065] [MTK-WIFI] WIFI_close: WIFI_close: major 155 minor 0 (pid 995)                                                                                       
+ sleep 5                                                                                                                                                           
+ echo A                                                                                                                                                            
[   93.303183] [MTK-WIFI] WIFI_open: WIFI_open: major 155 minor 0 (pid 995)                                                                                         
[   93.310706] [MTK-WIFI] WIFI_write: WIFI_write A                                                                                                                  
[   93.310706]                                                                                                                                                      
[   93.316715] [WMT-PLAT][W]wmt_plat_wake_lock_ctrl:WMT-PLAT: wakelock status(1), counter(3)

regulator is available

[21:52] root@bpi-r2:~# ls /sys/kernel/debug/regulator/                          
reg-dummy-regulator-dummy  vcamaf  vcn33_bt    vgp3   vmc    vrtc   vusb        
regulator_summary          vcamd   vcn33_wifi  vibr   vmch   vsim1              
supply_map                 vcamio  vemc3v3     vio18  vpa    vsim2              
va                         vcn18   vgp1        vio28  vproc  vsys               
vcama                      vcn28   vgp2        vm     vrf18  vtcxo      

the other dts-nodes should be here:

[11:47] root@bpi-r2:~# ls /sys/firmware/devicetree/base/                        
adc@11001000                   interrupt-parent  #size-cells                    
#address-cells                 leds              spi@1100a000                   
aliases                        memory            spi@11014000                   
audio-controller@11220000      memory@80000000   spi@11016000                   
btif@1100c000                  mmc@11230000      spi@11017000                   
btif_rx@11000800               mmc@11240000      syscfg@10005000                
btif_tx@11000780               model             syscon@10000000                
chosen                         name              syscon@10001000                
cir@10013000                   nfi@1100d000      syscon@10003000                
compatible                     opp-table         syscon@10209000                
consys@18070000                oscillator@0      syscon@1a000000                
cpus                           oscillator@1      syscon@1b000000                
crypto@1b240000                pinctrl@10005000  thermal@1100b000               
dma-controller@1b007000        pwm@11006000      thermal-zones                  
dummy13m                       pwrap@1000d000    timer                          
ecc@1100e000                   regulator-3p3v    timer@10008000                 
efuse@10206000                 regulator-5v      usb@1a1c0000                   
ethernet@1b100000              reserved-memory   usb@1a240000                   
gpio-keys                      rng@1020f000      usb-phy@1a1c4000               
i2c@11007000                   scpsys@10006000   usb-phy@1a244000               
i2c@11008000                   serial@11002000   watchdog@10007000              
i2c@11009000                   serial@11003000   wifi@180f0000                  
interrupt-controller@10200100  serial@11004000                                  
interrupt-controller@10211000  serial@11005000

Crap, I’m not good at all with regulators, I’m not sure I’m able to help you with this… Could you please attach the full dmesg? (after the crash)

Should i enable more debugging-infos in code (#DEBUG or similar)?

Let’s try without them, however it’s better if you enable them

ok first without additional debugging: dmesg-wifi-4.16.txt (65,1 KB)

where and how enable debug?

Maybe there are still issues with .dts file, do you have following errors in 4.14 too?

[ 55.711881] [WMT-CONSYS-HW][E]mtk_wmt_probe(123):Wmt Cannot find pinctrl default!
[ 55.712163] [WMT-CONSYS-HW][E]mtk_wmt_probe(171):CanNot get consys reset. ret=-517

First error is also in 4.14,second not

[   84.195102] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6630.defAnt'.[   84.198770] [WMT-CONSYS-HW][E]mtk_wmt_probe(122):Wmt Cannot find pinctrl default!
[   84.199938] [WMT-MOD-INIT][I]do_common_drv_init:finish common driver init
[   84.205259] [WLAN-MOD-INIT][I]do_wlan_drv_init:WMT-WIFI char dev init, ret:0
[   84.206937] [WMT-CONSYS-HW][E]mtk_wcn_consys_hw_reg_ctrl(301):Read CONSYS chipId(0xfffff093)
[   84.208322] [WMT-DETECT][I]wmt_detect_close:close major 154 minor 0 (pid 2006)
[   84.312027] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6620.defAnt'.
[   84.312041] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6628.defAnt'.
[   84.312047] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6630.defAnt'.
[   84.312264] [WMT-CORE][E]wmt_core_stp_init(648):WMT-CORE: no hif info!
[   84.312276] [WMT-CORE][E]opfunc_pwr_on(918):WMT-CORE: wmt_core_stp_init fail (-1)
[   84.312290] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(5), type(1), val
ue(0) iRet:(-1)
[   84.312301] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(5), type(0), val
ue(0) iRet:(-1)
[   84.312315] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(3), type(0), val
ue(0) iRet:(-2)
[   84.314135] [WMT-CONSYS-HW][E]mtk_wcn_consys_hw_reg_ctrl(301):Read CONSYS chipId(0xfffff093)
[   84.421899] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6620.defAnt'.
[   84.421911] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6628.defAnt'.
[   84.421918] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6630.defAnt'.
[   84.422132] [WMT-CORE][E]wmt_core_stp_init(648):WMT-CORE: no hif info!
[   84.422145] [WMT-CORE][E]opfunc_pwr_on(918):WMT-CORE: wmt_core_stp_init fail (-1)
[   84.422158] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(5), type(1), val
ue(0) iRet:(-1)
[   84.422169] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(5), type(0), val
ue(0) iRet:(-1)
[   84.422183] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(3), type(0), val
ue(0) iRet:(-2)
[   84.423997] [WMT-CONSYS-HW][E]mtk_wcn_consys_hw_reg_ctrl(301):Read CONSYS chipId(0xfffff093)
[   84.531911] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6620.defAnt'.
[   84.531924] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6628.defAnt'.
[   84.531931] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6630.defAnt'.
[   84.532165] [WMT-CORE][E]wmt_core_stp_init(648):WMT-CORE: no hif info!
[   84.532177] [WMT-CORE][E]opfunc_pwr_on(918):WMT-CORE: wmt_core_stp_init fail (-1)
[   84.532192] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(5), type(1), val
ue(0) iRet:(-1)
[   84.532203] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(5), type(0), val
ue(0) iRet:(-1)
[   84.532216] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(3), type(0), val
ue(0) iRet:(-2)
[   84.532436] [WMT-CORE][E]opfunc_func_on(1025):func(0) pwr_on fail(-2)
[   87.226875] [WMT-CORE][E]opfunc_hif_conf(874):WMT-CORE: WMT HIF info added
[   87.228676] [WMT-CONSYS-HW][E]mtk_wcn_consys_hw_reg_ctrl(301):Read CONSYS chipId(0xfffff093)
[   87.331915] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6620.defAnt'.
[   87.331928] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6628.defAnt'.
[   87.331935] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field '#mt6630.defAnt'.
[   93.562904] [MTK-WIFI] WIFI_write: WMT turn on WIFI success!

In your mt7623.dtsi there are two watchdog entries, remove one of them (use the one from your 4.14) and then retry :wink:

unfortunately the fixes not the crash

[  111.412955] [WMT-DETECT][I]wmt_detect_open:open major 154 minor 0 (pid 1021)                                                                                                                            
[  111.412989] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (-2147191037),arg(0)                                                                                                                           
[  111.413080] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (1074034433),arg(30243)                                                                                                                        
[  111.413086] set current consys chipid (0x7623)                                                                                                                                                          
[  111.413101] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (-2147191036),arg(30243)                                                                                                                       
[  111.413107] [WMT-MOD-INIT][I]do_common_drv_init:start to do common driver init, chipid:0x00007623                                                                                                       
[  111.419033] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAnt'.                                                                                                                        
[  111.419047] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAnt'.                                                                                                                        
[  111.419054] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAnt'.                                                                                                                        
[  111.419569] [WMT-CONSYS-HW][D]mtk_wcn_consys_hw_init:Get mcu register base(0xe2749000)                                                                                                                  
[  111.419585] [WMT-CONSYS-HW][D]mtk_wcn_consys_hw_init:Get topckgen register base(0xe274c000)                                                                                                             
[  111.419590] [WMT-CONSYS-HW][D]mtk_wcn_consys_hw_init:get consys start phy address(0xffe00000)                                                                                                           
[  111.419597] [WMT-CONSYS-HW][I]mtk_wcn_consys_hw_init:CONSYS_EMI_MAPPING dump(0x00001ffe)                                                                                                                
[  111.419612] [WMT-CONSYS-HW][I]mtk_wcn_consys_hw_init:EMI mapping OK(0xdc72ab8e)                                                                                                                         
[  111.421429] [WMT-CONSYS-HW][E]mtk_wmt_probe(125):Wmt Cannot find pinctrl default!                                                                                                                       
[  111.421469] [WMT-CONSYS-HW][D]mtk_wmt_probe:[CCF]clk_infra_conn_main=9935e532                                                                                                                           
[  111.421691] [WMT-CONSYS-HW][E]mtk_wmt_probe(173):CanNot get consys reset. ret=-517                                                                                                                      
[  111.422589] [WMT-MOD-INIT][I]do_common_drv_init:finish common driver init                                                                                                                               
[  111.422596] [BT-MOD-INIT][I]do_bluetooth_drv_init:start to do bluetooth driver init                                                                                                                     
[  111.424267] [MTK-BT] BT_init: mtk_stp_BT_chrdev driver(major 192) installed                                                                                                                             
[  111.425132] [BT-MOD-INIT][I]do_bluetooth_drv_init:finish bluetooth driver init, i_ret:0                                                                                                                 
[  111.425140] [GPS-MOD-INIT][I]do_gps_drv_init:CONFIG_MTK_COMBO_GPS is not defined                                                                                                                        
[  111.425146] [WCN-MOD-INIT][E]do_connectivity_driver_init(62):do common driver init failed, ret:-1                                                                                                       
[  111.425150] [FM-MOD-INIT][I]do_fm_drv_init:start to do fm module init                                                                                                                                   
[  111.425153] [FM-MOD-INIT][I]do_fm_drv_init:finish fm module init                                                                                                                                        
[  111.425158] [WLAN-MOD-INIT][I]do_wlan_drv_init:start to do wlan module init 0x7623                                                                                                                      
[  111.425657] [MTK-WIFI] WIFI_init: mtk_wmt_WIFI_chrdev driver(major 155) installed.                                                                                                                      
[  111.425666] [WLAN-MOD-INIT][I]do_wlan_drv_init:WMT-WIFI char dev init, ret:0                                                                                                                            
[  111.426112] [WMT-CONSYS-HW][I]mtk_wcn_consys_hw_pwr_on:CONSYS-HW-PWR-ON, start                                                                                                                          
[  111.426124] [WMT-CONSYS-HW][D]mtk_wcn_consys_hw_reg_ctrl:CONSYS-HW-REG-CTRL(0x00000001),start                                                                                                           
[  111.426129] [WMT-CONSYS-HW][D]mtk_wcn_consys_hw_reg_ctrl:++                                                                                                                                             
[  111.426133] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 237                                                                                                                                                
[  111.426200] Unable to handle kernel NULL pointer dereference at virtual address 00000040                                                                                                                
[  111.426211] pgd = 4194e7ca                                                                                                                                                                              
[  111.426216] [00000040] *pgd=00000000                                                                                                                                                                    
[  111.426229] Internal error: Oops: 17 [#1] SMP ARM                                                                                                                                                       
[  111.426665] [WLAN-MOD-INIT][I]do_wlan_drv_init:WLAN-GEN2 driver init, ret:0                                                                                                                             
[  111.430922] Modules linked in: mt7530 dsa_core bridge mtk_thermal thermal_sys pwm_mediatek spi_mt65xx mt6577_auxadc fuse ipv6                                                                           
[  111.437905] [WLAN-MOD-INIT][I]do_wlan_drv_init:finish wlan module init                                                                                                                                  
[  111.449217] CPU: 2 PID: 1026 Comm: mtk_wmtd Not tainted 4.16.7-bpi-r2-wlan #203                                                                                                                         
[  111.449222] Hardware name: Mediatek Cortex-A7 (Device Tree)                                                                                                                                             
[  111.449239] PC is at mutex_lock+0x28/0x54                                                                                                                                                               
[  111.449263] LR is at regulator_set_mode+0x2c/0xb4                                                                                                                                                       
[  111.456263] xhci-mtk 1a240000.usb: fail to get vbus                                                                                                                                                     
[  111.463100] pc : [<c0928a4c>]    lr : [<c045d5c4>]    psr: 600f0013                                                                                                                                     
[  111.469041] xhci-mtk 1a1c0000.usb: fail to get vbus                                                                                                                                                     
[  111.472628] sp : db1d9d50  ip : db1d9d60  fp : db1d9d5c                                                                                                                                                 
[  111.478074] mt7623consys 18070000.consys: Unbalanced pm_runtime_enable!                                                                                                                                 
[  111.482157] r10: 00000001  r9 : 00000000  r8 : 00000001                                                                                                                                                 
[  111.488418] [WMT-CONSYS-HW][E]mtk_wmt_probe(125):Wmt Cannot find pinctrl default!                                                                                                                       
[  111.493218] r7 : 00000000  r6 : c0f54b50  r5 : 00000040  r4 : 00000000                                                                                                                                  
[  111.498470] [WMT-CONSYS-HW][D]mtk_wmt_probe:[CCF]clk_infra_conn_main=a55ffa25                                                                                                                           
[  111.504965] r3 : db21ed40  r2 : f97fbb29  r1 : 00000008  r0 : 00000040                                                                                                                                  
[  111.504974] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none                                                                                                                           
[  111.511839] [WMT-CONSYS-HW][E]mtk_wmt_probe(173):CanNot get consys reset. ret=-517                                                                                                                      
[  111.513156] [WMT-DETECT][I]wmt_detect_close:close major 154 minor 0 (pid 1021)                                                                                                                          
[  111.520344] Control: 10c5387d  Table: 9c75c06a  DAC: 00000051                                                                                                                                           
[  111.520358] Process mtk_wmtd (pid: 1026, stack limit = 0x7051c667)                                                                                                                                      
[  111.520363] Stack: (0xdb1d9d50 to 0xdb1da000)                                                                                                                                                           
[  111.520371] 9d40:                                     db1d9d84 db1d9d60 c045d5c4 c0928a30                                                                                                               
[  111.520381] 9d60: db1d9d58 00000008 db1d9dc4 c0f8fda0 c1036d10 c0f54b50 db1d9dc4 db1d9d88                                                                                                               
[  111.606835] 9d80: c04fbb88 c045d5a4 db1d9db4 df7cbbc0 dc7e6800 f14dc2b4 00000019 c0f54b50                                                                                                               
[  111.616314] 9da0: 00000000 db1d9eac c0bfbc58 00000000 00000000 00000001 db1d9ddc db1d9dc8                                                                                                               
[  111.625796] 9dc0: c04fc25c c04fba24 c0f54b3c c0f901a8 db1d9df4 db1d9de0 c04fe004 c04fc204                                                                                                               
[  111.635275] 9de0: c0f04c48 db1d9eb0 db1d9e04 db1d9df8 c04da030 c04fdf70 db1d9e14 db1d9e08                                                                                                               
[  111.644756] 9e00: c04da11c c04d9fd4 db1d9e9c db1d9e18 c04d64c0 c04da0e4 c0e9cb80 c014a71c                                                                                                               
[  111.654237] 9e20: ffffffff c014a71c 00000001 00000000 00000000 c0113370 db26e018 db21ed40                                                                                                               
[  111.663718] 9e40: 00000002 db21bf40 dc1448c0 dc7e6780 df7cbb80 db21ed40 dd834fc0 dc1448c0                                                                                                               
[  111.673198] 9e60: c1036ce0 db21f0a8 db1d9edc f97fbb29 c0925fb4 00000002 c0a3a400 c0ff2f64                                                                                                               
[  111.682679] 9e80: c0bfbc58 c0c10310 c0bfdbb0 c0ff3c18 db1d9ee4 db1d9ea0 c04d85c8 c04d6470                                                                                                               
[  111.692160] 9ea0: c0f04c48 c0bfbc9c db1d9ef4 00000000 00000000 f97fbb29 c0ff3514 c0ff2f64                                                                                                               
[  111.701640] 9ec0: 00000000 c0ff3514 c0ff3c18 c04dd454 c1036ce0 c0ff3530 db1d9f14 db1d9ee8                                                                                                               
[  111.711121] 9ee0: c04d87cc c04d8538 db1d9f34 db1d9ef8 c04edb7c c0ff3c18 c0ff34ec c0ff3514                                                                                                               
[  111.720602] 9f00: db1d8000 c04dd454 db1d9f24 db1d9f18 c04d63d8 c04d877c db1d9f34 db1d9f28                                                                                                               
[  111.730082] 9f20: c04d6424 c04d63b0 db1d9f74 db1d9f38 c04dfbb0 c04d6404 c0c01bd0 c0c01c3c                                                                                                               
[  111.739562] 9f40: c0c01bf8 00000000 dc68515c dc685140 deae7640 00000000 db1d8000 c0ff34ec                                                                                                               
[  111.749043] 9f60: dc68515c dc747d9c db1d9fac db1d9f78 c0148cf0 c04dfa1c 00000000 c04dfa10                                                                                                               
[  111.758523] 9f80: db1d9fac deae7640 c0148bb0 00000000 00000000 00000000 00000000 00000000                                                                                                               
[  111.768003] 9fa0: 00000000 db1d9fb0 c01010e8 c0148bbc 00000000 00000000 00000000 00000000                                                                                                               
[  111.777483] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                                                                                               
[  111.786964] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000                                                                                                               
[  111.796468] [<c0928a4c>] (mutex_lock) from [<c045d5c4>] (regulator_set_mode+0x2c/0xb4)                                                                                                                  
[  111.805675] [<c045d5c4>] (regulator_set_mode) from [<c04fbb88>] (mtk_wcn_consys_hw_reg_ctrl+0x170/0x684)                                                                                                
[  111.816444] [<c04fbb88>] (mtk_wcn_consys_hw_reg_ctrl) from [<c04fc25c>] (mtk_wcn_consys_hw_pwr_on+0x64/0xbc)                                                                                            
[  111.827562] [<c04fc25c>] (mtk_wcn_consys_hw_pwr_on) from [<c04fe004>] (wmt_plat_pwr_ctrl+0xa0/0x124)                                                                                                    
[  111.837990] [<c04fe004>] (wmt_plat_pwr_ctrl) from [<c04da030>] (wmt_ctrl_hw_pwr_on+0x68/0x88)                                                                                                           
[  111.847812] [<c04da030>] (wmt_ctrl_hw_pwr_on) from [<c04da11c>] (wmt_ctrl+0x44/0xc0)                                                                                                                    
[  111.856860] [<c04da11c>] (wmt_ctrl) from [<c04d64c0>] (wmt_core_ctrl+0x5c/0xe8)                                                                                                                         
[  111.865479] [<c04d64c0>] (wmt_core_ctrl) from [<c04d85c8>] (opfunc_pwr_on+0x9c/0x244)                                                                                                                   
[  111.874616] [<c04d85c8>] (opfunc_pwr_on) from [<c04d87cc>] (opfunc_func_on+0x5c/0x348)                                                                                                                  
[  111.883838] [<c04d87cc>] (opfunc_func_on) from [<c04d63d8>] (wmt_core_opid_handler+0x34/0x54)                                                                                                           
[  111.893663] [<c04d63d8>] (wmt_core_opid_handler) from [<c04d6424>] (wmt_core_opid+0x2c/0x6c)                                                                                                            
[  111.903403] [<c04d6424>] (wmt_core_opid) from [<c04dfbb0>] (wmtd_thread+0x1a0/0x254)                                                                                                                    
[  111.912455] [<c04dfbb0>] (wmtd_thread) from [<c0148cf0>] (kthread+0x140/0x170)                                                                                                                          
[  111.920987] [<c0148cf0>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)                                                                                                                          
[  111.929513] Exception stack(0xdb1d9fb0 to 0xdb1d9ff8)                                                                                                                                                   
[  111.935889] 9fa0:                                     00000000 00000000 00000000 00000000                                                                                                               
[  111.945204] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                                                                                               
[  111.953328] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000                                                                                                                                 
[  111.959900] Code: e3c33d7f e3c3303f e593300c f590f000 (e1901f9f)                                                                                                                                        
[  111.966087] ---[ end trace 76dae90fe82fa4c5 ]---                                                                                                                                                        
[  113.526315] [WMT-PLAT][W]wmt_plat_wake_lock_ctrl:WMT-PLAT: wakelock status(1), counter(2)                                                                                                               
[  118.523016] [MTK-WIFI] WIFI_open: WIFI_open: major 155 minor 0 (pid 1000)                                                                                                                               
[  118.530463] [MTK-WIFI] WIFI_write: WIFI_write A                                                                                                                                                         
                                                                                                                                                                                                           
[  118.536522] [WMT-PLAT][W]wmt_plat_wake_lock_ctrl:WMT-PLAT: wakelock status(1), counter(3)                                                                                                               
[  202.584249] [WMT-LIB][E]DISABLE_PSM_MONITOR(142):--->lock psm_lock failed, ret=-4                                                                                                                       
[  202.591872] [WMT-EXP][E]mtk_wcn_wmt_func_ctrl(112):wake up failed,OPID(3) type(3) abort                                                                                                                 
[  202.600954] [WMT-PLAT][W]wmt_plat_wake_lock_ctrl:WMT-PLAT: wakelock status(1), counter(2)                                                                                                               
[  202.601735] [WMT-LIB][E]DISABLE_PSM_MONITOR(142):--->lock psm_lock failed, ret=-4                                                                                                                       
[  202.610472] [MTK-WIFI] WIFI_write: WMT turn on WIFI fail!                                                                                                                                               
[  202.618855] [WMT-EXP][E]mtk_wcn_wmt_func_ctrl(112):wake up failed,OPID(3) type(9) abort                                                                                                                 
[  202.618866] [WMT-PLAT][W]wmt_plat_wake_lock_ctrl:WMT-PLAT: wakelock status(1), counter(1)                                                                                                               
[  202.624654] [MTK-WIFI] WIFI_close: WIFI_close: major 155 minor 0 (pid 1000)

the following error

[  111.511839] [WMT-CONSYS-HW][E]mtk_wmt_probe(173):CanNot get consys reset. ret=-517                                                                                                                      

seems to mean that, right?

	consys: consys@18070000 {
		compatible = "mediatek,mt7623-consys";
		reg = <0 0x18070000 0 0x0200>,  /*CONN_MCU_CONFIG_BASE      */
			<0 0x10001000 0 0x1600>;  /*TOPCKGEN_BASE             */
		clocks = <&infracfg CLK_INFRA_CONNMCU>;
		clock-names = "consysbus";
		power-domains = <&scpsys MT2701_POWER_DOMAIN_CONN>;
		interrupts = <GIC_SPI 185 IRQ_TYPE_LEVEL_LOW>,  /* BGF_EINT */
					<GIC_SPI 163 IRQ_TYPE_LEVEL_LOW>;  /* WDT_EINT */
		resets = <&watchdog MT2701_TOPRGU_CONN_MCU_RST>; <<<<<<<<<<
		reset-names = "connsys";   <<<<<<<<
		status="disabled";
};

Yes, I supposed it was due to duplicated watchdog entry, mtk_wmt_probe is executed a second time after the error, however at the same time the device is freed (because the first execution is failed) so we have that crash.