2
0

010-os_dep-linux-proc-move-to-pde_data-function.patch 926 B

1234567891011121314151617181920212223242526
  1. From f455198acaa71c2963746a6b17c878c7d1d0e331 Mon Sep 17 00:00:00 2001
  2. From: Christian Marangi <[email protected]>
  3. Date: Sun, 30 Jul 2023 11:22:58 +0200
  4. Subject: [PATCH 5/5] os_dep/linux/proc: move to pde_data function
  5. PDE_DATA macro was dropped in 5.17 with the new pde_data that does the
  6. exact thing. Fix compilation error and use new function.
  7. Signed-off-by: Christian Marangi <[email protected]>
  8. ---
  9. os_dep/linux/rtw_proc.c | 4 ++++
  10. 1 file changed, 4 insertions(+)
  11. --- a/os_dep/linux/rtw_proc.c
  12. +++ b/os_dep/linux/rtw_proc.c
  13. @@ -37,6 +37,10 @@ inline struct proc_dir_entry *get_rtw_dr
  14. #define file_inode(file) ((file)->f_dentry->d_inode)
  15. #endif
  16. +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
  17. +#define PDE_DATA(inode) pde_data(inode)
  18. +#endif
  19. +
  20. #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0))
  21. #define PDE_DATA(inode) PDE((inode))->data
  22. #define proc_get_parent_data(inode) PDE((inode))->parent->data