diff options
Diffstat (limited to 'linux-5.17.patch')
-rw-r--r-- | linux-5.17.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/linux-5.17.patch b/linux-5.17.patch new file mode 100644 index 000000000000..f263e9277779 --- /dev/null +++ b/linux-5.17.patch @@ -0,0 +1,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 |