RTL882xBU network driver: Compilation issue with kernel 5.10

Hello I am compiling this driver for RTL882xBU network device on Fedora 32:

On kernel 5.9 it works very fine i was able to compile without any issue.

Since i have upgraded to 5.10.7-100.fc32.x86_64 i get the following compilation error when running make command:

      CC [M]  /usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.o
/usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.c: In function ‘isFileReadable’:
/usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.c:2203:11: error: implicit declaration of function ‘get_fs’; did you mean ‘get_sa’? [-Werror=implicit-function-declaration]
 2203 |   oldfs = get_fs();
      |           ^~~~~~
      |           get_sa
/usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.c:2203:11: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
/usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.c:2205:3: error: implicit declaration of function ‘set_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration]
 2205 |   set_fs(KERNEL_DS);
      |   ^~~~~~
      |   sget_fc
/usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.c:2205:10: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2205 |   set_fs(KERNEL_DS);
      |          ^~~~~~~~~
      |          KERNFS_NS
/usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.c:2205:10: note: each undeclared identifier is reported only once for each function it appears in
/usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.c: In function ‘retriveFromFile’:
/usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.c:2245:12: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
 2245 |    oldfs = get_fs();
      |            ^~~~~~
/usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.c:2247:11: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2247 |    set_fs(KERNEL_DS);
      |           ^~~~~~~~~
      |           KERNFS_NS
/usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.c: In function ‘storeToFile’:
/usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.c:2284:12: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
 2284 |    oldfs = get_fs();
      |            ^~~~~~
/usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.c:2286:11: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2286 |    set_fs(KERNEL_DS);
      |           ^~~~~~~~~
      |           KERNFS_NS
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:279: /usr/src/rtl88x2bu-5.6.1/os_dep/osdep_service.o] Error 1

What’s wrong? My Fedora 32 is updated with the latest kernel headers packages.

Thanks for your help

Laurent

All right. I have solved the issue.
For 5.10 there is a branch dedicated:

I have switched to this branch. The code compiles correctly.
Thanks to myself.
:laughing:

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.