Closed tristantarrant closed 1 year ago
diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c
index 1236f50..bfe5f43 100644
--- a/core/rtw_br_ext.c
+++ b/core/rtw_br_ext.c
@@ -19,9 +19,11 @@
******************************************************************************/
#define _RTW_BR_EXT_C_
+#include <linux/version.h>
#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>
@@ -664,6 +666,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
return -1;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
/* IPX */
if (ipx != NULL) {
switch (method) {
@@ -723,6 +726,9 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
return -1;
}
} 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");
diff --git a/include/osdep_service.h b/include/osdep_service.h
index ce76a2c..df5777f 100644
--- a/include/osdep_service.h
+++ b/include/osdep_service.h
@@ -67,7 +67,11 @@ struct __queue {
spinlock_t lock;
};
-#define thread_exit() complete_and_exit(NULL, 0)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
+#define thread_exit() kthread_complete_and_exit(NULL, 0)
+#else
+#define thread_exit() complete_and_exit(NULL, 0);
+#endif
static inline struct list_head *get_list_head(struct __queue *queue)
{
Hi! Are you sure about this? Can you try to compile this driver.
Forgive me: I had an old dkms module that was lurking there :(
Using DKMS with Ubuntu 23.04, Kernel 6.2.0-1003-lowlatency