107 lines
3.2 KiB
Diff
107 lines
3.2 KiB
Diff
From 62380512156d849e5fb053c2c41e37befa0136f7 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
|
|
Date: Fri, 1 Jan 2021 23:42:16 +0100
|
|
Subject: [PATCH 128/391] 8723cs: Port to 5.11
|
|
|
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
|
---
|
|
.../rtl8723cs/os_dep/linux/ioctl_cfg80211.c | 2 +-
|
|
.../staging/rtl8723cs/os_dep/osdep_service.c | 25 -------------------
|
|
2 files changed, 1 insertion(+), 26 deletions(-)
|
|
|
|
diff --git a/drivers/staging/rtl8723cs/os_dep/linux/ioctl_cfg80211.c b/drivers/staging/rtl8723cs/os_dep/linux/ioctl_cfg80211.c
|
|
index 42592bc5d..54424a82c 100644
|
|
--- a/drivers/staging/rtl8723cs/os_dep/linux/ioctl_cfg80211.c
|
|
+++ b/drivers/staging/rtl8723cs/os_dep/linux/ioctl_cfg80211.c
|
|
@@ -454,7 +454,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
|
|
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
|
|
if (started) {
|
|
- cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0);
|
|
+ cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false);
|
|
goto exit;
|
|
}
|
|
#endif
|
|
diff --git a/drivers/staging/rtl8723cs/os_dep/osdep_service.c b/drivers/staging/rtl8723cs/os_dep/osdep_service.c
|
|
index 39b5345b9..82c887874 100644
|
|
--- a/drivers/staging/rtl8723cs/os_dep/osdep_service.c
|
|
+++ b/drivers/staging/rtl8723cs/os_dep/osdep_service.c
|
|
@@ -2496,20 +2496,12 @@ static int isFileReadable(const char *path, u32 *sz)
|
|
{
|
|
struct file *fp;
|
|
int ret = 0;
|
|
- mm_segment_t oldfs;
|
|
char buf;
|
|
|
|
fp = filp_open(path, O_RDONLY, 0);
|
|
if (IS_ERR(fp))
|
|
ret = PTR_ERR(fp);
|
|
else {
|
|
- oldfs = get_fs();
|
|
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
|
- set_fs(KERNEL_DS);
|
|
- #else
|
|
- set_fs(get_ds());
|
|
- #endif
|
|
-
|
|
if (1 != readFile(fp, &buf, 1))
|
|
ret = PTR_ERR(fp);
|
|
|
|
@@ -2521,7 +2513,6 @@ static int isFileReadable(const char *path, u32 *sz)
|
|
#endif
|
|
}
|
|
|
|
- set_fs(oldfs);
|
|
filp_close(fp, NULL);
|
|
}
|
|
return ret;
|
|
@@ -2537,7 +2528,6 @@ static int isFileReadable(const char *path, u32 *sz)
|
|
static int retriveFromFile(const char *path, u8 *buf, u32 sz)
|
|
{
|
|
int ret = -1;
|
|
- mm_segment_t oldfs;
|
|
struct file *fp;
|
|
|
|
if (path && buf) {
|
|
@@ -2545,14 +2535,7 @@ 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);
|
|
|
|
- oldfs = get_fs();
|
|
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
|
- set_fs(KERNEL_DS);
|
|
- #else
|
|
- set_fs(get_ds());
|
|
- #endif
|
|
ret = readFile(fp, buf, sz);
|
|
- set_fs(oldfs);
|
|
closeFile(fp);
|
|
|
|
RTW_INFO("%s readFile, ret:%d\n", __FUNCTION__, ret);
|
|
@@ -2576,7 +2559,6 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz)
|
|
static int storeToFile(const char *path, u8 *buf, u32 sz)
|
|
{
|
|
int ret = 0;
|
|
- mm_segment_t oldfs;
|
|
struct file *fp;
|
|
|
|
if (path && buf) {
|
|
@@ -2584,14 +2566,7 @@ 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);
|
|
|
|
- oldfs = get_fs();
|
|
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
|
- set_fs(KERNEL_DS);
|
|
- #else
|
|
- set_fs(get_ds());
|
|
- #endif
|
|
ret = writeFile(fp, buf, sz);
|
|
- set_fs(oldfs);
|
|
closeFile(fp);
|
|
|
|
RTW_INFO("%s writeFile, ret:%d\n", __FUNCTION__, ret);
|
|
--
|
|
2.35.3
|
|
|