summaryrefslogtreecommitdiff
path: root/net-misc/r8168/files/r8168-8.051.02-6.1-fix.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-19 13:48:26 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-19 13:48:26 +0000
commit844ae757702c53a56ee57056873a8204d256d47e (patch)
tree72fb217d6155c4468b6d34e67a37b45502cbaf1d /net-misc/r8168/files/r8168-8.051.02-6.1-fix.patch
parentfcefa9aa213e0ff26901b351fccd47393113ae5d (diff)
gentoo auto-resync : 19:12:2022 - 13:48:25
Diffstat (limited to 'net-misc/r8168/files/r8168-8.051.02-6.1-fix.patch')
-rw-r--r--net-misc/r8168/files/r8168-8.051.02-6.1-fix.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/net-misc/r8168/files/r8168-8.051.02-6.1-fix.patch b/net-misc/r8168/files/r8168-8.051.02-6.1-fix.patch
new file mode 100644
index 000000000000..9a9e3e539259
--- /dev/null
+++ b/net-misc/r8168/files/r8168-8.051.02-6.1-fix.patch
@@ -0,0 +1,25 @@
+From 39dd0fd2e5dc45cd63113f33a9890e36c304916d Mon Sep 17 00:00:00 2001
+From: zu1k <i@zu1k.com>
+Date: Sat, 29 Oct 2022 21:57:39 +0800
+Subject: [PATCH] Adapted for Linux 6.1
+
+---
+ src/r8168.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/r8168.h b/src/r8168.h
+index 662974a..baf48c6 100755
+--- a/src/r8168.h
++++ b/src/r8168.h
+@@ -561,7 +561,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)
++#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;