Closed sergey-suloev closed 3 years ago
It seems like <asm/uaccess.h> include missing
After investigation found that set_fs() and friends have been removed to ARM64 and so we need a workaround
Fixed by #50
Note assuming that the rtl8189es code is similar to the rtl8723bs code, then it might need something similar to these 2 fixes to not only compile, but also actually work, together with 5.11:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/staging/rtl8723bs?id=81f153faacd04c049e5482d6ff33daddc30ed44e https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/staging/rtl8723bs?id=50af06d43eab6b09afc37aa7c8bbf69b14a3b2f7
@jwrdegoede I personally can't comment these 2 fixes as I am not a realtek driver expert. What I can say is that current driver works fine on my NanoPi A64 and kernel 5.11
/home/sergey/Projects/orpaltech/drivers/realtek/rtl8189ES/os_dep/osdep_service.c: In function ‘isFileReadable’: /home/sergey/Projects/orpaltech/drivers/realtek/rtl8189ES/os_dep/osdep_service.c:1956:11: error: implicit declaration of function ‘get_fs’; did you mean ‘get_sa’? [-Werror=implicit-function-declaration] oldfs = get_fs(); set_fs(KERNEL_DS); ^}’ from type ‘int’
oldfs = get_fs(); set_fs(KERNEL_DS);
^
/home/sergey/Projects/orpaltech/drivers/realtek/rtl8189ES/os_dep/osdep_service.c:1956:21: error: implicit declaration of function ‘set_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration]
oldfs = get_fs(); set_fs(KERNEL_DS);
^}’ from type ‘int’
oldfs = get_fs(); set_fs(KERNEL_DS);
^
/home/sergey/Projects/orpaltech/drivers/realtek/rtl8189ES/os_dep/osdep_service.c:1984:29: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
oldfs = get_fs(); set_fs(KERNEL_DS);
^}’ from type ‘int’
oldfs = get_fs(); set_fs(KERNEL_DS);
^
/home/sergey/Projects/orpaltech/drivers/realtek/rtl8189ES/os_dep/osdep_service.c:2018:29: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
oldfs = get_fs(); set_fs(KERNEL_DS);
^
~get_sa /home/sergey/Projects/orpaltech/drivers/realtek/rtl8189ES/os_dep/osdep_service.c:1956:9: error: incompatible types when assigning to type ‘mm_segment_t {aka struct~sget_fc /home/sergey/Projects/orpaltech/drivers/realtek/rtl8189ES/os_dep/osdep_service.c:1956:28: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’? oldfs = get_fs(); set_fs(KERNEL_DS); ^~~~~ KERNFS_NS /home/sergey/Projects/orpaltech/drivers/realtek/rtl8189ES/os_dep/osdep_service.c:1956:28: note: each undeclared identifier is reported only once for each function it appears in /home/sergey/Projects/orpaltech/drivers/realtek/rtl8189ES/os_dep/osdep_service.c: In function ‘retriveFromFile’: /home/sergey/Projects/orpaltech/drivers/realtek/rtl8189ES/os_dep/osdep_service.c:1984:10: error: incompatible types when assigning to type ‘mm_segment_t {aka struct~~~~ KERNFS_NS /home/sergey/Projects/orpaltech/drivers/realtek/rtl8189ES/os_dep/osdep_service.c: In function ‘storeToFile’: /home/sergey/Projects/orpaltech/drivers/realtek/rtl8189ES/os_dep/osdep_service.c:2018:10: error: incompatible types when assigning to type ‘mm_segment_t {aka struct~~~~ KERNFS_NS cc1: some warnings being treated as errors