[Seek Help] USB网卡驱动编译失败,报‘usbnet_get_stats64’ undeclared here
Experiences and Insight 1611 views · 2 replies ·
历山居士
deepin
2022-07-20 06:55
Author
我是ASIX的AX88179 USB网卡,从官网下载驱动源码,按说明编译:
1、解压缩 tar -xf DRIVER_SOURCE_PACKAGE.tar.bz2
2、编译 make,编译成功后会获得驱动文件ax88179_178a.ko
3、加载驱动(make install或者直接打开设备管理器的网络适配器,找到AX88179右键更新驱动,然后选择ax88179_178a.ko确定)
make的时候,报error: ‘usbnet_get_stats64’ undeclared here (not in a function);
完整记录如下:
make -C /lib/modules/5.15.34-amd64-desktop/build M=/root/Documents/AX88179 modules
make[1]: 进入目录“/usr/src/linux-headers-5.15.34-amd64-desktop”
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Uos 8.3.0.6-1+dde) 8.3.0
You are using: gcc (Uos 8.3.0.3-3+rebuild) 8.3.0
CC [M] /root/Documents/AX88179/ax88179_178a.o
/root/Documents/AX88179/ax88179_178a.c:1030:21: error: ‘usbnet_get_stats64’ undeclared here (not in a function); did you mean ‘usbnet_cdc_status’?
.ndo_get_stats64 = usbnet_get_stats64,
^~~~~~~~~~~~~~~~~~
usbnet_cdc_status
make[2]: *** [scripts/Makefile.build:277:/root/Documents/AX88179/ax88179_178a.o] 错误 1
make[1]: *** [Makefile:1868:/root/Documents/AX88179] 错误 2
make[1]: 离开目录“/usr/src/linux-headers-5.15.34-amd64-desktop”
make: *** [Makefile:30:default] 错误 2
我是ASIX的AX88179 USB网卡,从官网下载驱动源码,按说明编译:
1、解压缩
tar -xf DRIVER_SOURCE_PACKAGE.tar.bz22、编译
make,编译成功后会获得驱动文件ax88179_178a.ko3、加载驱动(
make install或者直接打开设备管理器的网络适配器,找到AX88179右键更新驱动,然后选择ax88179_178a.ko确定)make的时候,报error: ‘usbnet_get_stats64’ undeclared here (not in a function);
完整记录如下:
make -C /lib/modules/5.15.34-amd64-desktop/build M=/root/Documents/AX88179 modules
make[1]: 进入目录“/usr/src/linux-headers-5.15.34-amd64-desktop”
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Uos 8.3.0.6-1+dde) 8.3.0
You are using: gcc (Uos 8.3.0.3-3+rebuild) 8.3.0
CC [M] /root/Documents/AX88179/ax88179_178a.o
/root/Documents/AX88179/ax88179_178a.c:1030:21: error: ‘usbnet_get_stats64’ undeclared here (not in a function); did you mean ‘usbnet_cdc_status’?
.ndo_get_stats64 = usbnet_get_stats64,
^~~~~~~~~~~~~~~~~~
usbnet_cdc_status
make[2]: *** [scripts/Makefile.build:277:/root/Documents/AX88179/ax88179_178a.o] 错误 1
make[1]: *** [Makefile:1868:/root/Documents/AX88179] 错误 2
make[1]: 离开目录“/usr/src/linux-headers-5.15.34-amd64-desktop”
make: *** [Makefile:30:default] 错误 2
请教:是我哪里做错了?