1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c
index 88a517a..9c4ad22 100644
--- a/core/rtw_br_ext.c
+++ b/core/rtw_br_ext.c
@@ -22,7 +22,12 @@
#ifdef __KERNEL__
#include <linux/if_arp.h>
#include <net/ip.h>
-#include <net/ipx.h>
+
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
+ #include <net/ipx.h>
+#endif
+
#include <linux/atalk.h>
#include <linux/udp.h>
#include <linux/if_pppox.h>
@@ -170,6 +175,7 @@ static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *network
}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char *networkAddr,
unsigned int *ipxNetAddr, unsigned char *ipxNodeAddr)
{
@@ -179,8 +185,10 @@ static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char
memcpy(networkAddr+1, (unsigned char *)ipxNetAddr, 4);
memcpy(networkAddr+5, ipxNodeAddr, 6);
}
+#endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
static __inline__ void __nat25_generate_ipx_network_addr_with_socket(unsigned char *networkAddr,
unsigned int *ipxNetAddr, unsigned short *ipxSocketAddr)
{
@@ -190,6 +198,7 @@ static __inline__ void __nat25_generate_ipx_network_addr_with_socket(unsigned ch
memcpy(networkAddr+1, (unsigned char *)ipxNetAddr, 4);
memcpy(networkAddr+5, (unsigned char *)ipxSocketAddr, 2);
}
+#endif
static __inline__ void __nat25_generate_apple_network_addr(unsigned char *networkAddr,
@@ -930,6 +939,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
/*---------------------------------------------------*/
/* Handle IPX and Apple Talk frame */
/*---------------------------------------------------*/
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
else if((protocol == __constant_htons(ETH_P_IPX)) ||
(protocol <= __constant_htons(ETH_FRAME_LEN)))
{
@@ -1190,6 +1200,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
return -1;
}
+#endif
/*---------------------------------------------------*/
/* Handle PPPoE frame */
|