File kernel616.patch of Package r8152

diff -Naur r8152-2.20.1/r8152.c r8152-2.20.1n/r8152.c
--- r8152-2.20.1/r8152.c	2025-08-26 11:13:46.001494926 +0200
+++ r8152-2.20.1n/r8152.c	2025-08-26 11:16:40.857878917 +0200
@@ -42,6 +42,9 @@
 #include <net/gso.h>
 #endif
 #endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,16,0)
+#include <linux/socket.h>
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(6,16,0) */
 
 /* Version Information */
 #define DRIVER_SUFFIX
@@ -26247,9 +26250,12 @@
 		rtnl_lock();
 #if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)
 		dev_set_mac_address(tp->netdev, &sa);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,16,0)
 		dev_set_mac_address(tp->netdev, &sa, NULL);
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0) */
+#else /* >= 6.16: __kernel_sockaddr_storage API change */
+		dev_set_mac_address(tp->netdev,
+				    (struct __kernel_sockaddr_storage *)&sa, NULL);
+#endif
 		rtnl_unlock();
 	}
 
openSUSE Build Service is sponsored by