diff --git a/hif/src/ath_procfs.c b/hif/src/ath_procfs.c index a926f11fb1..de7e85efbf 100644 --- a/hif/src/ath_procfs.c +++ b/hif/src/ath_procfs.c @@ -35,6 +35,14 @@ #include "pld_common.h" #include "target_type.h" +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)) +/* + * Commit 359745d78351 ("proc: remove PDE_DATA() completely") + * Replaced PDE_DATA() with pde_data() + */ +#define pde_data(inode) PDE_DATA(inode) +#endif + #define PROCFS_NAME "athdiagpfs" #ifdef MULTI_IF_NAME #define PROCFS_DIR "cld" MULTI_IF_NAME @@ -72,7 +80,7 @@ static void *get_hif_hdl_from_file(struct file *file) { struct hif_opaque_softc *scn; - scn = (struct hif_opaque_softc *)PDE_DATA(file_inode(file)); + scn = (struct hif_opaque_softc *)pde_data(file_inode(file)); return (void *)scn; } diff --git a/utils/pktlog/linux_ac.c b/utils/pktlog/linux_ac.c index 52df46083b..9548427e64 100644 --- a/utils/pktlog/linux_ac.c +++ b/utils/pktlog/linux_ac.c @@ -38,6 +38,14 @@ #include "host_diag_core_log.h" #include "ani_global.h" +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)) +/* + * Commit 359745d78351 ("proc: remove PDE_DATA() completely") + * Replaced PDE_DATA() with pde_data() + */ +#define pde_data(inode) PDE_DATA(inode) +#endif + #define PKTLOG_DEVNAME_SIZE 32 #define MAX_WLANDEV 1 @@ -876,7 +884,7 @@ __pktlog_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos) struct ath_pktlog_info *pl_info; struct ath_pktlog_buf *log_buf; - pl_info = PDE_DATA(file->f_path.dentry->d_inode); + pl_info = pde_data(file->f_path.dentry->d_inode); if (!pl_info) return 0; @@ -1019,7 +1027,7 @@ rd_done: static ssize_t pktlog_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos) { - struct ath_pktlog_info *info = PDE_DATA(file->f_path.dentry->d_inode); + struct ath_pktlog_info *info = pde_data(file->f_path.dentry->d_inode); struct qdf_op_sync *op_sync; ssize_t err_size;