lwfinger / rtl8723ds

Linux driver for RTL8723DS.
GNU General Public License v2.0
50 stars 45 forks source link

This driver has an problem on openwrt #36

Open jerbe opened 1 year ago

jerbe commented 1 year ago

Dear lwfinger: I using this driver for an openwrt system on an arm64 architecture. I want to connect to the network using wireless in STA mode. When I click on the scan button under radio0 in openwrt, I encounter the following error. Can you please help me identify the issue? the kernel is version 5.4.240 and 5.10.176.

[  111.142754] RTW: cfg80211_rtw_scan(wlan0)
[  111.146798] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[  111.155176] Mem abort info:
[  111.158539]   ESR = 0x96000006
[  111.161768]   EC = 0x25: DABT (current EL), IL = 32 bits
[  111.166349]   SET = 0, FnV = 0
[  111.169564]   EA = 0, S1PTW = 0
[  111.172843] Data abort info:
[  111.175981]   ISV = 0, ISS = 0x00000006
[  111.179230]   CM = 0, WnR = 0
[  111.182332] user pgtable: 4k pages, 39-bit VAs, pgdp=000000001aacb000
[  111.188417] [0000000000000000] pgd=0000000002242003, p4d=0000000002242003, pud=0000000002242003, pmd=0000000000000000
[  111.198849] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[  111.204317] Modules linked in: rtl8723ds(O) fast_classifier shortcut_fe_cm shortcut_fe_ipv6 shortcut_fe pppoe ppp_async rt2800usb rt2800lib rt2500usb pppox ppp_mppe ppp_generic mt76x0u mt76x0_common ipt_REJECT brcmfmac br_netfilter batman_adv ath10k_usb ath10k_sdio ath10k_core xt_time xt_tcpudp xt_state xt_socket xt_recent xt_quota xt_pkttype xt_owner xt_nat xt_multiport xt_mark xt_mac xt_limit xt_iprange xt_helper xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_cgroup xt_addrtype xt_TPROXY xt_TCPMSS xt_REDIRECT xt_MASQUERADE xt_LOG xt_FLOWOFFLOAD xt_CT ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda ts_fsm ts_bm tcp_bbr slhc rtl8188fu rtl8150 rt2x00usb rt2x00lib r8723bs(C) r8188eu(C) r8152 panfrost nf_tproxy_ipv6 nf_tproxy_ipv4 nf_socket_ipv6 nf_socket_ipv4 nf_reject_ipv4 nf_nat_tftp nf_nat_snmp_basic nf_nat_sip nf_nat_pptp nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda nf_log_ipv4 nf_flow_table
[  111.204556]  nf_conntrack_tftp nf_conntrack_snmp nf_conntrack_sip nf_conntrack_pptp nf_conntrack_netlink nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp nf_conntrack_broadcast ts_kmp nf_conntrack_amanda nf_conncount mt76x2u mt76x2_common mt76x02_usb mt76x02_lib mt7663u mt7663_usb_sdio_common mt7615_common mt7601u mt76_usb mt76 meson_gxbb_wdt macvlan mac80211 lib80211 iptable_raw iptable_nat iptable_mangle iptable_filter ip_tables bridge brcmutil ax88179_178a ath 88x2cs 8189fs cfg80211 rfkill snd_soc_ac97 cryptodev xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6table_nat nf_nat ip6t_NPT nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 snd_ac97_codec dummy veth tun
[  111.311401]  snd_rawmidi snd_seq_device snd_hwdep ntfs3 dm_mirror dm_region_hash dm_log dm_crypt dm_mod asix usbnet hid_logitech_hidpp hid_logitech_dj lima gpu_sched dw_hdmi_cec
[  111.445519] CPU: 0 PID: 7590 Comm: luci Tainted: G         C O      5.10.176 #1
[  111.452759] Hardware name: Amlogic Meson GXL (S905X) P212 Development Board (DT)
[  111.460094] pstate: 40000005 (nZcv daif -PAN -UAO -TCO BTYPE=--)
[  111.466051] pc : __pi_memcmp+0x20/0x1ec
[  111.471544] lr : _rtw_memcmp+0x14/0x28 [rtl8723ds]
[  111.476897] sp : ffffffc0135834b0
[  111.482222] x29: ffffffc0135834b0 x28: 0000000000000000
[  111.487578] x27: 0000000000000000 x26: 0000000000000000
[  111.492910] x25: ffffff800396c448 x24: 0000000000000000
[  111.498222] x23: ffffff8007cf2200 x22: 0000000000000000
[  111.503507] x21: ffffff801a94e000 x20: ffffffc011e47000
[  111.508779] x19: ffffff8007cf2200 x18: ffffffffffffffff
[  111.514028] x17: 0000000000000000 x16: 0000000000000001
[  111.519270] x15: 0000000000000006 x14: ffffffc0935831d7
[  111.524466] x13: ffffffc01180b660 x12: 0000000000000000
[  111.529635] x11: 00000000000004a8 x10: ffffffc0118bb660
[  111.534799] x9 : ffffffc01180b660 x8 : 0000000000000000
[  111.539992] x7 : ffffffc0118bb660 x6 : ffffffc0135833e0
[  111.545253] x5 : 0000000000000001 x4 : ffffffc0100d82a8
[  111.550514] x3 : 0000000000000000 x2 : 0000000000000007
[  111.555776] x1 : ffffffc009ddb4b0 x0 : 0000000000000000
[  111.561038] Call trace:
[  111.566004]  __pi_memcmp+0x20/0x1ec
[  111.571123]  cfg80211_rtw_scan+0x200/0x844 [rtl8723ds]
[  111.576221]  cfg80211_scan+0x144/0x17c [cfg80211]
[  111.581297]  nl80211_trigger_scan+0x3e8/0x650 [cfg80211]
[  111.586334]  genl_family_rcv_msg_doit+0xc8/0x150
[  111.591277]  genl_rcv_msg+0xe4/0x1e0
[  111.596111]  netlink_rcv_skb+0x5c/0x130
[  111.600798]  genl_rcv+0x38/0x50
[  111.605306]  netlink_unicast+0x228/0x2f0
[  111.609666]  netlink_sendmsg+0x1bc/0x3f0
[  111.613844]  sock_sendmsg+0x54/0x60
[  111.617851]  ____sys_sendmsg+0x220/0x24c
[  111.621702]  ___sys_sendmsg+0x7c/0xc0
[  111.625385]  __sys_sendmsg+0x68/0xd0
[  111.628900]  __arm64_sys_sendmsg+0x24/0x30
[  111.632262]  el0_svc_common.constprop.0+0x80/0x270
[  111.635930]  do_el0_svc+0x24/0x90
[  111.639210]  el0_svc+0x10/0x1c
[  111.642227]  el0_sync_handler+0xe8/0x114
[  111.646108]  el0_sync+0x180/0x1c0
[  111.649389] Code: f2400808 54000261 d100044c d343fd8c (f8408403)
[  111.655425] ---[ end trace 6ef627f6333e3b9b ]---
lwfinger commented 1 year ago

Thanks for the complete report.

There was a similar problem with the vendor driver for a different chip that was caused by iwd starting a scan with the interface not completely set up. I just pushed the same fix for this chip. Please pull and test.

jerbe commented 1 year ago

Thank you for your timely help.