在 Ubuntu 18.04 上安装 TP-LINK-WN722N-V3 时出错

在 Ubuntu 18.04 上安装 TP-LINK-WN722N-V3 时出错

我试图编译从以下网址下载的 TP-LINK-WN722N-V3 驱动程序这里,并抛出了以下错误:

$ sudo make
[sudo] password for andco: 
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-43-generic/build M=/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222  modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-43-generic'
  CC [M]  /home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.o
In file included from /home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h:46:0,
                 from /home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/drv_types.h:32,
                 from /home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:22:
/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service_linux.h:288:8: error: ‘_timer {aka struct timer_list}’ has no member named ‘data’
  ptimer->data = (unsigned long)cntx;
        ^~
/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service_linux.h:289:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
  init_timer(ptimer);
  ^~~~~~~~~~
  _init_timer
In file included from /home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/drv_types.h:32:0,
                 from /home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:22:
/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h: In function ‘thread_enter’:
/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h:374:2: error: implicit declaration of function ‘allow_signal’; did you mean ‘do_signal’? [-Werror=implicit-function-declaration]
  allow_signal(SIGTERM);
  ^~~~~~~~~~~~
  do_signal
/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h: In function ‘flush_signals_thread’:
/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h:384:6: error: implicit declaration of function ‘signal_pending’; did you mean ‘timer_pending’? [-Werror=implicit-function-declaration]
  if (signal_pending(current))
      ^~~~~~~~~~~~~~
      timer_pending
/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h:385:3: error: implicit declaration of function ‘flush_signals’; did you mean ‘do_signal’? [-Werror=implicit-function-declaration]
   flush_signals(current);
   ^~~~~~~~~~~~~
   do_signal
cc1: some warnings being treated as errors
scripts/Makefile.build:332: recipe for target '/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.o' failed
make[2]: *** [/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.o] Error 1
Makefile:1551: recipe for target '_module_/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222' failed
make[1]: *** [_module_/home/andco/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-43-generic'
Makefile:1911: recipe for target 'modules' failed

修改信息

andco@andco-Lenovo-ideapad-330-14AST:~$ modinfo r8188eu
filename:       /lib/modules/4.15.0-43-generic/kernel/drivers/staging/rtl8188eu/r8188eu.ko
version:        v4.1.4_6773.20130222
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
srcversion:     F8246795A04531CE815E5AD
alias:          usb:v0BDApFFEFd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0DF6p0076d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2357p010Cd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p3311d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p3310d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p330Fd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v07B8p8179d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v056Ep4008d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp0179d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp8179d*dc*dsc*dp*ic*isc*ip*in*
depends:        cfg80211
staging:        Y
retpoline:      Y
intree:         Y
name:           r8188eu
vermagic:       4.15.0-43-generic SMP mod_unload 
signat:         PKCS#7
signer:         
sig_key:        
sig_hashalgo:   md4
parm:           rtw_ips_mode:The default IPS mode (int)
parm:           ifname:The default name to allocate for first interface (charp)
parm:           if2name:The default name to allocate for second interface (charp)
parm:           rtw_initmac:charp
parm:           rtw_channel_plan:int
parm:           rtw_channel:int
parm:           rtw_wmm_enable:int
parm:           rtw_vrtl_carrier_sense:int
parm:           rtw_vcs_type:int
parm:           rtw_ht_enable:int
parm:           rtw_cbw40_enable:int
parm:           rtw_ampdu_enable:int
parm:           rtw_rx_stbc:int
parm:           rtw_ampdu_amsdu:int
parm:           rtw_power_mgnt:int
parm:           rtw_smart_ps:int
parm:           rtw_wifi_spec:int
parm:           rtw_antdiv_cfg:int
parm:           rtw_antdiv_type:int
parm:           rtw_enusbss:int
parm:           rtw_hwpdn_mode:int
parm:           rtw_max_roaming_times:The max roaming times to try (uint)
parm:           rtw_fw_iol:FW IOL (int)
parm:           rtw_mc2u_disable:int
parm:           rtw_80211d:Enable 802.11d mechanism (int)
parm:           rtw_notch_filter:0:Disable, 1:Enable, 2:Enable only for P2P (uint)
parm:           debug:Set debug level (1-9) (default 1) (int)
parm:           monitor_enable:Enable monitor inferface (default: false) (bool)

系统盘

Bus 001 Device 005: ID 5986:1127 Acer, Inc 
Bus 001 Device 004: ID 0bda:c024 Realtek Semiconductor Corp. 
Bus 001 Device 007: ID 275d:0ba6  
Bus 001 Device 002: ID 0438:7900 Advanced Micro Devices, Inc. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 003: ID 2357:010c  
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

相关内容