r8152: fix build with kernel 5.4.252

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2023-08-10 12:47:06 +08:00
parent a798decbc7
commit f68568c2ab
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -0,0 +1,22 @@
--- a/compatibility.h
+++ b/compatibility.h
@@ -21,7 +21,6 @@
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0)
#define PHY_MAC_INTERRUPT PHY_IGNORE_INTERRUPT
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
@@ -608,11 +607,6 @@
#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) */
- 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,15,0) */
#ifndef FALSE
#define TRUE 1