R
R
researcher11112018-03-25 21:32:23
linux
researcher1111, 2018-03-25 21:32:23

What errors does this code give?

There is a Thinkpad e470. Wifi won't start on it. Worked up a patch
The script produces such errors

[email protected]:~/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.16.0-999-lowlatency/build M=/home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212  modules
make[1]: Entering directory '/usr/src/linux-headers-4.16.0-999-lowlatency'
Makefile:973: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
  CC [M]  /home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212/core/rtw_cmd.o
In file included from /home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212/include/osdep_service.h:52:0,
                 from /home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212/include/drv_types.h:32,
                 from /home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212/core/rtw_cmd.c:22:
/home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212/include/osdep_service_linux.h:295:8: error: ‘_timer {aka struct timer_list}’ has no member named ‘data’
  ptimer->data = (unsigned long)cntx;
        ^~
/home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212/include/osdep_service_linux.h:296:2: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration]
  init_timer(ptimer);
  ^~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:324: recipe for target '/home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212/core/rtw_cmd.o' failed
make[2]: *** [/home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212/core/rtw_cmd.o] Error 1
Makefile:1558: recipe for target '_module_/home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212' failed
make[1]: *** [_module_/home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.16.0-999-lowlatency'
Makefile:1902: recipe for target 'modules' failed
make: *** [modules] Error 2
[email protected]:~/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212$

I'm not special in c (or what is it?), tell me what kind of errors and how to fix?
[UPDATE]
Launched with argument -k (keep going)
Everywhere there is only one error:
/home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212/include/osdep_service_linux.h:296:2: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration]
  init_timer(ptimer);
  ^~~~~~~~~~

[UPDATE]
The solution corrected the error, but the patch did not give anything ((
[UPDATE]
I ran make a second time, here are the errors
[email protected]:~/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.16.0-999-lowlatency/build M=/home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212  modules
make[1]: Entering directory '/usr/src/linux-headers-4.16.0-999-lowlatency'
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "__vfs_read" [/home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212/8821ce.ko] undefined!
make[1]: Leaving directory '/usr/src/linux-headers-4.16.0-999-lowlatency'
[email protected]:~/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212$

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2018-03-25
@researcher1111

in the file /home/dev/rtl8821CE_WiFi_linux_v5.2.5.1_25561.20171207_COEX20170310-1212/include/osdep_service_linux.h
on line 22 add add after line 293 and remove these lines.#include <linux/timer.h>

ptimer->function = pfunc;
ptimer->data = (unsigned long)cntx;
init_timer(ptimer);

save and run make

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question