
答案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)