Date: Monday, December 12, 2022 @ 00:58:33
  Author: heftig
Revision: 1358781

8.051.02-4: linux 6.1.arch1-1

Added:
  r8168/trunk/0001-Linux-6.1.patch
Modified:
  r8168/trunk/PKGBUILD

----------------------+
 0001-Linux-6.1.patch |   25 +++++++++++++++++++++++++
 PKGBUILD             |   13 ++++++++++---
 2 files changed, 35 insertions(+), 3 deletions(-)

Added: 0001-Linux-6.1.patch
===================================================================
--- 0001-Linux-6.1.patch                                (rev 0)
+++ 0001-Linux-6.1.patch        2022-12-12 00:58:33 UTC (rev 1358781)
@@ -0,0 +1,25 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <hef...@archlinux.org>
+Date: Mon, 12 Dec 2022 00:44:23 +0000
+Subject: [PATCH] Linux 6.1
+
+---
+ src/r8168.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/r8168.h b/src/r8168.h
+index 511c648a6c05..62393f414aa9 100755
+--- 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_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;

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-12-12 00:58:31 UTC (rev 1358780)
+++ PKGBUILD    2022-12-12 00:58:33 UTC (rev 1358781)
@@ -4,7 +4,7 @@
 
 pkgname=r8168
 pkgver=8.051.02
-pkgrel=3
+pkgrel=4
 pkgdesc="A kernel module for Realtek 8168 network cards"
 url="http://www.realtek.com.tw";
 license=("GPL")
@@ -11,11 +11,18 @@
 arch=('x86_64')
 makedepends=('linux-headers')
 
source=(https://github.com/mtorromeo/r8168/archive/$pkgver/$pkgname-$pkgver.tar.gz
-        
https://github.com/mtorromeo/r8168/releases/download/$pkgver/$pkgname-$pkgver.tar.gz.asc)
+        
https://github.com/mtorromeo/r8168/releases/download/$pkgver/$pkgname-$pkgver.tar.gz.asc
+        0001-Linux-6.1.patch)
 sha256sums=('76f1c6f0b273d6a31bdb3e98c39a54f50a65766b99d485f9b4ddeda30dcd11d8'
-            'SKIP')
+            'SKIP'
+            'd178c927b2619b4f5013ab965168b3f9ddc67e7cf4b32a0edca5906739032393')
 validpgpkeys=('0CADAACF70F64C654E131B3111675C743429DDEF') # Massimiliano 
Torromeo <massimiliano.torro...@gmail.com>
 
+prepare() {
+       cd "$pkgname-$pkgver"
+       patch -Np1 -i ../0001-Linux-6.1.patch
+}
+
 build() {
        cd "$pkgname-$pkgver"
        # avoid using the Makefile directly -- it doesn't understand

Reply via email to