[packages/r8168] - fix building with kernel 6.1

baggins baggins at pld-linux.org
Sat Dec 17 19:15:27 CET 2022


commit 8cae434201646c3e27b80d817021e4abc61eb717
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Dec 17 19:15:13 2022 +0100

    - fix building with kernel 6.1

 kernel-6.1.patch | 14 ++++++++++++++
 r8168.spec       |  2 ++
 2 files changed, 16 insertions(+)
---
diff --git a/r8168.spec b/r8168.spec
index 4725114..d51da0c 100644
--- a/r8168.spec
+++ b/r8168.spec
@@ -22,6 +22,7 @@ Source0:	%{pname}-%{version}.tar.bz2
 Patch0:		kernel-5.17.patch
 Patch1:		kernel-5.18.patch
 Patch2:		kernel-5.19.patch
+Patch3:		kernel-6.1.patch
 BuildRequires:	rpmbuild(macros) >= 1.701
 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
 BuildRoot:	%{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
@@ -76,6 +77,7 @@ Express Gigabit Ethernet.\
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %{expand:%build_kernel_packages}
diff --git a/kernel-6.1.patch b/kernel-6.1.patch
new file mode 100644
index 0000000..3e65fc9
--- /dev/null
+++ b/kernel-6.1.patch
@@ -0,0 +1,14 @@
+--- r8168-8.049.02/src/r8168.h~	2021-06-11 17:25:16.000000000 +0200
++++ r8168-8.049.02/src/r8168.h	2022-12-17 19:14:10.556568693 +0100
+@@ -553,7 +553,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(ndev, &priv->napi, function, weight)
++#else
++#define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function)
++#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;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/r8168.git/commitdiff/8cae434201646c3e27b80d817021e4abc61eb717



More information about the pld-cvs-commit mailing list