BPI-R2 integrated WiFi trouble

Frank, did you updated wifi drivers with @LeXa2 patches you mentioned before in this branch?

Afair No,lexas patches are only in 5.4+

I guess problematic system calls tc anyhow…

Ok, got it. It looks like wifi tries to use shaping or something like that.

qdisc mq 0: root qdisc fq_codel 0: parent :4 limit 3069009476p flows 3069009476 quantum 3069009476 target 5.0ms interval 100.0ms memory_limit 32Mb ecn qdisc

it has timings so it’s likely should use some timers to reset counters. I suppose that the timers are not working. So it starts to drop outgoing trafic like if it was flooded.

Do you have problems in 4.14 and 5.4? Maybe backporting lexas patches help?

but this does not explain why i don’t have these rules in my 4.14 and no problems

I didn’t enabled traffic schedulers when I used 4.14, so idk how it works. 5.4 and 5.5 with fq_scheduler both have same behavior. And both works without it.

Do you have sch_fq and/or sch_fq_codel enabled in your config?

I see these modules in my filesystem (see above) but they are not loaded

It seems after a few months making an update to kernel 5.4, my internal wifi has also began working faulty!

This is from dmesg :

[  123.059020] [WMT-DETECT][I]wmt_detect_open:open major 154 minor 0 (pid 786)
[  123.073453] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (-2147191037),arg(0)
[  123.088185] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (1074034433),arg(30243)
[  123.102538] set current consys chipid (0x7623)
[  123.113480] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (-2147191036),arg(30243)
[  123.126865] [WMT-MOD-INIT][I]do_common_drv_init:start to do common driver init, chipid:0x00007623
[  123.198255] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAnt'.
[  123.211692] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAnt'.
[  123.211702] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAnt'.
[  123.290883] [WMT-MOD-INIT][I]do_common_drv_init:finish common driver init
[  123.303691] [WCN-MOD-INIT][E]do_connectivity_driver_init(58):do common driver init failed, ret:-1
[  123.303706] [WLAN-MOD-INIT][I]do_wlan_drv_init:start to do wlan module init 0x7623
[  123.332836] [MTK-WIFI] WIFI_init: mtk_wmt_WIFI_chrdev driver(major 155) installed.
[  123.347174] [WLAN-MOD-INIT][I]do_wlan_drv_init:WMT-WIFI char dev init, ret:0
[  123.362292] [WLAN-MOD-INIT][I]do_wlan_drv_init:WLAN-GEN2 driver init, ret:0
[  123.375814] [WLAN-MOD-INIT][I]do_wlan_drv_init:finish wlan module init
[  123.390186] [WMT-DETECT][I]wmt_detect_close:close major 154 minor 0 (pid 786)

Suspicious kernel modules are not loaded:

# CONFIG_NET_ACT_MIRRED is not set
# CONFIG_NET_SCH_FQ_CODEL is not set
# CONFIG_NET_SCH_FQ is not set
# CONFIG_IFB is not set

How could you solve the issue folks?

Does it work on clean boot? Could you try unloading the new modules ( CONFIG_NFT_QUEUE, NETFILTER_NETLINK_QUEUE ,NETFILTER_XT_TARGET_NFQUEUE)?

I recognized in the last month, that sometimes wifi just turned off! After boot I had to turn it on manually, nevertheless it’s been scripted, and should’ve come up! I might think it’s not relatd to the new kernel modules, because it existed before!

But tried unloading the new modules, and started internal wifi, I got this ( maybe driver error?? see this line [37706.800123] ):

[37706.663507] [WMT-DETECT][I]wmt_detect_open:open major 154 minor 0 (pid 25892)
[37706.676853] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (-2147191037),arg(0)
[37706.689964] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (1074034433),arg(30243)
[37706.704212] set current consys chipid (0x7623)
[37706.704326] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (-2147191036),arg(30243)
[37706.727473] [WMT-MOD-INIT][I]do_common_drv_init:start to do common driver init, chipid:0x00007623
[37706.727494] osal_fifo_init:Because pFifo room is avialable, we clear the room and allocate them again.
[37706.758650] _osal_fifo_deinit:pFifo = NULL or pFifo->pFifoBody = NULL, error
[37706.759062] [STPDbg]stp_dbg_nl_init: stp_dbg_nl_init(): GE_NELINK family registration fail
[37706.787551] [WMT-DEV][E]WMT_init(2400):fail to register chrdev
[37706.800112] [WMT-MOD-INIT][I]do_common_drv_init:finish common driver init
[37706.800123] [WCN-MOD-INIT][E]do_connectivity_driver_init(49):do common driver init failed, ret:-16
[37706.829702] [WCN-MOD-INIT][E]do_connectivity_driver_init(50):abort connectivity driver init, because common part is not ready
[37706.830173] [WMT-DETECT][I]wmt_detect_close:close major 154 minor 0 (pid 25892)
[37707.018596] ------------[ cut here ]------------
[37707.030687] WARNING: CPU: 3 PID: 3699 at lib/list_debug.c:54 __list_del_entry_valid+0xfc/0x104
[37707.046330] list_del corruption. next->prev should be d83b9d5c, but was c14909f4
[37707.060663] Modules linked in: ipt_REJECT nf_reject_ipv4 xt_tcpudp tun xt_state xt_conntrack xt_MASQUERADE nft_compat aes_arm_bs crypto_simd cryptd veth n
f_log_ipv4 nf_log_common nft_log nft_limit nft_masq nft_nat nft_chain_nat nf_nat nft_counter nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables_set
fuse mt76x2e mt76x2_common mt76x02_lib mt76 lima gpu_sched spi_mt65xx mtk_thermal mtk_pmic_keys pwm_mediatek mt6577_auxadc nvmem_mtk_efuse nf_tables nfnetlin
k ip_tables x_tables [last unloaded: nft_queue]
[37707.127421] CPU: 3 PID: 3699 Comm: stp_uart_launch Tainted: G        W         5.4.72-bpi-r2-main #1
[37707.143872] Hardware name: Mediatek Cortex-A7 (Device Tree)
[37707.156671] Backtrace:  
[37707.166325] [<c010f30c>] (dump_backtrace) from [<c010f6c0>] (show_stack+0x20/0x24)
[37707.181147]  r7:00000036 r6:60070093 r5:00000000 r4:c13cee5c
[37707.194070] [<c010f6a0>] (show_stack) from [<c0cba440>] (dump_stack+0xc4/0xd8)
[37707.208663] [<c0cba37c>] (dump_stack) from [<c012818c>] (__warn+0xe0/0x108)
[37707.223006]  r7:00000036 r6:c052a6f8 r5:00000009 r4:c0ffecbc
[37707.236066] [<c01280ac>] (__warn) from [<c0128594>] (warn_slowpath_fmt+0xa8/0xd0)
[37707.251010]  r7:c052a6f8 r6:00000036 r5:c0ffecbc r4:c0ffee00
[37707.264103] [<c01284f0>] (warn_slowpath_fmt) from [<c052a6f8>] (__list_del_entry_valid+0xfc/0x104)
[37707.280555]  r8:c1490e78 r7:20070013 r6:c14909f0 r5:d83b9d5c r4:d83b9d50
[37707.294718] [<c052a5fc>] (__list_del_entry_valid) from [<c01746c0>] (finish_wait+0x58/0x90)
[37707.310534] [<c0174668>] (finish_wait) from [<c06b749c>] (WMT_open+0x190/0x1d8)
[37707.325299]  r7:c1490960 r6:c14909f0 r5:c1498ec4 r4:00000000
[37707.338441] [<c06b730c>] (WMT_open) from [<c02fa420>] (chrdev_open+0xf4/0x1f8)
[37707.353256]  r7:c144a844 r6:d5568900 r5:d8c91208 r4:c0d79d98
[37707.366490] [<c02fa32c>] (chrdev_open) from [<c02f0870>] (do_dentry_open+0x124/0x400)
[37707.382012]  r10:d83b9e2c r9:d5568908 r8:c02fa32c r7:00000102 r6:00000000 r5:d8c91208
[37707.397532]  r4:d5568900
[37707.407660] [<c02f074c>] (do_dentry_open) from [<c02f1ea0>] (vfs_open+0x3c/0x40)
[37707.422770]  r9:00000000 r8:d5568900 r7:00000102 r6:00000000 r5:00000000 r4:d83b9ea0
[37707.438285] [<c02f1e64>] (vfs_open) from [<c0305f9c>] (do_last+0x2cc/0x848)
[37707.453029] [<c0305cd0>] (do_last) from [<c03065ac>] (path_openat+0x94/0x23c)
[37707.467937]  r10:00000142 r9:d83b8000 r8:d83b9ea0 r7:00000041 r6:d83b9f58 r5:d5568900
[37707.483671]  r4:00000000
[37707.494053] [<c0306518>] (path_openat) from [<c03078b8>] (do_filp_open+0x88/0x100)
[37707.509658]  r8:c0101204 r7:00000001 r6:d83b9ea0 r5:d83b9f58 r4:00000003
[37707.524446] [<c0307830>] (do_filp_open) from [<c02f21d8>] (do_sys_open+0x188/0x21c)
[37707.540318]  r7:fffff000 r6:ffffff9c r5:d16b9000 r4:00000003
[37707.554248] [<c02f2050>] (do_sys_open) from [<c02f22b8>] (sys_openat+0x1c/0x20)
[37707.569952]  r9:d83b8000 r8:c0101204 r7:00000142 r6:00000000 r5:000164c0 r4:be9c2668
[37707.586155] [<c02f229c>] (sys_openat) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[37707.602281] Exception stack(0xd83b9fa8 to 0xd83b9ff0)
[37707.615769] 9fa0:                   be9c2668 000164c0 ffffff9c 0000ce88 00000102 00000000
[37707.632469] 9fc0: be9c2668 000164c0 00000000 00000142 00000000 00000000 b6fef000 00000000
[37707.649269] 9fe0: 00000142 be9c2458 b6faea45 b6fb0526
[37707.662894] ---[ end trace 729c8c7415f438e0 ]---
[37707.676274] ------------[ cut here ]------------
[37707.689661] WARNING: CPU: 1 PID: 5196 at lib/list_debug.c:54 __list_del_entry_valid+0xfc/0x104
[37707.707161] list_del corruption. next->prev should be c938dd5c, but was d83b9d5c
[37707.723403] Modules linked in: ipt_REJECT nf_reject_ipv4 xt_tcpudp tun xt_state xt_conntrack xt_MASQUERADE nft_compat aes_arm_bs crypto_simd cryptd veth n
f_log_ipv4 nf_log_common nft_log nft_limit nft_masq nft_nat nft_chain_nat nf_nat nft_counter nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables_set
fuse mt76x2e mt76x2_common mt76x02_lib mt76 lima gpu_sched spi_mt65xx mtk_thermal mtk_pmic_keys pwm_mediatek mt6577_auxadc nvmem_mtk_efuse nf_tables nfnetlin
k ip_tables x_tables [last unloaded: nft_queue]
[37707.797222] CPU: 1 PID: 5196 Comm: stp_uart_launch Tainted: G        W         5.4.72-bpi-r2-main #1
[37707.797227] Hardware name: Mediatek Cortex-A7 (Device Tree)
[37707.797230] Backtrace:  
[37707.843617] [<c010f30c>] (dump_backtrace) from [<c010f6c0>] (show_stack+0x20/0x24)
[37707.843629]  r7:00000036 r6:60000093 r5:00000000 r4:c13cee5c
[37707.876536] [<c010f6a0>] (show_stack) from [<c0cba440>] (dump_stack+0xc4/0xd8)
[37707.876547] [<c0cba37c>] (dump_stack) from [<c012818c>] (__warn+0xe0/0x108)
[37707.876561]  r7:00000036 r6:c052a6f8 r5:00000009 r4:c0ffecbc
[37707.926269] [<c01280ac>] (__warn) from [<c0128594>] (warn_slowpath_fmt+0xa8/0xd0)
[37707.926287]  r7:c052a6f8 r6:00000036 r5:c0ffecbc r4:c0ffee00
[37707.958905] [<c01284f0>] (warn_slowpath_fmt) from [<c052a6f8>] (__list_del_entry_valid+0xfc/0x104)
[37707.958919]  r8:c1490e78 r7:80000013 r6:c14909f0 r5:c938dd5c r4:c938dd50
[37707.996878] [<c052a5fc>] (__list_del_entry_valid) from [<c01746c0>] (finish_wait+0x58/0x90)
[37707.996900] [<c0174668>] (finish_wait) from [<c06b749c>] (WMT_open+0x190/0x1d8)
[37708.032157]  r7:c1490960 r6:c14909f0 r5:c1498ec4 r4:00000000
[37708.032175] [<c06b730c>] (WMT_open) from [<c02fa420>] (chrdev_open+0xf4/0x1f8)
[37708.032187]  r7:c144a844 r6:d2ca03c0 r5:d8c91208 r4:c0d79d98
[37708.080018] [<c02fa32c>] (chrdev_open) from [<c02f0870>] (do_dentry_open+0x124/0x400)
[37708.080034]  r10:c938de2c r9:d2ca03c8 r8:c02fa32c r7:00000102 r6:00000000 r5:d8c91208
[37708.115136]  r4:d2ca03c0
[37708.115153] [<c02f074c>] (do_dentry_open) from [<c02f1ea0>] (vfs_open+0x3c/0x40)
[37708.115166]  r9:00000000 r8:d2ca03c0 r7:00000102 r6:00000000 r5:00000000 r4:c938dea0
[37708.160380] [<c02f1e64>] (vfs_open) from [<c0305f9c>] (do_last+0x2cc/0x848)
[37708.160401] [<c0305cd0>] (do_last) from [<c03065ac>] (path_openat+0x94/0x23c)
[37708.192386]  r10:00000142 r9:c938c000 r8:c938dea0 r7:00000041 r6:c938df58 r5:d2ca03c0
[37708.192390]  r4:00000000
[37708.192407] [<c0306518>] (path_openat) from [<c03078b8>] (do_filp_open+0x88/0x100)
[37708.192421]  r8:c0101204 r7:00000001 r6:c938dea0 r5:c938df58 r4:00000003
[37708.255150] [<c0307830>] (do_filp_open) from [<c02f21d8>] (do_sys_open+0x188/0x21c)
[37708.255165]  r7:fffff000 r6:ffffff9c r5:cf880000 r4:00000003
[37708.286499] [<c02f2050>] (do_sys_open) from [<c02f22b8>] (sys_openat+0x1c/0x20)
[37708.286522]  r9:c938c000 r8:c0101204 r7:00000142 r6:00000000 r5:000164c0 r4:bec82668
[37708.319644] [<c02f229c>] (sys_openat) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[37708.319661] Exception stack(0xc938dfa8 to 0xc938dff0)
[37708.351348] dfa0:                   bec82668 000164c0 ffffff9c 0000ce88 00000102 00000000
[37708.351358] dfc0: bec82668 000164c0 00000000 00000142 00000000 00000000 b6f73000 00000000
[37708.351372] dfe0: 00000142 bec82458 b6f32a45 b6f34526
[37708.400171] ---[ end trace 729c8c7415f438e1 ]---
[37708.538561] ------------[ cut here ]------------
[37708.552044] WARNING: CPU: 0 PID: 4445 at lib/list_debug.c:54 __list_del_entry_valid+0xfc/0x104
[37708.569515] list_del corruption. next->prev should be d7539d5c, but was c0161d44
[37708.585747] Modules linked in: ipt_REJECT nf_reject_ipv4 xt_tcpudp tun xt_state xt_conntrack xt_MASQUERADE nft_compat aes_arm_bs crypto_simd cryptd veth n
f_log_ipv4 nf_log_common nft_log nft_limit nft_masq nft_nat nft_chain_nat nf_nat nft_counter nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables_set
fuse mt76x2e mt76x2_common mt76x02_lib mt76 lima gpu_sched spi_mt65xx mtk_thermal mtk_pmic_keys pwm_mediatek mt6577_auxadc nvmem_mtk_efuse nf_tables nfnetlin
k ip_tables x_tables [last unloaded: nft_queue]
[37708.659352] CPU: 0 PID: 4445 Comm: stp_uart_launch Tainted: G        W         5.4.72-bpi-r2-main #1
[37708.678090] Hardware name: Mediatek Cortex-A7 (Device Tree)
[37708.693236] Backtrace:  
[37708.705163] [<c010f30c>] (dump_backtrace) from [<c010f6c0>] (show_stack+0x20/0x24)
[37708.722316]  r7:00000036 r6:600f0093 r5:00000000 r4:c13cee5c
[37708.737504] [<c010f6a0>] (show_stack) from [<c0cba440>] (dump_stack+0xc4/0xd8)
[37708.754290] [<c0cba37c>] (dump_stack) from [<c012818c>] (__warn+0xe0/0x108)
[37708.770742]  r7:00000036 r6:c052a6f8 r5:00000009 r4:c0ffecbc
[37708.785861] [<c01280ac>] (__warn) from [<c0128594>] (warn_slowpath_fmt+0xa8/0xd0)
[37708.802835]  r7:c052a6f8 r6:00000036 r5:c0ffecbc r4:c0ffee00
[37708.817964] [<c01284f0>] (warn_slowpath_fmt) from [<c052a6f8>] (__list_del_entry_valid+0xfc/0x104)
[37708.836460]  r8:c1490e78 r7:200f0013 r6:c14909f0 r5:d7539d5c r4:d7539d50
[37708.852694] [<c052a5fc>] (__list_del_entry_valid) from [<c01746c0>] (finish_wait+0x58/0x90)
[37708.870604] [<c0174668>] (finish_wait) from [<c06b749c>] (WMT_open+0x190/0x1d8)
[37708.887474]  r7:c1490960 r6:c14909f0 r5:c1498ec4 r4:00000000
[37708.902658] [<c06b730c>] (WMT_open) from [<c02fa420>] (chrdev_open+0xf4/0x1f8)
[37708.919483]  r7:c144a844 r6:d24eab40 r5:d8c91208 r4:c0d79d98
[37708.934768] [<c02fa32c>] (chrdev_open) from [<c02f0870>] (do_dentry_open+0x124/0x400)
[37708.952256]  r10:d7539e2c r9:d24eab48 r8:c02fa32c r7:00000102 r6:00000000 r5:d8c91208
[37708.969714]  r4:d24eab40
[37708.981557] [<c02f074c>] (do_dentry_open) from [<c02f1ea0>] (vfs_open+0x3c/0x40)
[37708.998121]  r9:00000000 r8:d24eab40 r7:00000102 r6:00000000 r5:00000000 r4:d7539ea0
[37709.014785] [<c02f1e64>] (vfs_open) from [<c0305f9c>] (do_last+0x2cc/0x848)
[37709.030670] [<c0305cd0>] (do_last) from [<c03065ac>] (path_openat+0x94/0x23c)
[37709.046695]  r10:00000142 r9:d7538000 r8:d7539ea0 r7:00000041 r6:d7539f58 r5:d24eab40
[37709.063486]  r4:00000000
[37709.074873] [<c0306518>] (path_openat) from [<c03078b8>] (do_filp_open+0x88/0x100)
[37709.091385]  r8:c0101204 r7:00000001 r6:d7539ea0 r5:d7539f58 r4:00000003
[37709.107014] [<c0307830>] (do_filp_open) from [<c02f21d8>] (do_sys_open+0x188/0x21c)
[37709.123685]  r7:fffff000 r6:ffffff9c r5:dbaba000 r4:00000003
[37709.138324] [<c02f2050>] (do_sys_open) from [<c02f22b8>] (sys_openat+0x1c/0x20)
[37709.154650]  r9:d7538000 r8:c0101204 r7:00000142 r6:00000000 r5:000164c0 r4:bea29668
[37709.171411] [<c02f229c>] (sys_openat) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[37709.188075] Exception stack(0xd7539fa8 to 0xd7539ff0)
[37709.202061] 9fa0:                   bea29668 000164c0 ffffff9c 0000ce88 00000102 00000000
[37709.219218] 9fc0: bea29668 000164c0 00000000 00000142 00000000 00000000 b6fbd000 00000000
[37709.236347] 9fe0: 00000142 bea29458 b6f7ca45 b6f7e526
[37709.250304] ---[ end trace 729c8c7415f438e2 ]---
[37709.263902] ------------[ cut here ]------------
[37709.277457] WARNING: CPU: 3 PID: 4004 at lib/list_debug.c:51 __list_del_entry_valid+0xd0/0x104
[37709.295041] list_del corruption. prev->next should be d7aa1d5c, but was c938dd5c
[37709.295045] Modules linked in: ipt_REJECT nf_reject_ipv4 xt_tcpudp tun xt_state xt_conntrack xt_MASQUERADE nft_compat aes_arm_bs crypto_simd cryptd veth n
f_log_ipv4 nf_log_common nft_log nft_limit nft_masq nft_nat nft_chain_nat nf_nat nft_counter nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables_set
fuse mt76x2e mt76x2_common mt76x02_lib mt76 lima gpu_sched spi_mt65xx mtk_thermal mtk_pmic_keys pwm_mediatek mt6577_auxadc nvmem_mtk_efuse nf_tables nfnetlin
k ip_tables x_tables [last unloaded: nft_queue]
[37709.385173] CPU: 3 PID: 4004 Comm: stp_uart_launch Tainted: G        W         5.4.72-bpi-r2-main #1
[37709.385178] Hardware name: Mediatek Cortex-A7 (Device Tree)
[37709.385190] Backtrace:  
[37709.431251] [<c010f30c>] (dump_backtrace) from [<c010f6c0>] (show_stack+0x20/0x24)
[37709.431265]  r7:00000033 r6:60070093 r5:00000000 r4:c13cee5c
[37709.463764] [<c010f6a0>] (show_stack) from [<c0cba440>] (dump_stack+0xc4/0xd8)
[37709.463786] [<c0cba37c>] (dump_stack) from [<c012818c>] (__warn+0xe0/0x108)
[37709.498638]  r7:00000033 r6:c052a6cc r5:00000009 r4:c0ffecbc
[37709.498654] [<c01280ac>] (__warn) from [<c0128594>] (warn_slowpath_fmt+0xa8/0xd0)
[37709.498666]  r7:c052a6cc r6:00000033 r5:c0ffecbc r4:c0ffedc4
[37709.546617] [<c01284f0>] (warn_slowpath_fmt) from [<c052a6cc>] (__list_del_entry_valid+0xd0/0x104)
[37709.546631]  r8:c1490e78 r7:20070013 r6:c14909f0 r5:d7aa1d5c r4:d7aa1d50
[37709.581561] [<c052a5fc>] (__list_del_entry_valid) from [<c01746c0>] (finish_wait+0x58/0x90)
[37709.581576] [<c0174668>] (finish_wait) from [<c06b749c>] (WMT_open+0x190/0x1d8)
[37709.581590]  r7:c1490960 r6:c14909f0 r5:c1498ec4 r4:00000000
[37709.631995] [<c06b730c>] (WMT_open) from [<c02fa420>] (chrdev_open+0xf4/0x1f8)
[37709.632006]  r7:c144a844 r6:d5568300 r5:d8c91208 r4:c0d79d98
[37709.632024] [<c02fa32c>] (chrdev_open) from [<c02f0870>] (do_dentry_open+0x124/0x400)
[37709.682065]  r10:d7aa1e2c r9:d5568308 r8:c02fa32c r7:00000102 r6:00000000 r5:d8c91208
[37709.682071]  r4:d5568300
[37709.682091] [<c02f074c>] (do_dentry_open) from [<c02f1ea0>] (vfs_open+0x3c/0x40)
[37709.682103]  r9:00000000 r8:d5568300 r7:00000102 r6:00000000 r5:00000000 r4:d7aa1ea0
[37709.744785] [<c02f1e64>] (vfs_open) from [<c0305f9c>] (do_last+0x2cc/0x848)
[37709.744808] [<c0305cd0>] (do_last) from [<c03065ac>] (path_openat+0x94/0x23c)
[37709.776763]  r10:00000142 r9:d7aa0000 r8:d7aa1ea0 r7:00000041 r6:d7aa1f58 r5:d5568300
[37709.776767]  r4:00000000
[37709.776784] [<c0306518>] (path_openat) from [<c03078b8>] (do_filp_open+0x88/0x100)
[37709.776796]  r8:c0101204 r7:00000001 r6:d7aa1ea0 r5:d7aa1f58 r4:00000003
[37709.837114] [<c0307830>] (do_filp_open) from [<c02f21d8>] (do_sys_open+0x188/0x21c)
[37709.837128]  r7:fffff000 r6:ffffff9c r5:d16ba000 r4:00000003
[37709.868426] [<c02f2050>] (do_sys_open) from [<c02f22b8>] (sys_openat+0x1c/0x20)
[37709.868438]  r9:d7aa0000 r8:c0101204 r7:00000142 r6:00000000 r5:000164c0 r4:beeb7668
[37709.868449] [<c02f229c>] (sys_openat) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[37709.868454] Exception stack(0xd7aa1fa8 to 0xd7aa1ff0)
[37709.868463] 1fa0:                   beeb7668 000164c0 ffffff9c 0000ce88 00000102 00000000
[37709.868473] 1fc0: beeb7668 000164c0 00000000 00000142 00000000 00000000 b6f1c000 00000000
[37709.868479] 1fe0: 00000142 beeb7458 b6edba45 b6edd526
[37709.868484] ---[ end trace 729c8c7415f438e3 ]---
[37712.885604] [MTK-WIFI] WIFI_open: WIFI_open: major 155 minor 0 (pid 25891)
[37712.901623] [MTK-WIFI] WIFI_write: WIFI_write 0

[37712.925159] [MTK-WIFI] WIFI_write: WIFI is already power off!
[37712.939808] [MTK-WIFI] WIFI_close: WIFI_close: major 155 minor 0 (pid 25891)
[37714.961066] [MTK-WIFI] WIFI_open: WIFI_open: major 155 minor 0 (pid 25891)
[37714.976856] [MTK-WIFI] WIFI_write: WIFI_write A

[37715.000166] vcn18: mode operation not allowed
[37715.015040] [WMT-CONSYS-HW][E]mtk_wcn_consys_hw_reg_ctrl(291):Read CONSYS chipId(0xfffff093)
[37715.112683] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAnt'.
[37715.146435] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAnt'.
[37715.162384] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAnt'.
[37715.747214] [STP] mtk_wcn_stp_psm_enable:[W] STP Not Ready, Dont do Sleep/Wakeup
[37715.776420] kalFirmwareImageMapping firmware size 225840
[37716.979887] [MTK-WIFI] register_set_p2p_mode_handler: (pid 801) register set p2p mode handler 2807c777
[37716.997846] [MTK-WIFI] WIFI_write: WMT turn on WIFI success!
[37717.014329] [MTK-WIFI] WIFI_write: Set wlan mode 0 --> 1
[37717.029754] [MTK-WIFI] WIFI_close: WIFI_close: major 155 minor 0 (pid 25891)

What does it mean :

vcn18: mode operation not allowed

This looks like driver was initialized before…have you done echo 0 before? And start at point needed (like my wifi.sh)? If chardev already exists it should not be created again

Trace (list_del_valid…) seems to be caused from attempt to recreating chardev

Vcn18 can be ignored…it is a regulator.code trys to reset it which is not possible for fixed regulators

Echo 0 has been done before in my wifi script ( based on yours ). Now I’ve downloaded your script, and run it, but no success! I see ap0 is there, has ip address, but not visible as wifi.

Hostapd doesn’t throw anything :

/usr/sbin/hostapd -dd /etc/hostapd/hostapd_2.4_onboard.conf
nl80211: Event message available
nl80211: Drv Event 20 (NL80211_CMD_DEL_STATION) received for ap0
nl80211: Delete station d8:f1:5b:e7:87:b0
ap0: Event DISASSOC (1) received
ap0: STA d8:f1:5b:e7:87:b0 IEEE 802.11: disassociated
Disassociation notification for unknown STA d8:f1:5b:e7:87:b0
nl80211: Event message available
nl80211: Drv Event 20 (NL80211_CMD_DEL_STATION) received for ap0
nl80211: Delete station 28:6d:cd:23:13:eb
ap0: Event DISASSOC (1) received
ap0: STA 28:6d:cd:23:13:eb IEEE 802.11: disassociated
Disassociation notification for unknown STA 28:6d:cd:23:13:eb
nl80211: Event message available
nl80211: Drv Event 16 (NL80211_CMD_STOP_AP) received for ap0
ap0: Event INTERFACE_UNAVAILABLE (28) received
Interface ap0 is unavailable -- stopped
RTM_NEWLINK: ifi_index=38 ifname=ap0 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1002 ()
nl80211: Interface down (ap0/ap0)
ap0: Event INTERFACE_DISABLED (26) received
ap0: INTERFACE-DISABLED 
VLAN: RTM_NEWLINK: ifi_index=38 ifname=ap0 ifi_family=0 ifi_flags=0x1002 ()
VLAN: vlan_newlink(ap0)
RTM_DELLINK: ifi_index=38 ifname=ap0 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1002 ()
RTM_DELLINK: Interface 'ap0' removed - mark if_removed=1
ap0: Event INTERFACE_STATUS (5) received
Unknown event 5
VLAN: RTM_DELLINK: ifi_index=38 ifname=ap0 ifi_family=0 ifi_flags=0x1002 ()
VLAN: vlan_dellink(ap0)
RTM_DELLINK: ifi_index=37 ifname=wlan0 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1002 ()
RTM_DELLINK: Interface 'wlan0' removed
VLAN: RTM_DELLINK: ifi_index=37 ifname=wlan0 ifi_family=0 ifi_flags=0x1002 ()
VLAN: vlan_dellink(wlan0)
nl80211: Event message available
nl80211: Ignored event (cmd=36) for foreign interface (ifindex -1 wdev 0x0)
nl80211: Event message available
nl80211: Ignored event (cmd=36) for foreign interface (ifindex -1 wdev 0x0)
RTM_NEWLINK: ifi_index=0 ifname=wlan%d wext ifi_family=0 ifi_flags=0x1002 ()
ap0: Event INTERFACE_STATUS (5) received
Unknown event 5
VLAN: RTM_NEWLINK: ifi_index=0 ifname=wlan%d ifi_family=0 ifi_flags=0x1002 ()
VLAN: vlan_newlink(wlan%d)
RTM_NEWLINK: ifi_index=39 ifname=wlan0 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1002 ()
VLAN: RTM_NEWLINK: ifi_index=39 ifname=wlan0 ifi_family=0 ifi_flags=0x1002 ()
VLAN: vlan_newlink(wlan0)
RTM_NEWLINK: ifi_index=40 ifname=ap0 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1002 ()
nl80211: Update ifindex for a removed interface
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=1
nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=6
nl80211: interface ap0 in phy phy12
nl80211: Set mode ifindex 40 iftype 3 (AP)
nl80211: Unsubscribe mgmt frames handle 0x88d2ec21 (start AP)
nl80211: Setup AP(ap0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x5a64a8 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5a64a8 match=04
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5a64a8 match=0501
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5a64a8 match=0503
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5a64a8 match=0504
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5a64a8 match=06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5a64a8 match=08
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5a64a8 match=09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5a64a8 match=0a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5a64a8 match=11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5a64a8 match=12
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5a64a8 match=7f
nl80211: Probe Request reporting already on! nl_preq=0x88d2fbc1
nl80211: Connect handle already created (nl_connect=0x5a59e0)
nl80211: Mark if_removed=0 for ap0 based on RTM_NEWLINK event
ap0: Event INTERFACE_STATUS (5) received
Unknown event 5
RTM_NEWLINK: ifi_index=40 ifname=ap0 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x11003 ([UP][LOWER_UP])
nl80211: Interface up (ap0/ap0)
ap0: Event INTERFACE_ENABLED (25) received
ap0: INTERFACE-ENABLED 
wpa_driver_nl80211_set_key: ifindex=40 (ap0) alg=3 addr=0x53f9fc key_idx=1 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
   broadcast key
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon head - hexdump(len=58): 80 00 00 00 ff ff ff ff ff ff 02 08 22 50 c7 3d 02 08 22 50 c7 3d 00 00 00 00 00 00 00 00 00 00 64 00 11 04 00 07 48 46 47 2d 49 6f 54 01 08 82 84 8b 96 0c 12 18 24 03 01 03
nl80211: Beacon tail - hexdump(len=123): 07 06 48 55 20 01 0d 14 2a 01 04 32 04 30 48 60 6c 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 2d 1a 0e 00 03 ff 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 3d 16 03 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 04 00 00 00 02 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
nl80211: ifindex=40
nl80211: beacon_int=100
nl80211: beacon_rate=0
nl80211: rate_type=0
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=7):
     48 46 47 2d 49 6f 54                              HFG-IoT         
  * beacon_int=100
  * dtim_period=2
nl80211: hidden SSID not in use
nl80211: privacy=1
nl80211: auth_algs=0x1
nl80211: wpa_version=0x2
nl80211: key_mgmt_suites=0x2
nl80211: pairwise_ciphers=0x10
nl80211: group_cipher=0x10
nl80211: SMPS mode - off
nl80211: beacon_ies - hexdump(len=6): 7f 04 00 00 00 02
nl80211: proberesp_ies - hexdump(len=6): 7f 04 00 00 00 02
nl80211: assocresp_ies - hexdump(len=6): 7f 04 00 00 00 02
nl80211: Beacon set failed: -22 (Invalid argument)
Failed to set beacon parameters
nl80211: Set IF_OPER_UP again based on ifi_flags and expected operstate
netlink: Operstate: ifindex=40 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
RTM_NEWLINK: ifi_index=40 ifname=ap0 operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
VLAN: RTM_NEWLINK: ifi_index=40 ifname=ap0 ifi_family=0 ifi_flags=0x1002 ()
VLAN: vlan_newlink(ap0)
VLAN: RTM_NEWLINK: ifi_index=40 ifname=ap0 ifi_family=0 ifi_flags=0x11003 ([UP][LOWER_UP])
VLAN: vlan_newlink(ap0)
VLAN: RTM_NEWLINK: ifi_index=40 ifname=ap0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
VLAN: vlan_newlink(ap0)

I get just this output :

[ 4440.135629] [WMT-LIB][E]wmt_lib_cmb_rst(1674):[whole chip reset] fail at wmt_lib_hw_rst!
[ 4440.874756] [WMT-DEV][E]wmt_dev_rx_timeout(1430):gRxCount != 0 (-1), reset it!
[ 4440.890322] [WMT-CTRL][E]wmt_ctrl_rx(262):wmt_dev_rx_timeout: timeout,jiffies(414081),timeoutvalue(20000)
[ 4440.908251] [WMT-CORE][E]wmt_core_rx(346):WMT-CORE: wmt_core_ctrl failed: WMT_CTRL_RX, iRet:-1
[ 4440.925221] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 348, (0)
[ 4440.925234] [WMT-CORE][E]opfunc_pwr_sv(1208):wmt_core: read SLEEP_EVT fail(-1) len(0, 6)
[ 4440.925246] [WMT-CTRL][E]wmt_ctrl_evt_parser(967):parser wmt evt from BTIF buf fail(0)
[ 4440.925254] [WMT-CORE][E]wmt_core_ctrl(499):WMT-CORE: wmt_core_ctrl failed: id(29), type(1), value(0) iRet:(-1)
[ 4440.925260] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 501, (0)
[ 4440.925275] [STP-PSM] [E]_stp_psm_notify_stp(1006):ERROR! Action = SLEEP, ACT state, the case should not happens
                                                                                                                                                             
[ 4440.925281] [STP-PSM] [E]_stp_psm_notify_stp(1008):ERROR! state = 0, flag = 40
[ 4440.925367] [MTK-WIFI] register_set_p2p_mode_handler: (pid 796) register set p2p mode handler 00000000
[ 4441.425357] vcn18: mode operation not allowed
[ 4441.438161] vcn18: mode operation not allowed
[ 4441.452672] [WMT-CONSYS-HW][E]mtk_wcn_consys_hw_reg_ctrl(291):Read CONSYS chipId(0xfffff093)
[ 4441.545018] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAnt'.
[ 4441.577573] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAnt'.
[ 4441.593222] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAnt'.
[ 4442.159635] [STP] mtk_wcn_stp_psm_enable:[W] STP Not Ready, Dont do Sleep/Wakeup
[ 4442.175293] [MTK-WIFI] wifi_reset_end: WIFI state recovering...
[ 4442.197566] kalFirmwareImageMapping firmware size 225840
[ 4443.267750] [MTK-WIFI] register_set_p2p_mode_handler: (pid 796) register set p2p mode handler 67c012d1
[ 4443.286729] [MTK-WIFI] wifi_reset_end: WMT turn on WIFI success!
[ 4443.304139] [MTK-WIFI] wifi_reset_end: Set wlan mode 1

Maybe I should test it with another OS, but I’m afraid there is a harware issue!

I guess it’s no hw issue…more the buggy driver :slight_smile:

This looks strange…need to look where it is located…have you tried simple reboot? Where do you call the initialisation script? Which OS do you use? Stretch and earlier may have problems with kernels 5.4+ (i saw some warning about unsupported modes in stretch+5.4,but in my case they did not break).

Sometimes reset failes,but after clean boot (maybe try powercycle) it should came “up”.

Simple reboot was tried more times. I call my initialisation script with rc.local. OS is debian buster, kernel is 5.4.72.

5.4 kernel is in use since april, then was ordered an MT7612e card and helped me set it up. The problem is recognised maybe a month ago, only from yesterday I’m not able to use it.

mhm, so basicly same setup as my current non-migrated version (up since 19days 18h with kernel 5.4.66). so here output of my lsmod:

Module                  Size  Used by
aes_arm_bs             24576  1
crypto_simd            16384  1 aes_arm_bs
cryptd                 24576  1 crypto_simd
veth                   24576  0
xt_mark                16384  3
xt_addrtype            16384  4
xt_iprange             16384  12
xt_recent              20480  12
xt_nat                 16384  12
xt_tcpudp              16384  43
xt_limit               16384  1
xt_state               16384  0
xt_conntrack           16384  32
ipt_REJECT             16384  2
nf_reject_ipv4         16384  1 ipt_REJECT
xt_MASQUERADE          16384  4
iptable_mangle         16384  1
iptable_nat            16384  1
nf_nat                 45056  3 xt_nat,xt_MASQUERADE,iptable_nat
nf_conntrack          131072  5 xt_state,xt_nat,xt_MASQUERADE,xt_conntrack,nf_nat
tun                    49152  2
nf_defrag_ipv6         20480  1 nf_conntrack
nf_defrag_ipv4         16384  1 nf_conntrack
nf_tables             139264  0
iptable_filter         16384  1
nfnetlink              16384  1 nf_tables
pppoe                  20480  4
pppox                  16384  1 pppoe
ppp_generic            36864  10 pppox,pppoe
slhc                   16384  1 ppp_generic
mt76x2e                24576  0
mt76x2_common          24576  1 mt76x2e
mt76x02_lib            69632  2 mt76x2_common,mt76x2e
mt76                   57344  3 mt76x02_lib,mt76x2_common,mt76x2e
lima                   45056  0
mt6577_auxadc          16384  0
spi_mt65xx             20480  0
gpu_sched              32768  1 lima
pwm_mediatek           16384  0
mtk_thermal            16384  0
mtk_pmic_keys          16384  0
nvmem_mtk_efuse        16384  0
ip_tables              24576  4 iptable_mangle,iptable_filter,iptable_nat
x_tables               32768  14 xt_state,ipt_REJECT,xt_nat,iptable_mangle,ip_tables,iptable_filter,xt_mark,xt_tcpudp,xt_MASQUERADE,xt_limit,xt_recent,xt_addrtype,xt_iprange,xt_conntrack

maybe it gives you a clue if and which module may break internal wifi

Which kernel do you use exactly? Maybe there is any breaking commit after 5.4.66 i’m using

Sorry for the late answer! Kernel is 5.4.72 ( added nft_queue ) . I see following difference, in my kernel modules this one has bigger size :

mt76x2_common 28672 1 mt76x2e

You are using iptables, therefore more modules related to it, on my side nftables works.

Should I try re-copy the driver?

Have you tried without nft_queue? Maybe this has same breaking effect as the known CONFIG_NET_SCH_FQ_CODEL / CONFIG_NET_SCH_FQ

I tried it now, without success! Same output, as before!

What does it mean:

[  459.053262] [STP-BTM] [E]_stp_btm_notify_wmt_dmp_wq(1132):ERROR! paged dump fail
[  459.069348] drivers/misc/mediatek/connectivity/common/conn_soc/core/btm_core.c, 824, (!RB_EMPTY(pOpQ))
[  459.087344] [STP-BTM] [W]_stp_btm_get_op: RB_GET fail
[  459.101574] [STP-BTM] [E]_stp_btm_handler(750):ERROR! polling CTRL STATE fail
[  459.101617] [STP-BTM] [W]_stp_btm_proc: opid id(0x7)(STP_OPID_BTM_PAGED_TRACE) error(-1)
[  459.101670] [MTK-WIFI] wifi_reset_start: Turn off p2p/ap mode
[  459.101709] [STP-PSM] [W]_stp_psm_put_op: RB_FULL, RB_COUNT=16 , RB_SIZE=16
[  459.101717] [STP-PSM] [W]_stp_psm_proc: +++++++++++ Put op to FreeOpQ fail, maybe disable/enable psm
[  461.111179] [WMT-LIB][E]wmt_lib_put_act_op(1056):wait completion timeout, opId(19), show wmtd_thread stack!
[  461.130137] Backtrace:

Other idea?

Without this option you have same state as my repo? Strange because the uploaded version works on my buster-image…have you installed wpa_supplicant or any other related package i have not (hostapd,dnsmasq,lxc with net,openvpn,iptables)?

I’ve copied all files from here to under /lib/firmwares :

No wpa-cupplicant, but hostapd, dnsmasq, lxc with net, nftables. It’s strange because it worked for a while.

Now I’m testing 5ghz on internal wifi, it’s stable. But with 2,4ghz comes trouble. It disturbs me a bit, because this was set only for some IoT devices. On the other hand, I’m not really satisfied with the range of mt7612 2,4ghz. What about BPI-MT7615? Better range?

have not done AP-test on mt7615 yet due to missing time

Could you try without nftables loaded?