From 67d04991984ce7fd6b0c762cc59854c99634c496 Mon Sep 17 00:00:00 2001 From: lean Date: Fri, 8 Jul 2022 20:28:09 +0800 Subject: [PATCH] r8168: add kernel 6.1 support Signed-off-by: Tianling Shen --- package/kernel/r8168/patches/030-6.1-support.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 package/kernel/r8168/patches/030-6.1-support.patch diff --git a/package/kernel/r8168/patches/030-6.1-support.patch b/package/kernel/r8168/patches/030-6.1-support.patch new file mode 100644 index 0000000000..00149974b0 --- /dev/null +++ b/package/kernel/r8168/patches/030-6.1-support.patch @@ -0,0 +1,14 @@ +--- a/src/r8168.h ++++ b/src/r8168.h +@@ -566,7 +566,11 @@ typedef int *napi_budget; + 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(ndev, &priv->napi, function, weight) ++#else ++#define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add_weight(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;