summarylogtreecommitdiffstats
path: root/linux-5.17.patch
blob: f263e92777799f14a783b668265d7e78bef1af76 (plain)
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
diff --git a/include/ieee80211.h b/include/ieee80211.h
index fc293c4..0898cd4 100644
--- a/include/ieee80211.h
+++ b/include/ieee80211.h
@@ -1314,18 +1314,18 @@ enum ieee80211_state {
 (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
 (((Addr[5]) & 0xff) == 0xff))
 #else
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+static __inline int is_multicast_mac_addr(const u8 *addr)
 {
         return ((addr[0] != 0xff) && (0x01 & addr[0]));
 }
 
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+static __inline int is_broadcast_mac_addr(const u8 *addr)
 {
 	return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) &&   \
 		(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
 }
 
-extern __inline int is_zero_mac_addr(const u8 *addr)
+static __inline int is_zero_mac_addr(const u8 *addr)
 {
 	return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) &&   \
 		(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
diff --git a/include/osdep_service_linux.h b/include/osdep_service_linux.h
index d733520..cfa7d2f 100644
--- a/include/osdep_service_linux.h
+++ b/include/osdep_service_linux.h
@@ -153,7 +153,12 @@
 	typedef int		thread_return;
 	typedef void*	thread_context;
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0))
 	#define thread_exit() complete_and_exit(NULL, 0)
+#else
+	#define thread_exit() kthread_complete_and_exit(NULL, 0)
+#endif
+
 
 	typedef void timer_hdl_return;
 	typedef void* timer_hdl_context;
diff --git a/os_dep/linux/rtw_proc.c b/os_dep/linux/rtw_proc.c
index 8e0f7dd..cf8f3a0 100644
--- a/os_dep/linux/rtw_proc.c
+++ b/os_dep/linux/rtw_proc.c
@@ -41,6 +41,10 @@ inline struct proc_dir_entry *get_rtw_drv_proc(void)
 #define proc_get_parent_data(inode) PDE((inode))->parent->data
 #endif
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
+#define PDE_DATA(inode) pde_data(inode)
+#endif
+
 #if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
 #define get_proc_net proc_net
 #else