我在 Ubuntu 16.04 上使用外部网卡 D-LINK DWA-171 - 型号 C 时遇到问题
尝试编译从以下网站下载的官方驱动程序时https://support.dlink.com/ProductInfo.aspx?m=DWA-171发生错误
praca@Praca:~/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821
CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-42-generic/build M=/home/praca/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525 modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-42-generic'
CC [M] /home/praca/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525/core/rtw_cmd.o
In file included from /home/praca/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525/include/osdep_service.h:47:0,
from /home/praca/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525/include/drv_types.h:27,
from /home/praca/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525/core/rtw_cmd.c:17:
/home/praca/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/praca/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525/include/osdep_service_linux.h:299:8: error: ‘_timer {aka struct timer_list}’ has no member named ‘data’
ptimer->data = (unsigned long)cntx;
^
/home/praca/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525/include/osdep_service_linux.h:300: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:332: polecenia dla obiektu '/home/praca/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525/core/rtw_cmd.o' nie powiodły się
make[2]: *** [/home/praca/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525/core/rtw_cmd.o] Błąd 1
Makefile:1551: recipe for target '_module_/home/praca/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525' failed
make[1]: *** [_module_/home/praca/Pobrane/20180518_DWA-171C_RTL8811CU_Linux_driver_v5.2.15.2/rtl8821CU_WiFi_linux_v5.2.15.2_27778.20180515_COEX20171114-2525] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-42-generic'
Makefile:1856: recipe for target 'modules' failed
make: *** [modules] Error 2
所以我找到了其他解决方案 http://startusingubuntu.blogspot.com/2014/08/install-driver-for-d-link-dwd-171.html 可是我按全手册操作之后,外网卡还是不行。
我还对官方驱动程序附带的自述文件中的提及感兴趣
Please note that DWA-171C support auto install driver function in Windwos OS,
user should exit Flash disk mode(default) to active adapter mode.
该lsusb
命令也没有找到名为“D-Link”的任何内容。
praca@Praca:~$ lsusb
Bus 002 Device 004: ID 0bda:1a2b Realtek Semiconductor Corp.
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 1d57:0005 Xenta Wireless Receiver (Keyboard and Mouse)
Bus 001 Device 003: ID 1a2c:0c21 China Resource Semico Co., Ltd
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
PS. 外置网卡在Windows10上完美运行
我怎么解决这个问题?
预先感谢您的帮助。