mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-15 17:30:28 +00:00
a07566ead8
Fix more compilation error with kernel 6.1 and make it possible to compile. Multiple fix are done due to kernel bump: - PDE_DATA (now deprecated) to pde_data - dev_addr now const and require some cast - prandom_u32 (now deprecated) to get_random_u32 Also other minor fix for always true condition and tasklet type cast not compatible. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
27 lines
926 B
Diff
27 lines
926 B
Diff
From f455198acaa71c2963746a6b17c878c7d1d0e331 Mon Sep 17 00:00:00 2001
|
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
|
Date: Sun, 30 Jul 2023 11:22:58 +0200
|
|
Subject: [PATCH 5/5] os_dep/linux/proc: move to pde_data function
|
|
|
|
PDE_DATA macro was dropped in 5.17 with the new pde_data that does the
|
|
exact thing. Fix compilation error and use new function.
|
|
|
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|
---
|
|
os_dep/linux/rtw_proc.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
--- a/os_dep/linux/rtw_proc.c
|
|
+++ b/os_dep/linux/rtw_proc.c
|
|
@@ -37,6 +37,10 @@ inline struct proc_dir_entry *get_rtw_dr
|
|
#define file_inode(file) ((file)->f_dentry->d_inode)
|
|
#endif
|
|
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
|
|
+#define PDE_DATA(inode) pde_data(inode)
|
|
+#endif
|
|
+
|
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0))
|
|
#define PDE_DATA(inode) PDE((inode))->data
|
|
#define proc_get_parent_data(inode) PDE((inode))->parent->data
|