File leap155.patch of Package r8101
diff -U 3 -H -d -r -N -- a/src/r8101_n.c b/src/r8101_n.c
--- a/src/r8101_n.c 2022-10-31 18:31:19.000000000 +0100
+++ b/src/r8101_n.c 2023-06-19 16:35:29.476055529 +0200
@@ -4508,7 +4508,7 @@
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
static void rtl8101_get_ringparam(struct net_device *dev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
@@ -4516,7 +4516,7 @@
#else
static void rtl8101_get_ringparam(struct net_device *dev,
struct ethtool_ringparam *ring)
-#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
+#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
{
struct rtl8101_private *tp = netdev_priv(dev);
@@ -4526,7 +4526,7 @@
ring->tx_pending = tp->num_tx_desc;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
static int rtl8101_set_ringparam(struct net_device *dev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
@@ -4534,7 +4534,7 @@
#else
static int rtl8101_set_ringparam(struct net_device *dev,
struct ethtool_ringparam *ring)
-#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
+#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
{
struct rtl8101_private *tp = netdev_priv(dev);
u32 new_rx_count, new_tx_count;
@@ -10407,11 +10407,11 @@
static void
rtl8101_hw_address_set(struct net_device *dev, u8 mac_addr[MAC_ADDR_LEN])
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
eth_hw_addr_set(dev, mac_addr);
#else
memcpy(dev->dev_addr, mac_addr, MAC_ADDR_LEN);
-#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
+#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
}
static int