Openwrt - WO/WED crash & reboot on mt76_wed_offload_disable

Hi applied the mediatek WO patches & firmware

I am now seeing crashes & reboots when WED is enabled on the mt7996

<7>[  226.908717] CPU: 2 PID: 11 Comm: kworker/u8:0 Tainted: G           O       6.6.56 #0
<7>[  226.916450] Hardware name: Bananapi BPI-R4 (DT)
<7>[  226.920969] Workqueue: nf_ft_offload_del nf_flow_rule_route_ipv6 [nf_flow_table]
<7>[  226.928366] pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
<7>[  226.935316] pc : mt76_wed_offload_disable+0x64/0xa0 [mt76]
<7>[  226.940797] lr : mtk_wed_flow_remove+0x58/0x78
<7>[  226.945235] sp : ffffffc080fabaf0
<7>[  226.948537] x29: ffffffc080fabaf0 x28: 00000000deadbef7 x27: ffffff80c1a0b4a0
<7>[  226.955662] x26: ffffff80d33ce400 x25: 0000000000000001 x24: ffffff80c0ff4c00
<7>[  226.962786] x23: ffffffc080e4bdb8 x22: 0000000000000000 x21: ffffffc0806b1514
<7>[  226.969910] x20: ffffff80cece86e0 x19: ffffff80cece43e0 x18: 0000000000000000
<7>[  226.977033] x17: ffffffc07ea64000 x16: ffffffc080ef8000 x15: fffffffe00278740
<7>[  226.984156] x14: ffffffffffffffff x13: 00000000000000f5 x12: 0000000000000002
<7>[  226.991279] x11: ffffffffff271000 x10: 0000000000000400 x9 : 0000000000000000
<7>[  226.998402] x8 : ffffffc080fabcb8 x7 : 0000000000000000 x6 : 0000000000000000
<7>[  227.005525] x5 : ffffff80c002ac05 x4 : 0000000000000000 x3 : 0000000000000000
<7>[  227.012648] x2 : 0000000000000001 x1 : 0000000000000000 x0 : ffffff80cece83e0
<7>[  227.019773] Call trace:
<7>[  227.022209]  mt76_wed_offload_disable+0x64/0xa0 [mt76]
<7>[  227.027343]  mtk_wed_flow_remove+0x58/0x78
<7>[  227.031429]  mtk_flow_offload_cmd+0x46c/0x5ac
<7>[  227.035776]  mtk_eth_setup_tc_block_cb+0x28/0x38
<7>[  227.040382]  nf_flow_offload_ipv6_hook+0x7ec/0x95c [nf_flow_table]
<7>[  227.046553]  nf_flow_rule_route_ipv6+0x510/0x57c [nf_flow_table]
<7>[  227.052550]  process_one_work+0x178/0x3a0
<7>[  227.056552]  worker_thread+0x2e4/0x4c8
<7>[  227.060291]  kthread+0xd8/0xdc
<7>[  227.063336]  ret_from_fork+0x10/0x20
<0>[  227.066905] Code: 928d4de0 8b000273 91401260 f9444a61 (79401421)
<4>[  227.072985] ---[ end trace 0000000000000000 ]---

more details [Banana BPI-R4] Wifi7 status - #648 by rmandrad - For Developers - OpenWrt Forum

@moore & others at mediatek. There are a number of patches for 5.4 mt76 are you creating any for 6.6 tackling this issue ? or if these already exist could you point me to them ? thank you

just a follow-up note - I disabled the use of nf_flow_offload (via the smp-mt76.sh script) and don’t see any more crashes

got a decent 310Mbps and hardly any cpu usage so it feels is working as it should

Nice work, wonder when the MT76 patch would be released

did some more debugging and interestingly the crash on mt76_wed_offload_disable only happens if connected to the radio2 (at the moment setup as eht 320mhz) … the other two radios are setup as AX (2 and 5 GHz)

1 Like

i feel it is related to the WO2 and the mtk_wed code … for instance mtk_wed_wo.h is missing

#define MT7988_FIRMWARE_WO2 “mediatek/mt7988_wo_2.bin” if I follow the preceding code

equally some parts of the code where there’s WO1/WO0 there’s no WO2 …

I hope the devs catchup to this soon … but it seems at least the radio 0 & 1 are working with WO & WED as per what I can see on /sys/kernel/debug/wed[0-1]