Answer the question
In order to leave comments, you need to log in
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$
/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);
^~~~~~~~~~
[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
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.
ptimer->function = pfunc;
ptimer->data = (unsigned long)cntx;
init_timer(ptimer);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question