mirror of
https://github.com/cilynx/rtl88x2bu
synced 2025-08-30 13:58:00 +00:00
Use mm_segment_t only on Linux < 5.10.0
All usages of `mm_segment_t` are guarded by the same preprocessor directive, so nothing should really change.
This commit is contained in:
parent
a5f17bcb3d
commit
3de6f79af0
@ -1468,7 +1468,9 @@ u8 rtw_btcoex_sendmsgbysocket(_adapter *padapter, u8 *msg, u8 msg_size, bool for
|
|||||||
{
|
{
|
||||||
u8 error;
|
u8 error;
|
||||||
struct msghdr udpmsg;
|
struct msghdr udpmsg;
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||||
mm_segment_t oldfs;
|
mm_segment_t oldfs;
|
||||||
|
#endif
|
||||||
struct iovec iov;
|
struct iovec iov;
|
||||||
struct bt_coex_info *pcoex_info = &padapter->coex_info;
|
struct bt_coex_info *pcoex_info = &padapter->coex_info;
|
||||||
|
|
||||||
|
@ -4797,7 +4797,9 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t *ssid,
|
|||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
struct file *fp;
|
struct file *fp;
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||||
mm_segment_t fs;
|
mm_segment_t fs;
|
||||||
|
#endif
|
||||||
loff_t pos = 0;
|
loff_t pos = 0;
|
||||||
u8 *source = NULL;
|
u8 *source = NULL;
|
||||||
long len = 0;
|
long len = 0;
|
||||||
|
@ -4261,7 +4261,9 @@ static int route_dump(u32 *gw_addr , int *gw_index)
|
|||||||
struct msghdr msg;
|
struct msghdr msg;
|
||||||
struct iovec iov;
|
struct iovec iov;
|
||||||
struct sockaddr_nl nladdr;
|
struct sockaddr_nl nladdr;
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||||
mm_segment_t oldfs;
|
mm_segment_t oldfs;
|
||||||
|
#endif
|
||||||
char *pg;
|
char *pg;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
|
|
||||||
|
@ -2225,7 +2225,9 @@ static int isFileReadable(const char *path, u32 *sz)
|
|||||||
{
|
{
|
||||||
struct file *fp;
|
struct file *fp;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||||
mm_segment_t oldfs;
|
mm_segment_t oldfs;
|
||||||
|
#endif
|
||||||
char buf;
|
char buf;
|
||||||
|
|
||||||
fp = filp_open(path, O_RDONLY, 0);
|
fp = filp_open(path, O_RDONLY, 0);
|
||||||
@ -2270,7 +2272,9 @@ static int isFileReadable(const char *path, u32 *sz)
|
|||||||
static int retriveFromFile(const char *path, u8 *buf, u32 sz)
|
static int retriveFromFile(const char *path, u8 *buf, u32 sz)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||||
mm_segment_t oldfs;
|
mm_segment_t oldfs;
|
||||||
|
#endif
|
||||||
struct file *fp;
|
struct file *fp;
|
||||||
|
|
||||||
if (path && buf) {
|
if (path && buf) {
|
||||||
@ -2313,7 +2317,9 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz)
|
|||||||
static int storeToFile(const char *path, u8 *buf, u32 sz)
|
static int storeToFile(const char *path, u8 *buf, u32 sz)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||||
mm_segment_t oldfs;
|
mm_segment_t oldfs;
|
||||||
|
#endif
|
||||||
struct file *fp;
|
struct file *fp;
|
||||||
|
|
||||||
if (path && buf) {
|
if (path && buf) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user