svpcom / rtl8812au

Patched rtl88xxau drivers for wfb-ng
https://github.com/svpcom/wfb-ng
GNU General Public License v2.0
103 stars 64 forks source link

[WIP] Fixed build for linux 5.17 #15

Closed Cyberunner23 closed 2 years ago

Cyberunner23 commented 2 years ago

Fixes the build on linux 5.17 based systems

Linux 5.17 renames complete_and_exit to kthread_complete_and_exit

Cyberunner23 commented 2 years ago

Just noticed that a stack trace shows up in dmesg and that having multiple wifi cards connected on the same PC causes a crash loop and eventually the USB controller dies. I'm investigating...

Cyberunner23 commented 2 years ago

If anyone is interested helping out, here is the dmesg log

[  +0.116678] usb 1-6.1: New USB device found, idVendor=0b05, idProduct=17d2, bcdDevice= 0.00
[  +0.000012] usb 1-6.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000005] usb 1-6.1: Product: 802.11n NIC
[  +0.000004] usb 1-6.1: Manufacturer: Realtek
[  +0.000004] usb 1-6.1: SerialNumber: 123456
[  +0.801272] usb 1-6.1: USB disconnect, device number 14
[  +0.078013] usb 2-6.1: new SuperSpeed USB device number 10 using xhci_hcd
[  +0.024379] usb 2-6.1: Int endpoint with wBytesPerInterval of 512 in config 1 interface 0 altsetting 0 ep 133: setting to 64
[  +0.000157] usb 2-6.1: New USB device found, idVendor=0b05, idProduct=17d2, bcdDevice= 0.00
[  +0.000008] usb 2-6.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000004] usb 2-6.1: Product: 802.11n NIC
[  +0.000004] usb 2-6.1: Manufacturer: Realtek
[  +0.000004] usb 2-6.1: SerialNumber: 123456
[  +0.127808] rtl88xxau_wfb 2-6.1:1.0 wlx7c10c964bf0d: renamed from wlan0
[  +0.039780] rtl88xxau_wfb 2-6.1:1.0 wlx7c10c964bf0d: Current addr:  7c 10 c9 64 bf 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  +0.000006] rtl88xxau_wfb 2-6.1:1.0 wlx7c10c964bf0d: Expected addr: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  +0.000003] ------------[ cut here ]------------
[  +0.000002] netdevice: wlx7c10c964bf0d: Incorrect netdev->dev_addr
[  +0.000014] WARNING: CPU: 2 PID: 980 at net/core/dev_addr_lists.c:517 dev_addr_check.cold+0x65/0x9f
[  +0.000007] Modules linked in: tls xt_multiport xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo xt_addrtype nft_compat nf_tables nfnetlink br_netfilter bridge stp llc vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) rfcomm snd_seq_dummy snd_hrtimer ccm nvidia_uvm(POE) intel_tcc_cooling x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm rapl cmac algif_hash algif_skcipher af_alg bnep overlay mei_hdcp mei_pxp intel_rapl_msr iwlmvm binfmt_misc nvidia_drm(POE) snd_hda_codec_realtek nvidia_modeset(POE) snd_hda_codec_generic intel_cstate nls_iso8859_1 mac80211 snd_hda_codec_hdmi ledtrig_audio efi_pstore asus_nb_wmi serio_raw snd_hda_intel intel_wmi_thunderbolt libarc4 snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec btusb ee1004 88XXau_wfb(OE) snd_hda_core iwlwifi nvidia(POE) btrtl snd_usb_audio uvcvideo btbcm btintel btmtk snd_usbmidi_lib videobuf2_vmalloc snd_hwdep iwlmei videobuf2_memops bluetooth
[  +0.000072]  snd_seq_midi videobuf2_v4l2 snd_seq_midi_event videobuf2_common snd_rawmidi videodev cfg80211 input_leds ecdh_generic snd_pcm joydev mc ecc snd_seq drm_kms_helper processor_thermal_device_pci_legacy processor_thermal_device snd_seq_device processor_thermal_rfim hid_multitouch snd_timer cec processor_thermal_mbox processor_thermal_rapl mei_me rc_core snd intel_rapl_common fb_sys_fops syscopyarea mei sysfillrect int3403_thermal soundcore intel_pch_thermal intel_soc_dts_iosf int340x_thermal_zone sysimgblt int3400_thermal acpi_pad asus_wireless mac_hid acpi_thermal_rel sch_fq_codel ipmi_devintf ipmi_msghandler msr parport_pc ppdev lp parport drm ip_tables x_tables autofs4 dm_crypt raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear system76_io(OE) system76_acpi(OE) hid_asus asus_wmi sparse_keymap platform_profile uas usb_storage usbhid hid_generic crct10dif_pclmul crc32_pclmul ghash_clmulni_intel
[  +0.000070]  aesni_intel crypto_simd cryptd i2c_i801 r8169 nvme i2c_smbus intel_lpss_pci realtek nvme_core ahci i2c_hid_acpi xhci_pci intel_lpss libahci i2c_hid xhci_pci_renesas idma64 wmi hid video
[  +0.000018] CPU: 2 PID: 980 Comm: NetworkManager Tainted: P        W  OE     5.17.5-76051705-generic #202204271406~1651504840~22.04~63e51bd
[  +0.000004] Hardware name: ASUSTeK COMPUTER INC. G752VS/G752VS, BIOS G752VS.310 06/30/2017
[  +0.000001] RIP: 0010:dev_addr_check.cold+0x65/0x9f
[  +0.000005] Code: 01 e8 85 27 f6 ff 0f 0b 49 c7 c4 3b cb a3 85 80 3b 00 75 30 48 c7 c6 46 cb a3 85 4c 89 e2 48 c7 c7 d0 a2 ad 85 e8 61 27 f6 ff <0f> 0b e9 7d 91 d5 ff 4c 8b 24 c5 20 c5 72 85 eb d4 49 c7 c4 3b cb
[  +0.000002] RSP: 0018:ffff9a19c1b33470 EFLAGS: 00010282
[  +0.000003] RAX: 0000000000000000 RBX: ffff8cca8c56a000 RCX: 0000000000000027
[  +0.000002] RDX: ffff8ccd364a0588 RSI: 0000000000000001 RDI: ffff8ccd364a0580
[  +0.000002] RBP: ffff9a19c1b33480 R08: 0000000000000003 R09: 00000000000ada50
[  +0.000002] R10: ffffffffffffffff R11: 0000000000000001 R12: ffffffff859e8a3a
[  +0.000001] R13: ffffffffc3700f80 R14: 0000000000000001 R15: ffff8cca8c56a000
[  +0.000003] FS:  00007f2ed9e064c0(0000) GS:ffff8ccd36480000(0000) knlGS:0000000000000000
[  +0.000002] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  +0.000002] CR2: 00007f56fdaff7b0 CR3: 0000000112b64006 CR4: 00000000003706e0
[  +0.000003] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  +0.000001] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  +0.000002] Call Trace:
[  +0.000001]  <TASK>
[  +0.000004]  __dev_open+0x45/0x1c0
[  +0.000006]  __dev_change_flags+0x1a4/0x220
[  +0.000003]  dev_change_flags+0x26/0x60
[  +0.000003]  do_setlink+0x28a/0xc60
[  +0.000005]  ? skb_free_head+0x69/0x80
[  +0.000005]  ? kfree+0xab/0x410
[  +0.000004]  ? __nla_validate_parse+0x4c/0x1a0
[  +0.000005]  __rtnl_newlink+0x61b/0xa20
[  +0.000004]  ? __netlink_sendskb+0x6d/0x90
[  +0.000004]  ? rtnl_getlink+0x395/0x420
[  +0.000010]  ? kmem_cache_alloc_trace+0x1a6/0x320
[  +0.000006]  rtnl_newlink+0x49/0x70
[  +0.000003]  rtnetlink_rcv_msg+0x16e/0x3f0
[  +0.000003]  ? rtnl_calcit.isra.0+0x140/0x140
[  +0.000003]  netlink_rcv_skb+0x56/0x100
[  +0.000004]  rtnetlink_rcv+0x15/0x20
[  +0.000002]  netlink_unicast+0x233/0x340
[  +0.000004]  netlink_sendmsg+0x25e/0x4d0
[  +0.000003]  sock_sendmsg+0x66/0x70
[  +0.000006]  ____sys_sendmsg+0x24f/0x290
[  +0.000003]  ? import_iovec+0x31/0x40
[  +0.000003]  ? sendmsg_copy_msghdr+0x7c/0xa0
[  +0.000003]  ? rtnl_unlock+0xe/0x20
[  +0.000003]  ___sys_sendmsg+0x81/0xc0
[  +0.000004]  ? mntput_no_expire+0x53/0x2d0
[  +0.000004]  ? rseq_get_rseq_cs.isra.0+0x1b/0x220
[  +0.000004]  ? __call_rcu+0xa8/0x2b0
[  +0.000005]  ? rseq_ip_fixup+0x72/0x1a0
[  +0.000003]  ? __fput+0x123/0x260
[  +0.000004]  ? __fget_light+0xa7/0x130
[  +0.000004]  __sys_sendmsg+0x62/0xb0
[  +0.000004]  ? xfrm_state_find+0x120/0xcf0
[  +0.000004]  ? fput+0x13/0x20
[  +0.000004]  __x64_sys_sendmsg+0x1d/0x20
[  +0.000004]  do_syscall_64+0x5c/0xc0
[  +0.000003]  ? do_syscall_64+0x69/0xc0
[  +0.000002]  ? do_syscall_64+0x69/0xc0
[  +0.000002]  ? do_syscall_64+0x69/0xc0
[  +0.000002]  ? asm_sysvec_apic_timer_interrupt+0xa/0x20
[  +0.000005]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[  +0.000005] RIP: 0033:0x7f2edafc8b4d
[  +0.000002] Code: 28 89 54 24 1c 48 89 74 24 10 89 7c 24 08 e8 3a 8f f6 ff 8b 54 24 1c 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 33 44 89 c7 48 89 44 24 08 e8 7e 8f f6 ff 48
[  +0.000003] RSP: 002b:00007fff6c91ae40 EFLAGS: 00000293 ORIG_RAX: 000000000000002e
[  +0.000004] RAX: ffffffffffffffda RBX: 000000000000075e RCX: 00007f2edafc8b4d
[  +0.000002] RDX: 0000000000000000 RSI: 00007fff6c91ae80 RDI: 000000000000000c
[  +0.000002] RBP: 000055a8d8d92040 R08: 0000000000000000 R09: 0000000000000000
[  +0.000002] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
[  +0.000001] R13: 00007fff6c91afd0 R14: 00007fff6c91afcc R15: 0000000000000000
[  +0.000004]  </TASK>
[  +0.000002] ---[ end trace 0000000000000000 ]---
[  +0.419123] IPv6: ADDRCONF(NETDEV_CHANGE): wlx7c10c964bf0d: link becomes ready
Cyberunner23 commented 2 years ago

Issue seems to be related to NetworkManager, will close and reopen to remove unrelated comments