File kernel510.patch of Package rtl8822bu
diff -U 3 -H -d -r -N -- a/core/rtw_btcoex.c b/core/rtw_btcoex.c
--- a/core/rtw_btcoex.c 2021-01-23 19:58:51.000000000 +0100
+++ b/core/rtw_btcoex.c 2021-01-23 20:03:20.432515244 +0100
@@ -1443,8 +1443,10 @@
{
u8 error;
struct msghdr udpmsg;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
mm_segment_t oldfs;
- struct iovec iov;
+#endif
+ struct iovec iov;
struct bt_coex_info *pcoex_info = &padapter->coex_info;
/* RTW_INFO("%s: msg:%s, force:%s\n", __func__, msg, force == _TRUE?"TRUE":"FALSE"); */
diff -U 3 -H -d -r -N -- a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c
--- a/core/rtw_wlan_util.c 2021-01-23 19:58:51.000000000 +0100
+++ b/core/rtw_wlan_util.c 2021-01-23 20:03:20.432515244 +0100
@@ -4733,7 +4733,9 @@
int i = 0;
struct file *fp;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
mm_segment_t fs;
+#endif
loff_t pos = 0;
u8 *source = NULL;
long len = 0;
diff -U 3 -H -d -r -N -- a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c
--- a/os_dep/linux/os_intfs.c 2021-01-23 19:58:51.000000000 +0100
+++ b/os_dep/linux/os_intfs.c 2021-01-23 20:03:20.432515244 +0100
@@ -4002,8 +4002,10 @@
struct msghdr msg;
struct iovec iov;
struct sockaddr_nl nladdr;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
mm_segment_t oldfs;
- char *pg;
+#endif
+ char *pg;
int size = 0;
err = sock_create(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE, &sock);
diff -U 3 -H -d -r -N -- a/os_dep/osdep_service.c b/os_dep/osdep_service.c
--- a/os_dep/osdep_service.c 2021-01-23 19:58:51.000000000 +0100
+++ b/os_dep/osdep_service.c 2021-01-23 20:03:20.436515168 +0100
@@ -2238,7 +2238,9 @@
static int retriveFromFile(const char *path, u8 *buf, u32 sz)
{
int ret = -1;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
mm_segment_t oldfs;
+#endif
struct file *fp;
if (path && buf) {
@@ -2281,7 +2283,9 @@
static int storeToFile(const char *path, u8 *buf, u32 sz)
{
int ret = 0;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
mm_segment_t oldfs;
+#endif
struct file *fp;
if (path && buf) {