rtl88x2bu-driver icon indicating copy to clipboard operation
rtl88x2bu-driver copied to clipboard

cannot build the driver

Open multiedit opened this issue 5 years ago • 1 comments

Linux kernel: Linux user-comp 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

I cloned it first: git clone https://github.com/its-izhar/rtl88x2bu-driver.git

Here are the messages:

/home/user/rtl88x2bu-driver/os_dep/linux/os_intfs.c:1433:22: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .ndo_select_queue = rtw_select_queue, ^~~~~~~~~~~~~~~~ /home/user/rtl88x2bu-driver/os_dep/linux/os_intfs.c:1433:22: note: (near initialization for ‘rtw_netdev_ops.ndo_select_queue’) CC [M] /home/user/rtl88x2bu-driver/os_dep/linux/ioctl_cfg80211.o cc1: some warnings being treated as errors scripts/Makefile.build:330: recipe for target '/home/user/rtl88x2bu-driver/os_dep/linux/os_intfs.o' failed make[2]: *** [/home/user/rtl88x2bu-driver/os_dep/linux/os_intfs.o] Error 1 make[2]: *** Waiting for unfinished jobs.... Makefile:1577: recipe for target 'module/home/user/rtl88x2bu-driver' failed make[1]: *** [module/home/user/rtl88x2bu-driver] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-66-generic' Makefile:1986: recipe for target 'modules' failed make: *** [modules] Error 2

multiedit avatar Nov 13 '19 21:11 multiedit

This seems to fix it for me:

diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c
index 1577a44..0495b85 100644
--- a/os_dep/linux/os_intfs.c
+++ b/os_dep/linux/os_intfs.c
@@ -1292,7 +1292,7 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
 
 static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
-	#if LINUX_VERSION_CODE <= KERNEL_VERSION(4, 15, 0)
+	#if LINUX_VERSION_CODE <= KERNEL_VERSION(4, 18, 0)
 	, void *accel_priv
 	#else
 	, struct net_device *sb_dev

iulian3144 avatar Jan 03 '21 16:01 iulian3144