blob: 725a41c9acc5bb9c7cf15c80a6fe8e3fb5bea5ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From 16e51cb83f9fa1717383c9d67f5531df7348347c Mon Sep 17 00:00:00 2001
From: Robert Marko <robert.marko@sartura.hr>
Date: Wed, 30 Mar 2022 19:51:56 +0200
Subject: [PATCH] mwlwifi: replace get/set_fs() calls
Since kernel 5.9 the get/set_fs() call implementation have started to get
dropped from individual architectures, ARM64 one got dropped in 5.11.
Replace the get/set_fs() calls with force_uaccess_begin/end() to allow
compiling on newer kernels.
There is no need to add kernel version checks as the replacement functions
are available since kernel 5.9.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
hif/pcie/pcie.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/hif/pcie/pcie.c
+++ b/hif/pcie/pcie.c
@@ -1293,8 +1293,7 @@ static void pcie_bf_mimo_ctrl_decode(str
char *buf = &str_buf[0];
mm_segment_t oldfs;
- oldfs = get_fs();
- set_fs(KERNEL_DS);
+ oldfs = force_uaccess_begin();
buf += sprintf(buf, "\nMAC: %pM\n", bf_mimo_ctrl->rec_mac);
buf += sprintf(buf, "SU_0_MU_1: %d\n", bf_mimo_ctrl->type);
@@ -1314,7 +1313,7 @@ static void pcie_bf_mimo_ctrl_decode(str
filename, (unsigned int)fp_data);
}
- set_fs(oldfs);
+ force_uaccess_end(oldfs);
}
static void pcie_process_account(struct ieee80211_hw *hw)
|