答案1
由于 Linux 内核netdevice
API 的一些最新更改,您会收到此错误。更具体地说,它的ndo_select_queue
定义如下这在5.1中:
u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev,
select_queue_fallback_t fallback);
但它被改为这在5.2中:
u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev);
所以处理程序os_intfs.c
也需要改变。
作为一个快速解决方案,只需删除参数fallback
似乎就可以让构建为我工作:
diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c
index b183a09..42f32a8 100644
--- a/os_dep/linux/os_intfs.c
+++ b/os_dep/linux/os_intfs.c
@@ -1101,8 +1101,7 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(4,19,0))
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,
- struct net_device *sb_dev,
- select_queue_fallback_t fallback)
+ struct net_device *sb_dev)
#else
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
这里还有一个补丁:https://github.com/quickreflex/rtl8188eus/issues/28
基本上,如果您对补丁和源代码感到不舒服,只需进入os_dep/linux/os_intfs.c
第 1103 行并将其替换为:
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev,
select_queue_fallback_t fallback)
有了这个:
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev)