Преглед изворни кода

support for linux >= 5.15 by removal of IPX

Tomás Pinho пре 4 година
родитељ
комит
2357b5443e
1 измењених фајлова са 9 додато и 0 уклоњено
  1. 9 0
      core/rtw_br_ext.c

+ 9 - 0
core/rtw_br_ext.c

@@ -17,7 +17,9 @@
 #ifdef __KERNEL__
 	#include <linux/if_arp.h>
 	#include <net/ip.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>
@@ -949,6 +951,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
 			}
 		}
 
+	#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
 		/*   IPX  */
 		if (ipx != NULL) {
 			switch (method) {
@@ -1016,9 +1019,15 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
 				return -1;
 			}
 		}
+		#endif
 
 		/*   AARP  */
+	#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
 		else if (ea != NULL) {
+	#else
+		if (ea != NULL) {
+	#endif
+
 			/* Sanity check fields. */
 			if (ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN) {
 				DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n");