From 32ce9293045ffdd5ad2320cf1c172eb968c48318 Mon Sep 17 00:00:00 2001 From: sbwml <984419930@qq.com> Date: Mon, 2 Jan 2023 20:07:02 +0800 Subject: [PATCH] fix linux-6.1 --- patches/002-fix-linux-6.1.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 patches/002-fix-linux-6.1.patch diff --git a/patches/002-fix-linux-6.1.patch b/patches/002-fix-linux-6.1.patch new file mode 100644 index 0000000..185163a --- /dev/null +++ b/patches/002-fix-linux-6.1.patch @@ -0,0 +1,14 @@ +--- a/r8168.h +--- b/r8168.h +@@ -566,7 +566,11 @@ + typedef struct napi_struct *napi_ptr; + typedef int napi_budget; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) ++#define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add_weight(ndev, &priv->napi, function, weight) ++#else + #define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add(ndev, &priv->napi, function, weight) ++#endif + #define RTL_NAPI_QUOTA(budget, ndev) min(budget, budget) + #define RTL_GET_PRIV(stuct_ptr, priv_struct) container_of(stuct_ptr, priv_struct, stuct_ptr) + #define RTL_GET_NETDEV(priv_ptr) struct net_device *dev = priv_ptr->dev;