diff --git a/mxm_wifiex/wlan_src/mlinux/moal_debug.c b/mxm_wifiex/wlan_src/mlinux/moal_debug.c index a158702..6da6f99 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_debug.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_debug.c @@ -743,7 +743,9 @@ static int woal_histogram_read(struct seq_file *sfp, void *data) static int woal_histogram_proc_open(struct inode *inode, struct file *file) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) + return single_open(file, woal_histogram_read, pde_data(inode)); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) return single_open(file, woal_histogram_read, PDE_DATA(inode)); #else return single_open(file, woal_histogram_read, PDE(inode)->data); @@ -942,7 +944,9 @@ static int woal_log_read(struct seq_file *sfp, void *data) */ static int woal_log_proc_open(struct inode *inode, struct file *file) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) + return single_open(file, woal_log_read, pde_data(inode)); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) return single_open(file, woal_log_read, PDE_DATA(inode)); #else return single_open(file, woal_log_read, PDE(inode)->data); @@ -1266,7 +1270,9 @@ static ssize_t woal_debug_write(struct file *f, const char __user *buf, static int woal_debug_proc_open(struct inode *inode, struct file *file) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) + return single_open(file, woal_debug_read, pde_data(inode)); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) return single_open(file, woal_debug_read, PDE_DATA(inode)); #else return single_open(file, woal_debug_read, PDE(inode)->data); diff --git a/mxm_wifiex/wlan_src/mlinux/moal_proc.c b/mxm_wifiex/wlan_src/mlinux/moal_proc.c index 8fc7b3e..af702c0 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_proc.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_proc.c @@ -358,7 +358,9 @@ exit: static int woal_info_proc_open(struct inode *inode, struct file *file) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) + return single_open(file, woal_info_proc_read, pde_data(inode)); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) return single_open(file, woal_info_proc_read, PDE_DATA(inode)); #else return single_open(file, woal_info_proc_read, PDE(inode)->data); @@ -776,7 +778,9 @@ static int woal_config_read(struct seq_file *sfp, void *data) static int woal_config_proc_open(struct inode *inode, struct file *file) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) + return single_open(file, woal_config_read, pde_data(inode)); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) return single_open(file, woal_config_read, PDE_DATA(inode)); #else return single_open(file, woal_config_read, PDE(inode)->data); @@ -851,7 +855,9 @@ done: static int woal_drv_dump_proc_open(struct inode *inode, struct file *file) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) + return single_open(file, woal_drv_dump_read, pde_data(inode)); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) return single_open(file, woal_drv_dump_read, PDE_DATA(inode)); #else return single_open(file, woal_drv_dump_read, PDE(inode)->data); @@ -928,7 +934,9 @@ done: static int woal_fw_dump_proc_open(struct inode *inode, struct file *file) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) + return single_open(file, woal_fw_dump_read, pde_data(inode)); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) return single_open(file, woal_fw_dump_read, PDE_DATA(inode)); #else return single_open(file, woal_fw_dump_read, PDE(inode)->data); @@ -978,7 +986,9 @@ static int woal_wifi_status_read(struct seq_file *sfp, void *data) static int woal_wifi_status_proc_open(struct inode *inode, struct file *file) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) + return single_open(file, woal_wifi_status_read, pde_data(inode)); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) return single_open(file, woal_wifi_status_read, PDE_DATA(inode)); #else return single_open(file, woal_wifi_status_read, PDE(inode)->data);