File r8168-support-linux-L15.5.patch of Package r8168
57
1
---
2
src/r8168_n.c | 12 ++++++------
3
1 file changed, 6 insertions(+), 6 deletions(-)
4
5
--- src/r8168_n.c
6
+++ src/r8168_n.c 2024-03-13 12:10:07.947820999 +0000
7
8
}
9
10
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
11
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
12
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
13
static void rtl8168_get_ringparam(struct net_device *dev,
14
struct ethtool_ringparam *ring,
15
struct kernel_ethtool_ringparam *kernel_ring,
16
17
#else
18
static void rtl8168_get_ringparam(struct net_device *dev,
19
struct ethtool_ringparam *ring)
20
-#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
21
+#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
22
{
23
struct rtl8168_private *tp = netdev_priv(dev);
24
25
26
ring->tx_pending = tp->tx_ring[0].num_tx_desc;
27
}
28
29
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
30
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
31
static int rtl8168_set_ringparam(struct net_device *dev,
32
struct ethtool_ringparam *ring,
33
struct kernel_ethtool_ringparam *kernel_ring,
34
35
#else
36
static int rtl8168_set_ringparam(struct net_device *dev,
37
struct ethtool_ringparam *ring)
38
-#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
39
+#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
40
{
41
struct rtl8168_private *tp = netdev_priv(dev);
42
u32 new_rx_count, new_tx_count;
43
44
static void
45
rtl8168_hw_address_set(struct net_device *dev, u8 mac_addr[MAC_ADDR_LEN])
46
{
47
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
48
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
49
eth_hw_addr_set(dev, mac_addr);
50
#else
51
memcpy(dev->dev_addr, mac_addr, MAC_ADDR_LEN);
52
-#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
53
+#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)
54
}
55
56
static int
57