USB wi-fi adapter drivers. HELP! [duplicate]
New linux user here, and i have no idea how drivers work, specially ones that are not included in the kernel. I am on Ubuntu 20.04 and the lsusb gives me
Bus 001 Device 004: ID 2357:0115 TP-Link 802.11ac NIC
So the issue is with the official linux driver provided by the manufacturer: https://www.tp-link.com/us/support/download/archer-t4u/#Driver Following the installation guide: https://static.tp-link.com/2018/201812/20181207/Installation%20Guide%20for%20Linux.pdf i get 2 errors after the make command:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.8.0-43-generic/build M=/home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED modules
make[1]: Entering directory '/usr/src/linux-headers-5.8.0-43-generic'
CC [M] /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/core/rtw_cmd.o
In file included from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/osdep_service.h:42,
from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/drv_types.h:27,
from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/core/rtw_cmd.c:17:
/home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/osdep_service_linux.h:282:8: error: ‘_timer’ {aka ‘struct timer_list’} has no member named ‘data’
282 | ptimer->data = (unsigned long)cntx;
| ^~
/home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/osdep_service_linux.h:283:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
283 | init_timer(ptimer);
| ^~~~~~~~~~
| _init_timer
In file included from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/drv_types.h:30,
from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/core/rtw_cmd.c:17:
/home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/wifi.h: At top level:
/home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/wifi.h:1014: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
1014 | #define IEEE80211_MAX_AMPDU_BUF 0x40
|
In file included from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/osdep_service_linux.h:83,
from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/osdep_service.h:42,
from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/drv_types.h:27,
from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/core/rtw_cmd.c:17:
./include/linux/ieee80211.h:1600: note: this is the location of the previous definition
1600 | #define IEEE80211_MAX_AMPDU_BUF 0x100
|
In file included from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/drv_types.h:77,
from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/core/rtw_cmd.c:17:
/home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/rtw_security.h:242:8: error: redefinition of ‘struct sha256_state’
242 | struct sha256_state {
| ^~~~~~~~~~~~
In file included from ./include/linux/filter.h:23,
from ./include/net/sock.h:59,
from ./include/linux/tcp.h:19,
from ./include/linux/ipv6.h:88,
from ./include/net/addrconf.h:50,
from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/osdep_service_linux.h:48,
from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/osdep_service.h:42,
from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/include/drv_types.h:27,
from /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/core/rtw_cmd.c:17:
./include/crypto/sha.h:84:8: note: originally defined here
84 | struct sha256_state {
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:290: /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1780: /home/z3/tmpstuff/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED] Error 2
is there a way to correct the 2 errors ? since it doesn't create any .ko file as it should
and also if successful copying the resulted file to /lib/modules/[kernel version]/kernel/drivers/net/wireless/ is the way to go ?
You can install drivers from Cilynx's GitHub repo for RTL88x2BU that has worked well for me.
As detailed in the repo, I've installed the drivers using DKMS installation method:
git clone https://github.com/cilynx/rtl88x2bu.git
cd rtl88x2bu
VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf)
sudo rsync -rvhP ./ /usr/src/rtl88x2bu-${VER}
sudo dkms add -m rtl88x2bu -v ${VER}
sudo dkms build -m rtl88x2bu -v ${VER}
sudo dkms install -m rtl88x2bu -v ${VER}
sudo modprobe 88x2bu