tomaspinho / rtl8821ce

Other
1.58k stars 412 forks source link

kernel 5.10.2 setfs(KERNEL_DS) ripped out #197

Closed hwpfeil closed 3 years ago

hwpfeil commented 3 years ago

Please see https://github.com/torvalds/linux/commit/736706bee3298208343a76096370e4f6a5c55915 os_dep/osdep_service.c lots of errors, include/rtw_security.h redefines struct sha256_state, include/wifi.h redefines IEEE80211_MAX_AMPDU_BUF from 0x100 to 0x40....

For the 5.4.85 kernel, I copy your rtl8821ce folder to drivers/net/wireless/realtek, then add your Kconfig and Makefile entries to the existing realetek files, compiles and works so I can write this. When I tried that with 5.10.2, errors abound.

No reason to change anything because someday the rtl88_8821ce might actually work. HP is apparently enamored with Realtek 8821ce wifi/bluetooth cards, for reasons which I cannot explain.

tomaspinho commented 3 years ago

Did you try the latest version of the repository? set_fs changes were merged here: https://github.com/tomaspinho/rtl8821ce/pull/181/files

Can you provide me with the failing build logs for 5.10.2?

fierevere commented 3 years ago

5.10.2 works after ^^ above set_fs changeset. However i can see warning in dmesg on reconnection to other wifi network i havent seen before. But it seem to do not cause any problems.

[  109.397534] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 3540.137861] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 6400.908870] ------------[ cut here ]------------
[ 6400.908955] WARNING: CPU: 3 PID: 2016 at rtw_lps_state_chk+0x39/0x3f [8821ce]
[ 6400.908957] Modules linked in: cpufreq_powersave vfat fat usbmouse usbhid uas cdc_ether usb_storage usbnet r8152 mii sch_sfq wireguard curve25519_x86_64 libchacha20poly1305 chacha_x86_64 poly1305_x86_64 ip6_udp_tunnel udp_tunnel libblake2s blake2s_x86_64 libcurve25519_generic libchacha libblake2s_generic cmac rfcomm lz4 lz4_compress zram nbd joydev hid_generic i2c_hid hid_multitouch bfq ipv6 crc_ccitt 8021q garp stp llc bnep btrfs blake2b_generic libcrc32c xor raid6_pq amdgpu 8821ce(O) mfd_core snd_hda_codec_realtek gpu_sched btusb kvm_amd snd_hda_codec_generic btrtl btbcm ledtrig_audio ttm snd_hda_codec_hdmi btintel kvm snd_hda_intel irqbypass drm_kms_helper snd_intel_dspcfg bluetooth crc32_pclmul crc32c_intel ghash_clmulni_intel syscopyarea sysfillrect sysimgblt snd_hda_codec fb_sys_fops aesni_intel snd_hda_core crypto_simd ecdh_generic ecc snd_pcsp drm cryptd glue_helper sdhci_pci snd_hwdep cqhci snd_pcm cfg80211 sdhci input_leds snd_timer serio_raw snd_rn_pci_acp3x snd agpgart mmc_core
[ 6400.909084]  i2c_algo_bit soundcore snd_pci_acp3x ccp i2c_piix4 k10temp ideapad_laptop wmi_bmof sparse_keymap wmi rfkill i2c_designware_platform iosf_mbi i2c_designware_core video pinctrl_amd acpi_cpufreq
[ 6400.909107] CPU: 3 PID: 2016 Comm: RTW_CMD_THREAD Tainted: G           O      5.10.2-darkness #1
[ 6400.909108] Hardware name: LENOVO 81FB/LNVNB161216, BIOS 7WCN36WW 05/10/2019
[ 6400.909171] RIP: 0010:rtw_lps_state_chk+0x39/0x3f [8821ce]
[ 6400.909174] Code: fd bb 0b 00 00 00 be 04 06 00 00 48 89 ef e8 7e 71 f9 ff a8 80 74 15 bf 01 00 00 00 e8 8e 7b fd ff 8d 43 ff 89 c3 a8 ff 75 dc <0f> 0b 5b 5d c3 c3 e8 f4 4a 45 f6 55 53 48 83 ec 08 48 89 d3 48 8b
[ 6400.909176] RSP: 0018:ffffc099c0493ce8 EFLAGS: 00010246
[ 6400.909179] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000033f308
[ 6400.909181] RDX: ffff9b6b782de080 RSI: 0000000000000000 RDI: ffffc099c0493c48
[ 6400.909182] RBP: ffffc099c02fe000 R08: 000005d253e5a800 R09: ffff9b6a40d00c00
[ 6400.909184] R10: 0000000000000450 R11: ffff9b6b782e91e4 R12: ffffc099c041d000
[ 6400.909185] R13: ffffc099c041d000 R14: 0000000000000000 R15: 0000000000000000
[ 6400.909187] FS:  0000000000000000(0000) GS:ffff9b6b782c0000(0000) knlGS:0000000000000000
[ 6400.909189] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 6400.909191] CR2: 00007f60e0660008 CR3: 000000012e40a000 CR4: 00000000003506e0
[ 6400.909192] Call Trace:
[ 6400.909257]  SetHwReg+0x163/0x54a [8821ce]
[ 6400.909317]  rtl8821c_sethwreg+0x733/0x772 [8821ce]
[ 6400.909377]  sethwreg+0x1e/0x47 [8821ce]
[ 6400.909438]  rtw_hal_set_hwreg+0x15/0x16 [8821ce]
[ 6400.909486]  rtw_set_ps_mode+0xe9/0x206 [8821ce]
[ 6400.909535]  LPS_Leave+0xd5/0xf5 [8821ce]
[ 6400.909568]  _lps_chk_by_pkt_cnts+0x31/0x69 [8821ce]
[ 6400.909601]  traffic_status_watchdog+0x1df/0x2a7 [8821ce]
[ 6400.909643]  ? _rtw_mi_dynamic_check_timer_handlder+0x10/0x10 [8821ce]
[ 6400.909676]  ? session_tracker_cmd_hdl+0x1cd/0x1cd [8821ce]
[ 6400.909708]  rtw_iface_dynamic_chk_wk_hdl+0x39/0x43 [8821ce]
[ 6400.909750]  _rtw_mi_dynamic_chk_wk_hdl+0xa/0x10 [8821ce]
[ 6400.909793]  _rtw_mi_process+0x69/0x83 [8821ce]
[ 6400.909837]  rtw_mi_dynamic_chk_wk_hdl+0x1b/0x1c [8821ce]
[ 6400.909869]  rtw_dynamic_chk_wk_hdl+0xe/0x45 [8821ce]
[ 6400.909902]  rtw_drvextra_cmd_hdl+0x8c/0x285 [8821ce]
[ 6400.909933]  rtw_cmd_thread+0x291/0x3e4 [8821ce]
[ 6400.909965]  ? rtw_stop_cmd_thread+0x39/0x39 [8821ce]
[ 6400.909969]  kthread+0x108/0x140
[ 6400.909972]  ? kthread_park+0x90/0x90
[ 6400.909976]  ret_from_fork+0x22/0x30
[ 6400.909980] ---[ end trace dc5652f347f6a2c6 ]---
[ 6413.004899] ------------[ cut here ]------------
[ 6413.004979] WARNING: CPU: 0 PID: 2016 at rtw_lps_state_chk+0x39/0x3f [8821ce]
[ 6413.004981] Modules linked in: cpufreq_powersave vfat fat usbmouse usbhid uas cdc_ether usb_storage usbnet r8152 mii sch_sfq wireguard curve25519_x86_64 libchacha20poly1305 chacha_x86_64 poly1305_x86_64 ip6_udp_tunnel udp_tunnel libblake2s blake2s_x86_64 libcurve25519_generic libchacha libblake2s_generic cmac rfcomm lz4 lz4_compress zram nbd joydev hid_generic i2c_hid hid_multitouch bfq ipv6 crc_ccitt 8021q garp stp llc bnep btrfs blake2b_generic libcrc32c xor raid6_pq amdgpu 8821ce(O) mfd_core snd_hda_codec_realtek gpu_sched btusb kvm_amd snd_hda_codec_generic btrtl btbcm ledtrig_audio ttm snd_hda_codec_hdmi btintel kvm snd_hda_intel irqbypass drm_kms_helper snd_intel_dspcfg bluetooth crc32_pclmul crc32c_intel ghash_clmulni_intel syscopyarea sysfillrect sysimgblt snd_hda_codec fb_sys_fops aesni_intel snd_hda_core crypto_simd ecdh_generic ecc snd_pcsp drm cryptd glue_helper sdhci_pci snd_hwdep cqhci snd_pcm cfg80211 sdhci input_leds snd_timer serio_raw snd_rn_pci_acp3x snd agpgart mmc_core
[ 6413.005083]  i2c_algo_bit soundcore snd_pci_acp3x ccp i2c_piix4 k10temp ideapad_laptop wmi_bmof sparse_keymap wmi rfkill i2c_designware_platform iosf_mbi i2c_designware_core video pinctrl_amd acpi_cpufreq
[ 6413.005104] CPU: 0 PID: 2016 Comm: RTW_CMD_THREAD Tainted: G        W  O      5.10.2-darkness #1
[ 6413.005106] Hardware name: LENOVO 81FB/LNVNB161216, BIOS 7WCN36WW 05/10/2019
[ 6413.005168] RIP: 0010:rtw_lps_state_chk+0x39/0x3f [8821ce]
[ 6413.005172] Code: fd bb 0b 00 00 00 be 04 06 00 00 48 89 ef e8 7e 71 f9 ff a8 80 74 15 bf 01 00 00 00 e8 8e 7b fd ff 8d 43 ff 89 c3 a8 ff 75 dc <0f> 0b 5b 5d c3 c3 e8 f4 4a 45 f6 55 53 48 83 ec 08 48 89 d3 48 8b
[ 6413.005174] RSP: 0018:ffffc099c0493ce8 EFLAGS: 00010246
[ 6413.005177] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000003e5254
[ 6413.005178] RDX: ffff9b6b7821e080 RSI: 0000000000000000 RDI: ffffc099c0493c48
[ 6413.005180] RBP: ffffc099c02fe000 R08: 000005d524e06800 R09: ffff9b6a40d00000
[ 6413.005181] R10: 00000000000005d5 R11: ffff9b6b782291e4 R12: ffffc099c041d000
[ 6413.005183] R13: ffffc099c041d000 R14: 0000000000000000 R15: 0000000000000000
[ 6413.005185] FS:  0000000000000000(0000) GS:ffff9b6b78200000(0000) knlGS:0000000000000000
[ 6413.005187] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 6413.005188] CR2: 00007fdc33c20000 CR3: 00000001419f4000 CR4: 00000000003506f0
[ 6413.005189] Call Trace:
[ 6413.005254]  SetHwReg+0x163/0x54a [8821ce]
[ 6413.005314]  rtl8821c_sethwreg+0x733/0x772 [8821ce]
[ 6413.005375]  sethwreg+0x1e/0x47 [8821ce]
[ 6413.005436]  rtw_hal_set_hwreg+0x15/0x16 [8821ce]
[ 6413.005484]  rtw_set_ps_mode+0xe9/0x206 [8821ce]
[ 6413.005534]  LPS_Leave+0xd5/0xf5 [8821ce]
[ 6413.005566]  _lps_chk_by_pkt_cnts+0x31/0x69 [8821ce]
[ 6413.005600]  traffic_status_watchdog+0x1df/0x2a7 [8821ce]
[ 6413.005644]  ? _rtw_mi_dynamic_check_timer_handlder+0x10/0x10 [8821ce]
[ 6413.005676]  ? session_tracker_cmd_hdl+0x1cd/0x1cd [8821ce]
[ 6413.005708]  rtw_iface_dynamic_chk_wk_hdl+0x39/0x43 [8821ce]
[ 6413.005750]  _rtw_mi_dynamic_chk_wk_hdl+0xa/0x10 [8821ce]
[ 6413.005794]  _rtw_mi_process+0x69/0x83 [8821ce]
[ 6413.005838]  rtw_mi_dynamic_chk_wk_hdl+0x1b/0x1c [8821ce]
[ 6413.005870]  rtw_dynamic_chk_wk_hdl+0xe/0x45 [8821ce]
[ 6413.005902]  rtw_drvextra_cmd_hdl+0x8c/0x285 [8821ce]
[ 6413.005934]  rtw_cmd_thread+0x291/0x3e4 [8821ce]
[ 6413.005966]  ? rtw_stop_cmd_thread+0x39/0x39 [8821ce]
[ 6413.005972]  kthread+0x108/0x140
[ 6413.005974]  ? kthread_park+0x90/0x90
[ 6413.005978]  ret_from_fork+0x22/0x30
[ 6413.005982] ---[ end trace dc5652f347f6a2c7 ]---