Refresh patch

This commit is contained in:
Sophie Brun 2022-06-21 12:19:30 +02:00
parent 4d3330bc88
commit ca3597e27f
No known key found for this signature in database
GPG Key ID: 5792783B206FEE30
1 changed files with 14 additions and 5 deletions

View File

@ -2,13 +2,12 @@ From: Sophie Brun <sophie@offensive-security.com>
Date: Wed, 18 May 2022 17:47:55 +0200
Subject: Build support with kernel v5.17
Origin: https://github.com/aircrack-ng/rtl8188eus/commit/13cc38399eb44f234a52dde5f94509e54a09c71f
---
os_dep/linux/os_intfs.c | 8 ++++++++
os_dep/linux/rtw_proc.c | 4 ++++
os_dep/linux/rtw_proc.c | 8 ++++++++
os_dep/osdep_service.c | 4 ++++
3 files changed, 16 insertions(+)
3 files changed, 20 insertions(+)
diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c
index bd7da8b..f006fc8 100644
@ -39,10 +38,20 @@ index bd7da8b..f006fc8 100644
dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter)));
#endif //defined(CONFIG_NET_NS)
diff --git a/os_dep/linux/rtw_proc.c b/os_dep/linux/rtw_proc.c
index 8a0fd3e..8b1a424 100644
index 8a0fd3e..9bd4041 100644
--- a/os_dep/linux/rtw_proc.c
+++ b/os_dep/linux/rtw_proc.c
@@ -45,6 +45,10 @@ inline struct proc_dir_entry *get_rtw_drv_proc(void)
@@ -39,12 +39,20 @@ 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
#define get_proc_net init_net.proc_net
#endif