From 961ee0e81ea20d7cbfd000118d857943258b11b0 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sun, 13 Aug 2023 11:40:42 +0800 Subject: [PATCH] r8152: fix build with kernel 5.10+ --- package/lean/r8152/Makefile | 2 +- .../patches/001-rework-eth-hw-addr-set-for-kernel-5.4.patch | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/lean/r8152/Makefile b/package/lean/r8152/Makefile index 1f182db16..075f298b4 100644 --- a/package/lean/r8152/Makefile +++ b/package/lean/r8152/Makefile @@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=r8152 PKG_VERSION:=2.16.3-4 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/awesometic/realtek-r8152-dkms/tar.gz/$(PKG_VERSION)? diff --git a/package/lean/r8152/patches/001-rework-eth-hw-addr-set-for-kernel-5.4.patch b/package/lean/r8152/patches/001-rework-eth-hw-addr-set-for-kernel-5.4.patch index b1a5566fc..49bc62984 100644 --- a/package/lean/r8152/patches/001-rework-eth-hw-addr-set-for-kernel-5.4.patch +++ b/package/lean/r8152/patches/001-rework-eth-hw-addr-set-for-kernel-5.4.patch @@ -15,12 +15,12 @@ index 7738d17..25ffc39 100644 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) */ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) */ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,251) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,4,251) || LINUX_VERSION_CODE > KERNEL_VERSION(5,10,0)) static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr) { memcpy(dev->dev_addr, addr, 6); } -+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,4,251) */ ++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,4,251) || LINUX_VERSION_CODE > KERNEL_VERSION(5,10,0) */ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0) */ #ifndef FALSE