From a2aa633e9cb81ed928237064ce9f7d9e87c49021 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Tue, 4 May 2021 14:13:45 +0200 Subject: [PATCH] Add (kernel_read) support for kernel >=4.14 --- core/rtw_wlan_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index 4814717..d8cb42d 100644 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -4577,7 +4577,11 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t *ssid, source = rtw_zmalloc(2048); if (source != NULL) { +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)) + len = kernel_read(fp, source, len, &pos); +#else len = vfs_read(fp, source, len, &pos); +#endif rtw_parse_cipher_list(nlo_info, source); rtw_mfree(source, 2048); }