[BPI-R3] Mesh mode issues

[  447.435046] CPU: 2 PID: 7 Comm: kworker/u8:0 Tainted: G        W         5.4.188 #0
[  447.442677] Hardware name: Bananapi BPI-R3 (DT)
[  447.447200] Workqueue: bat_events batadv_v_elp_throughput_metric_update [batman_adv]
[  447.454920] pstate: 80000005 (Nzcv daif -PAN -UAO)
[  447.459703] pc : airtime_link_metric_get+0x94/0x668 [mac80211]
[  447.465525] lr : airtime_link_metric_get+0x34/0x668 [mac80211]
[  447.471336] sp : ffffffc01005bb00
[  447.474633] x29: ffffffc01005bb00 x28: 0000000000000000
[  447.479925] x27: ffffff800309b938 x26: 00000000000005d8
[  447.485216] x25: ffffff8078239080 x24: 0000000000000011
[  447.490507] x23: ffffff8077620840 x22: ffffff8077620840
[  447.495798] x21: ffffff807799b580 x20: 0000000000000000
[  447.501090] x19: ffffff8074ae9000 x18: 0000000000000014
[  447.506381] x17: 0000000068680f9c x16: 00000000447de6b1
[  447.511672] x15: 000000005a78cda0 x14: 0000000000000000
[  447.516964] x13: ffff000000000000 x12: ffffffffffffffff
[  447.522255] x11: 0000000000000030 x10: 0000000000000000
[  447.527547] x9 : 0000000000000000 x8 : ffffff807799b800
[  447.532838] x7 : 0000000000000000 x6 : 000000000000003f
[  447.538130] x5 : 0000000000000040 x4 : 0000000000000000
[  447.543421] x3 : 0000000000000000 x2 : 0000000000000000
[  447.548712] x1 : 0000000000000000 x0 : 0000000000000000
[  447.554003] Call trace:
[  447.556444]  airtime_link_metric_get+0x94/0x668 [mac80211]
[  447.561915]  sta_set_sinfo+0x998/0xc40 [mac80211]
[  447.566606]  ieee80211_color_change_finish+0x11ec/0x1818 [mac80211]
[  447.572861]  cfg80211_get_station+0x98/0x1d8 [cfg80211]
[  447.578071]  batadv_v_mesh_free+0x384/0x470 [batman_adv]
[  447.583365]  batadv_v_elp_throughput_metric_update+0x1c/0x58 [batman_adv]
[  447.590135]  process_one_work+0x200/0x460
[  447.594126]  worker_thread+0x48/0x4d0
[  447.597772]  kthread+0x124/0x128
[  447.600985]  ret_from_fork+0x10/0x1c
[  447.601549] ------------[ cut here ]------------

you should post this as issue to mt76 github with your exact version (openwrt/linux/mt76 driver).

update backports-5.15.33-1 to backports-5.15.92-1 and mt76-2022-09-06 solve this issue.

Hi,

I see the same issue with 23.05.03, BPI R3.

root@OpenWrt:/# modinfo mt76

module:         /lib/modules/5.15.150/mt76.ko
license:        Dual BSD/GPL
depends:        mac80211,cfg80211
name:           mt76
vermagic:       5.15.150 SMP mod_unload aarch64

May I ask how do you update the mt76? Does it require update of mac80211,cfg80211, hostapd, wpa_supplicant etc?

regards

Maybe, I shall rephrase the question like this: OpenWrt 23.05.03, with kernel 5.15.150, comes with MT76 driver:

(feel comfortable to correct me if Im wrong)

[    9.792923] mt7986-wmac 18000000.wbsys: mcu clock not found
[    9.798495] mt7986-wmac 18000000.wbsys: ap2conn clock not found
[   10.221540] mt7986-wmac 18000000.wbsys: HW/SW Version: 0x8a108a10, Build Time: 20220113162701a
[   10.221540]
[   10.351887] mt7986-wmac 18000000.wbsys: WM Firmware Version: ____000000, Build Time: 20220113162756
[   10.432633] mt7986-wmac 18000000.wbsys: WA Firmware Version: DEV_000000, Build Time: 20220113163034
[   10.536647] mt7986-wmac 18000000.wbsys: eeprom load fail, use default bin

To get a up-to-date driver, or at least the working one as reported “mt76-2022-09-06”, what are the porting steps/procedures? How deep is the rabbit hole? Can anyone provide guidence/support on this?

regards

Try use 6.1 which should be default openwrt kernel now.

The issue stays with 6.1, even worse more frequent, including above, additional with a new crash as follow: same crash, call from another function I guess.

[79357.582489] WARNING: CPU: 2 PID: 5343 at airtime_link_metric_get+0xc8/0x6d4 [mac80211]
[79357.590427] Modules linked in: pppoe ppp_async nft_fib_inet nf_flow_table_inet ebtable_nat ebtable_filter ebtable_broute batman_adv ath11k_pci ath11k pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject_bridge nft_reject nft_redir nft_quota nft_objref nft_numgen nft_nat nft_meta_bridge nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_compat nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack_bridge nf_conntrack mt7915e mt76_connac_lib mt76 mac80211 iptable_mangle iptable_filter ipt_REJECT ip_tables ebtables ebt_vlan ebt_stp ebt_snat ebt_redirect ebt_pkttype ebt_nflog ebt_mark_m ebt_mark ebt_log ebt_limit ebt_ip6 ebt_ip ebt_dnat ebt_arpreply ebt_arp ebt_among ebt_802_3 cfg80211 arptable_filter arpt_mangle arp_tables xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG x_tables slhc sfp qrtr_mhi qrtr qmi_helpers nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6
[79357.590575]  nf_defrag_ipv4 mhi mdio_i2c libcrc32c compat br_netfilter crypto_safexcel pwm_fan i2c_gpio i2c_algo_bit sha512_arm64 sha1_ce sha1_generic seqiv michael_mic md5 des_generic libdes authencesn authenc leds_gpio xhci_plat_hcd xhci_pci xhci_mtk_hcd xhci_hcd gpio_button_hotplug usbcore usb_common aquantia
[79357.705197] CPU: 2 PID: 5343 Comm: kworker/u8:1 Tainted: G        W          6.1.86 #0
[79357.713092] Hardware name: Bananapi BPI-R3 (DT)
[79357.717606] Workqueue: events_unbound wiphy_rfkill_set_hw_state_reason [cfg80211]
[79357.725089] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[79357.732031] pc : airtime_link_metric_get+0xc8/0x6d4 [mac80211]
[79357.737865] lr : airtime_link_metric_get+0x34/0x6d4 [mac80211]
[79357.743698] sp : ffffffc00eafbaf0
[79357.746995] x29: ffffffc00eafbaf0 x28: 0000000000000000 x27: ffffff80061ee9c0
[79357.754112] x26: ffffff8005a80042 x25: 0000000000000000 x24: ffffff8003b888a0
[79357.761228] x23: ffffffc000cd7174 x22: ffffff8005a80054 x21: ffffff8005a80038
[79357.768344] x20: 0000000000000000 x19: ffffff80061fa000 x18: 0000000000000028
[79357.775461] x17: 0000000000000000 x16: 0000000000001e28 x15: 000060ebb1d2fd5e
[79357.782577] x14: 0000000000000000 x13: 0000000000000030 x12: 0101010101010101
[79357.789692] x11: 7f7f7f7f7f7f7f7f x10: feff636d746e616d x9 : 0000000000000000
[79357.796808] x8 : ffffffc00eafbac0 x7 : 0000000000000000 x6 : 000000002ea0611d
[79357.803923] x5 : 00000000000000b8 x4 : ffffff8005a80042 x3 : 00000000000000b8
[79357.811039] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000
[79357.818155] Call trace:
[79357.820587]  airtime_link_metric_get+0xc8/0x6d4 [mac80211]
[79357.826075]  airtime_link_metric_get+0x128/0x6d4 [mac80211]
[79357.831649]  mesh_rx_path_sel_frame+0xe0/0xac0 [mac80211]
[79357.837050]  ieee80211_mesh_rx_queued_mgmt+0x5dc/0x614 [mac80211]
[79357.843143]  ieee80211_ibss_leave+0xac4/0x1af0 [mac80211]
[79357.848543]  wiphy_rfkill_set_hw_state_reason+0x124/0x250 [cfg80211]
[79357.854889]  process_one_work+0x200/0x460
[79357.858888]  worker_thread+0x164/0x4bc
[79357.862622]  kthread+0xd0/0xe0
[79357.865663]  ret_from_fork+0x10/0x20
[79357.869225] ---[ end trace 0000000000000000 ]---
[79357.873966] ------------[ cut here ]------------

6.6 uses same mt76 at 6.1 - both have same build time. So, same situation I posted previously as in 6.1 happens in 6.6, openwrt current master.


[   11.148747] mt798x-wmac 18000000.wifi: HW/SW Version: 0x8a108a10, Build Time: 20221012174743a
[   11.148747]
[   11.273021] mt798x-wmac 18000000.wifi: WM Firmware Version: ____000000, Build Time: 20221012174805
[   11.371683] mt798x-wmac 18000000.wifi: WA Firmware Version: DEV_000000, Build Time: 20221012174937
[   11.477150] mt798x-wmac 18000000.wifi: registering led 'mt76-phy0'
[   11.484977] mt798x-wmac 18000000.wifi: registering led 'mt76-phy1'

so, if anyone can point an example or any suggestion, I would like to give a try for the mt76-2022-09-06 mentioned above. or maybe the newer mt76s.

The built time is wifi firmware binary,not mt76 code version. But afair openwrt uses a nearly recent mt76 version instead of the kernels version which stays at some point and only gets fixes.

Update source to make sure latest mt76 is active and try again…if bug is still present look for issue in mt76 repo on github and if there is none report it