I have an USB wifi adapter (TPLINK TL-WN822N. I downloaded the linux driver from the manufacturers download page and tried to compile it, but I always get errors when I try to run the make command.
I have a Linux Mint 19.1 with XFCE desktop. The uname -a gives the followings:
My opinion is that the problem is caused by the gcc version.
I also have an LXLE linux installed in an old PC and the driver compilation can be done without any errors. And the installed driver is working perfectly.
The Linux Mint has a gcc version: gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04) make version: GNU Make 4.1
The Linux LXLE has a gcc version: gcc version 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) make version: GNU Make 4.1
When I start the make command I get the following messages:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-47-generic/build M=/home/user/Asztal/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047 modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-47-generic'
CC [M] /home/user/Asztal/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/core/rtw_cmd.o
In file included from /home/user/Asztal/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/osdep_service.h:47:0,
from /home/user/Asztal/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/drv_types.h:27,
from /home/user/Asztal/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/core/rtw_cmd.c:17:
/home/user/Asztal/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/user/Asztal/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/osdep_service_linux.h:299:8: error: ‘_timer {aka struct timer_list}’ has no member named ‘data’
ptimer->data = (unsigned long)cntx;
^~
/home/user/Asztal/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/osdep_service_linux.h:300:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
init_timer(ptimer);
^~~~~~~~~~
_init_timer
cc1: some warnings being treated as errors
scripts/Makefile.build:332: recipe for target '/home/user/Asztal/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/core/rtw_cmd.o' failed
make[2]: *** [/home/user/Asztal/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/core/rtw_cmd.o] Error 1
Makefile:1552: recipe for target '_module_/home/user/Asztal/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047' failed
make[1]: *** [_module_/home/user/Asztal/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-47-generic'
Makefile:1828: recipe for target 'modules' failed
make: *** [modules] Error 2
If I am right, and the problem is caused by the newer gcc version, then is there a way to use another version of gcc for casual compilation?
If something else is the problem, what could it be?
I am new in the Linux platform, and may be the answer is so profane, but some help would be really appreciated.
ps. And sorry for my English, is not my mother language ;
At least I found the solution with a little help. Here is what I did to get working my USB wifi adapter after system restart:
But the procedure is not finished here, because the system will use the originally installed driver, so we have to blacklist it:
Now it should work in the proper way. For me it worked.
Hope, it will help to someone...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With