File leap155.patch of Package r8126
diff -U 3 -H -d -r -N -- a/src/r8126_n.c b/src/r8126_n.c
--- a/src/r8126_n.c 2024-01-22 14:07:24.000000000 +0100
+++ b/src/r8126_n.c 2024-03-02 16:54:51.156614574 +0100
@@ -6489,7 +6489,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 rtl8126_get_ringparam(struct net_device *dev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
@@ -6497,7 +6497,7 @@
#else
static void rtl8126_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 rtl8126_private *tp = netdev_priv(dev);
@@ -6507,7 +6507,7 @@
ring->tx_pending = tp->tx_ring[0].num_tx_desc;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
static int rtl8126_set_ringparam(struct net_device *dev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
@@ -6515,7 +6515,7 @@
#else
static int rtl8126_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 rtl8126_private *tp = netdev_priv(dev);
u32 new_rx_count, new_tx_count;
@@ -12055,11 +12055,11 @@
static void
rtl8126_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