Date: Friday, February 17, 2023 @ 16:17:24 Author: andyrtr Revision: 1402259
upgpkg: r8168-lts 8.051.02-17: kernel rebuild Added: r8168-lts/trunk/0001-Linux-6.1.patch Modified: r8168-lts/trunk/PKGBUILD ----------------------+ 0001-Linux-6.1.patch | 25 +++++++++++++++++++++++++ PKGBUILD | 14 +++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) Added: 0001-Linux-6.1.patch =================================================================== --- 0001-Linux-6.1.patch (rev 0) +++ 0001-Linux-6.1.patch 2023-02-17 16:17:24 UTC (rev 1402259) @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <[email protected]> +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 2023-02-17 16:12:43 UTC (rev 1402258) +++ PKGBUILD 2023-02-17 16:17:24 UTC (rev 1402259) @@ -2,7 +2,7 @@ pkgname=r8168-lts pkgver=8.051.02 -pkgrel=16 +pkgrel=17 pkgdesc="A kernel module for Realtek 8168 network cards for linux-lts" url="http://www.realtek.com.tw" license=("GPL") @@ -9,11 +9,18 @@ arch=('x86_64') makedepends=('linux-lts-headers') source=(https://github.com/mtorromeo/r8168/archive/$pkgver/r8168-$pkgver.tar.gz - https://github.com/mtorromeo/r8168/releases/download/$pkgver/r8168-$pkgver.tar.gz.asc) + https://github.com/mtorromeo/r8168/releases/download/$pkgver/r8168-$pkgver.tar.gz.asc + 0001-Linux-6.1.patch) sha256sums=('76f1c6f0b273d6a31bdb3e98c39a54f50a65766b99d485f9b4ddeda30dcd11d8' - 'SKIP') + 'SKIP' + 'd178c927b2619b4f5013ab965168b3f9ddc67e7cf4b32a0edca5906739032393') validpgpkeys=('0CADAACF70F64C654E131B3111675C743429DDEF') +prepare() { + cd "r8168-$pkgver" + patch -Np1 -i ../0001-Linux-6.1.patch +} + build() { cd "r8168-$pkgver" # avoid using the Makefile directly -- it doesn't understand @@ -34,6 +41,7 @@ local extradir=/usr/lib/modules/$(</usr/src/linux-lts/version)/extramodules cd "r8168-$pkgver" install -Dt "$pkgdir$extradir" -m644 src/*.ko + find "$pkgdir" -name '*.ko' -exec strip --strip-debug {} + find "$pkgdir" -name '*.ko' -exec xz {} + echo "blacklist r8169" | \
