build/patch/misc/wireless-rtl8723ds.patch
Igor Pečovnik 54bc65b3bb
Bump DEV kernels to 5.11.y (#2636)
* Bump rockchip DEV 32b to 5.11.y

* Move mvebu64 DEV to 5.11.y

* Move Rockchip64 DEV to 5.11.y

Disabling general-rkvdec_nv15.patch - need more attention

* Add Meson DEV / Odroid C1

* Move OdroidXU4 DEV to tobetter's 5.11.y branch

* Bump sunxi DEV to 5.11.y

* Bump mvebu DEV to 5.11.y
2021-02-17 01:36:25 +01:00

97 lines
2.5 KiB
Diff

From b429e25ce03bc7e2853b593f5d6be92d95d3c39b Mon Sep 17 00:00:00 2001
From: Igor Pecovnik <igor.pecovnik@gmail.com>
Date: Mon, 15 Feb 2021 21:37:27 +0100
Subject: [PATCH] oeww
Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
---
.../wireless/rtl8723ds/os_dep/osdep_service.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/net/wireless/rtl8723ds/os_dep/osdep_service.c b/drivers/net/wireless/rtl8723ds/os_dep/osdep_service.c
index d98de2f79..3d6c53df2 100644
--- a/drivers/net/wireless/rtl8723ds/os_dep/osdep_service.c
+++ b/drivers/net/wireless/rtl8723ds/os_dep/osdep_service.c
@@ -1282,15 +1282,19 @@ static int isFileReadable(const char *path, u32 *sz)
{
struct file *fp;
int ret = 0;
+#ifdef set_fs
mm_segment_t oldfs;
+#endif
char buf;
fp = filp_open(path, O_RDONLY, 0);
if (IS_ERR(fp))
ret = PTR_ERR(fp);
else {
+#ifdef set_fs
oldfs = get_fs();
set_fs(KERNEL_DS);
+#endif
if (1 != readFile(fp, &buf, 1))
ret = PTR_ERR(fp);
@@ -1303,7 +1307,9 @@ static int isFileReadable(const char *path, u32 *sz)
#endif
}
+#ifdef set_fs
set_fs(oldfs);
+#endif
filp_close(fp, NULL);
}
return ret;
@@ -1319,7 +1325,9 @@ static int isFileReadable(const char *path, u32 *sz)
static int retriveFromFile(const char *path, u8 *buf, u32 sz)
{
int ret = -1;
+#ifdef set_fs
mm_segment_t oldfs;
+#endif
struct file *fp;
if (path && buf) {
@@ -1327,10 +1335,14 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz)
if (0 == ret) {
RTW_INFO("%s openFile path:%s fp=%p\n", __FUNCTION__, path , fp);
+#ifdef set_fs
oldfs = get_fs();
set_fs(KERNEL_DS);
ret = readFile(fp, buf, sz);
set_fs(oldfs);
+#else
+ ret = readFile(fp, buf, sz);
+#endif
closeFile(fp);
RTW_INFO("%s readFile, ret:%d\n", __FUNCTION__, ret);
@@ -1354,7 +1366,9 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz)
static int storeToFile(const char *path, u8 *buf, u32 sz)
{
int ret = 0;
+#ifdef set_fs
mm_segment_t oldfs;
+#endif
struct file *fp;
if (path && buf) {
@@ -1362,10 +1376,14 @@ static int storeToFile(const char *path, u8 *buf, u32 sz)
if (0 == ret) {
RTW_INFO("%s openFile path:%s fp=%p\n", __FUNCTION__, path , fp);
+#ifdef set_fs
oldfs = get_fs();
set_fs(KERNEL_DS);
ret = writeFile(fp, buf, sz);
set_fs(oldfs);
+#else
+ ret = writeFile(fp, buf, sz);
+#endif
closeFile(fp);
RTW_INFO("%s writeFile, ret:%d\n", __FUNCTION__, ret);
--
Created with Armbian build tools https://github.com/armbian/build