From 36ff7bcd7f3c8be81b459a5333e3e58a601af712 Mon Sep 17 00:00:00 2001 From: satmandu Date: Thu, 30 May 2019 14:34:13 -0400 Subject: [PATCH 1/4] os_dep: fix compilation warning and kernel 5.2 as per commit to 5.3.4 Adapted patch here: https://github.com/aircrack-ng/rtl8812au/commit/e013a161f8debccfb18512552e3df936bb9346cb --- os_dep/linux/os_intfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 45146e3..b758acb 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1364,7 +1364,8 @@ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb #else , void *accel_priv #endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) && + LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)) , select_queue_fallback_t fallback #endif #endif From aa405e0b18362c69f6bd27fab83ee67604636ad4 Mon Sep 17 00:00:00 2001 From: satmandu Date: Thu, 30 May 2019 14:38:05 -0400 Subject: [PATCH 2/4] removed space --- os_dep/linux/os_intfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index b758acb..e199550 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1364,7 +1364,7 @@ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb #else , void *accel_priv #endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) && + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)) , select_queue_fallback_t fallback #endif From 231d5c2d4e894e46a423bcc395b068b47f056fa4 Mon Sep 17 00:00:00 2001 From: satmandu Date: Thu, 30 May 2019 14:40:14 -0400 Subject: [PATCH 3/4] fix missing "(" --- os_dep/linux/os_intfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index e199550..1acd713 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1364,8 +1364,7 @@ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb #else , void *accel_priv #endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) && - LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)) + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)) , select_queue_fallback_t fallback #endif #endif From 75c538098b78d5454893d3b87e10bd18c774c8d8 Mon Sep 17 00:00:00 2001 From: satmandu Date: Thu, 30 May 2019 14:48:09 -0400 Subject: [PATCH 4/4] Compilation fix for kernel 5.1+ As per https://github.com/tomaspinho/rtl8821ce/pull/31/commits/48c223a03ce82644d58fe410e755806fa6c1e461 --- os_dep/osdep_service.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 83c7640..c4a2519 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -2201,7 +2201,7 @@ static int isFileReadable(const char *path, u32 *sz) ret = PTR_ERR(fp); else { oldfs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); if (1 != readFile(fp, &buf, 1)) ret = PTR_ERR(fp); @@ -2239,7 +2239,7 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz) RTW_INFO("%s openFile path:%s fp=%p\n", __FUNCTION__, path , fp); oldfs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); ret = readFile(fp, buf, sz); set_fs(oldfs); closeFile(fp); @@ -2274,7 +2274,7 @@ static int storeToFile(const char *path, u8 *buf, u32 sz) RTW_INFO("%s openFile path:%s fp=%p\n", __FUNCTION__, path , fp); oldfs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); ret = writeFile(fp, buf, sz); set_fs(oldfs); closeFile(fp);