[arch-commits] Commit in r8168/trunk (PKGBUILD linux517.patch)
Jan Steffens
heftig at gemini.archlinux.org
Wed Mar 23 00:48:24 UTC 2022
Date: Wednesday, March 23, 2022 @ 00:48:24
Author: heftig
Revision: 1171168
8.049.02-66: linux 5.17.arch1-1
Added:
r8168/trunk/linux517.patch
Modified:
r8168/trunk/PKGBUILD
----------------+
PKGBUILD | 13 ++++++++++---
linux517.patch | 32 ++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-03-23 00:48:23 UTC (rev 1171167)
+++ PKGBUILD 2022-03-23 00:48:24 UTC (rev 1171168)
@@ -4,7 +4,7 @@
pkgname=r8168
pkgver=8.049.02
-pkgrel=65
+pkgrel=66
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
+ linux517.patch)
sha256sums=('2b12d932e976f8f74b8d9545744c04beb4676dd7bc1d032dde51347ed1d8be24'
- 'SKIP')
+ 'SKIP'
+ '6c718137bed0f80bce52cc6862e755de7a1d0c2cbb75491ab5b099bd04534c1c')
validpgpkeys=('0CADAACF70F64C654E131B3111675C743429DDEF') # Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+prepare() {
+ cd "$pkgname-$pkgver"
+ patch -Np1 -i ../linux517.patch
+}
+
build() {
cd "$pkgname-$pkgver"
# avoid using the Makefile directly -- it doesn't understand
Added: linux517.patch
===================================================================
--- linux517.patch (rev 0)
+++ linux517.patch 2022-03-23 00:48:24 UTC (rev 1171168)
@@ -0,0 +1,32 @@
+diff -u -r r8168-8.049.02/src/r8168_n.c r8168-8.049.02-linux517/src/r8168_n.c
+--- r8168-8.049.02/src/r8168_n.c 2021-07-05 08:30:48.000000000 +0000
++++ r8168-8.049.02-linux517/src/r8168_n.c 2022-03-23 00:32:48.392881125 +0000
+@@ -1733,7 +1733,7 @@
+ static int rtl8168_proc_open(struct inode *inode, struct file *file)
+ {
+ struct net_device *dev = proc_get_parent_data(inode);
+- int (*show)(struct seq_file *, void *) = PDE_DATA(inode);
++ int (*show)(struct seq_file *, void *) = pde_data(inode);
+
+ return single_open(file, show, dev);
+ }
+@@ -24061,6 +24061,7 @@
+ struct rtl8168_private *tp = netdev_priv(dev);
+ int i;
+ u8 mac_addr[MAC_ADDR_LEN];
++ u8 addr[ETH_ALEN];
+
+ for (i = 0; i < MAC_ADDR_LEN; i++)
+ mac_addr[i] = RTL_R8(tp, MAC0 + i);
+@@ -24129,9 +24130,10 @@
+ rtl8168_rar_set(tp, mac_addr);
+
+ for (i = 0; i < MAC_ADDR_LEN; i++) {
+- dev->dev_addr[i] = RTL_R8(tp, MAC0 + i);
++ addr[i] = RTL_R8(tp, MAC0 + i);
+ tp->org_mac_addr[i] = dev->dev_addr[i]; /* keep the original MAC address */
+ }
++ eth_hw_addr_set(dev, addr);
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
+ #endif
More information about the arch-commits
mailing list