parent
0610ec01e7
commit
33c7446993
@ -1,3 +1,4 @@
|
||||
DIST rtl8814au-20190710.zip 2445716 BLAKE2B ab6a2ab762b0c4af76362d472319409137f8fb2a49e481e986aa6f0ceda87c0a12e4b19e32b5c4079604ae88c4bd1a514801bb14771c7c5ef725933ebc568aa2 SHA512 24ec11428b370f35d448b7c99a1bdafc4ec6c5613271002f585f4faa941219ff4aeaeb3154aedfff3c2192872e374049188a5c1b29a5e0acc4eae4ad6b5f27b3
|
||||
DIST rtl8814au-20200617.zip 2445716 BLAKE2B ab6a2ab762b0c4af76362d472319409137f8fb2a49e481e986aa6f0ceda87c0a12e4b19e32b5c4079604ae88c4bd1a514801bb14771c7c5ef725933ebc568aa2 SHA512 24ec11428b370f35d448b7c99a1bdafc4ec6c5613271002f585f4faa941219ff4aeaeb3154aedfff3c2192872e374049188a5c1b29a5e0acc4eae4ad6b5f27b3
|
||||
DIST rtl8814au-20201020.zip 2730013 BLAKE2B 560c2699c9e54cf666f2eb820537fd0e74231a995c4b633a596cc8686f45bca0ca4451203fdbd6333ec79dff54067ef363f03a4ad8c6c13c0965fb99c657f843 SHA512 37f0dc0c4bcb777e0d951644aae3604b4eed9b4ddbc55873cfc411e8f577a2745810006b0ece62cdfd773915245e03a527b2d7a060db388507e3fef2d6c2cd63
|
||||
DIST rtl8814au-20201228.zip 2730632 BLAKE2B 0b5a0ae6715ba9af07e7ec08044144445d18d5cf9319bfca9285e626abb7d1b38f1ae6338f4ac507a5db3beaca315688689451f110d97662ae55a98b05d57f93 SHA512 b302f6a05baf630a6b199f82c567198d5d0aac77c1d70f5de9f8ea68a9340cc7de6879776e042abbfd92ed89ce2250fb60eaca7ff045c78efe40fbfcb54b0166
|
||||
|
@ -0,0 +1,264 @@
|
||||
diff --git a/core/efuse/rtw_efuse.c b/core/efuse/rtw_efuse.c
|
||||
index a357253..667f5f8 100755
|
||||
--- a/core/efuse/rtw_efuse.c
|
||||
+++ b/core/efuse/rtw_efuse.c
|
||||
@@ -3204,7 +3204,9 @@ int storeAdaptorInfoFile(char *path, u8 *efuse_data)
|
||||
int retriveAdaptorInfoFile(char *path, u8 *efuse_data)
|
||||
{
|
||||
int ret = _SUCCESS;
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
mm_segment_t oldfs;
|
||||
+#endif
|
||||
struct file *fp;
|
||||
|
||||
if (path && efuse_data) {
|
||||
diff --git a/core/rtw_btcoex.c b/core/rtw_btcoex.c
|
||||
index 15df50e..085b5f5 100755
|
||||
--- a/core/rtw_btcoex.c
|
||||
+++ b/core/rtw_btcoex.c
|
||||
@@ -1468,7 +1468,9 @@ u8 rtw_btcoex_sendmsgbysocket(_adapter *padapter, u8 *msg, u8 msg_size, bool for
|
||||
{
|
||||
u8 error;
|
||||
struct msghdr udpmsg;
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
mm_segment_t oldfs;
|
||||
+#endif
|
||||
struct iovec iov;
|
||||
struct bt_coex_info *pcoex_info = &padapter->coex_info;
|
||||
|
||||
@@ -1498,15 +1500,19 @@ u8 rtw_btcoex_sendmsgbysocket(_adapter *padapter, u8 *msg, u8 msg_size, bool for
|
||||
udpmsg.msg_control = NULL;
|
||||
udpmsg.msg_controllen = 0;
|
||||
udpmsg.msg_flags = MSG_DONTWAIT | MSG_NOSIGNAL;
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
oldfs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
+#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||
error = sock_sendmsg(pcoex_info->udpsock, &udpmsg);
|
||||
#else
|
||||
error = sock_sendmsg(pcoex_info->udpsock, &udpmsg, msg_size);
|
||||
#endif
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
set_fs(oldfs);
|
||||
+#endif
|
||||
if (error < 0) {
|
||||
RTW_INFO("Error when sendimg msg, error:%d\n", error);
|
||||
return _FAIL;
|
||||
diff --git a/core/rtw_ieee80211.c b/core/rtw_ieee80211.c
|
||||
index 846df87..1d15677 100755
|
||||
--- a/core/rtw_ieee80211.c
|
||||
+++ b/core/rtw_ieee80211.c
|
||||
@@ -1522,7 +1522,9 @@ int rtw_get_mac_addr_intel(unsigned char *buf)
|
||||
int ret = 0;
|
||||
int i;
|
||||
struct file *fp = NULL;
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
mm_segment_t oldfs;
|
||||
+#endif
|
||||
unsigned char c_mac[MAC_ADDRESS_LEN];
|
||||
char fname[] = "/config/wifi/mac.txt";
|
||||
int jj, kk;
|
||||
diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c
|
||||
index fbe575e..f18b242 100755
|
||||
--- a/core/rtw_wlan_util.c
|
||||
+++ b/core/rtw_wlan_util.c
|
||||
@@ -4752,7 +4752,9 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t *ssid,
|
||||
|
||||
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;
|
||||
@@ -4789,8 +4791,10 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t *ssid,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
+#endif
|
||||
|
||||
source = rtw_zmalloc(2048);
|
||||
|
||||
@@ -4800,7 +4804,9 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t *ssid,
|
||||
rtw_mfree(source, 2048);
|
||||
}
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
set_fs(fs);
|
||||
+#endif
|
||||
filp_close(fp, NULL);
|
||||
|
||||
RTW_INFO("-%s-\n", __func__);
|
||||
diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c
|
||||
index b6f1ab6..4b0d634 100755
|
||||
--- a/os_dep/linux/os_intfs.c
|
||||
+++ b/os_dep/linux/os_intfs.c
|
||||
@@ -4247,7 +4247,9 @@ static int route_dump(u32 *gw_addr , int *gw_index)
|
||||
struct msghdr msg;
|
||||
struct iovec iov;
|
||||
struct sockaddr_nl nladdr;
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
mm_segment_t oldfs;
|
||||
+#endif
|
||||
char *pg;
|
||||
int size = 0;
|
||||
|
||||
@@ -4286,14 +4288,18 @@ static int route_dump(u32 *gw_addr , int *gw_index)
|
||||
msg.msg_controllen = 0;
|
||||
msg.msg_flags = MSG_DONTWAIT;
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
oldfs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
+#endif
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||
err = sock_sendmsg(sock, &msg);
|
||||
#else
|
||||
err = sock_sendmsg(sock, &msg, sizeof(req));
|
||||
#endif
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
set_fs(oldfs);
|
||||
+#endif
|
||||
|
||||
if (err < 0)
|
||||
goto out_sock;
|
||||
@@ -4318,14 +4324,18 @@ restart:
|
||||
iov_iter_init(&msg.msg_iter, READ, &iov, 1, PAGE_SIZE);
|
||||
#endif
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
oldfs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
+#endif
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0))
|
||||
err = sock_recvmsg(sock, &msg, MSG_DONTWAIT);
|
||||
#else
|
||||
err = sock_recvmsg(sock, &msg, PAGE_SIZE, MSG_DONTWAIT);
|
||||
#endif
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
set_fs(oldfs);
|
||||
+#endif
|
||||
|
||||
if (err < 0)
|
||||
goto out_sock_pg;
|
||||
@@ -4396,14 +4406,18 @@ done:
|
||||
msg.msg_controllen = 0;
|
||||
msg.msg_flags = MSG_DONTWAIT;
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
oldfs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
+#endif
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||
err = sock_sendmsg(sock, &msg);
|
||||
#else
|
||||
err = sock_sendmsg(sock, &msg, sizeof(req));
|
||||
#endif
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
set_fs(oldfs);
|
||||
+#endif
|
||||
|
||||
if (err > 0)
|
||||
goto restart;
|
||||
diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
|
||||
index 8237b32..ae76f7c 100755
|
||||
--- a/os_dep/osdep_service.c
|
||||
+++ b/os_dep/osdep_service.c
|
||||
@@ -2213,19 +2213,23 @@ static int isFileReadable(const char *path, u32 *sz)
|
||||
{
|
||||
struct file *fp;
|
||||
int ret = 0;
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
mm_segment_t oldfs;
|
||||
+#endif
|
||||
char buf;
|
||||
|
||||
fp = filp_open(path, O_RDONLY, 0);
|
||||
if (IS_ERR(fp))
|
||||
ret = PTR_ERR(fp);
|
||||
else {
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
oldfs = get_fs();
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
||||
set_fs(KERNEL_DS);
|
||||
#else
|
||||
set_fs(get_ds());
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
if (1 != readFile(fp, &buf, 1))
|
||||
ret = PTR_ERR(fp);
|
||||
@@ -2238,7 +2242,9 @@ static int isFileReadable(const char *path, u32 *sz)
|
||||
#endif
|
||||
}
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
set_fs(oldfs);
|
||||
+#endif
|
||||
filp_close(fp, NULL);
|
||||
}
|
||||
return ret;
|
||||
@@ -2254,7 +2260,9 @@ static int isFileReadable(const char *path, u32 *sz)
|
||||
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) {
|
||||
@@ -2262,14 +2270,18 @@ 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);
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
oldfs = get_fs();
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
||||
set_fs(KERNEL_DS);
|
||||
#else
|
||||
set_fs(get_ds());
|
||||
#endif
|
||||
+#endif
|
||||
ret = readFile(fp, buf, sz);
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
set_fs(oldfs);
|
||||
+#endif
|
||||
closeFile(fp);
|
||||
|
||||
RTW_INFO("%s readFile, ret:%d\n", __FUNCTION__, ret);
|
||||
@@ -2293,7 +2305,9 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz)
|
||||
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) {
|
||||
@@ -2301,14 +2315,18 @@ 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);
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
oldfs = get_fs();
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
||||
set_fs(KERNEL_DS);
|
||||
#else
|
||||
set_fs(get_ds());
|
||||
#endif
|
||||
+#endif
|
||||
ret = writeFile(fp, buf, sz);
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||
set_fs(oldfs);
|
||||
+#endif
|
||||
closeFile(fp);
|
||||
|
||||
RTW_INFO("%s writeFile, ret:%d\n", __FUNCTION__, ret);
|
@ -0,0 +1,49 @@
|
||||
# Copyright 1999-2019 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit linux-mod
|
||||
|
||||
COMMIT="a333b6a2b091efc90cbb3946c27fb93f638dcbb4"
|
||||
|
||||
DESCRIPTION="Realtek 8814AU USB WiFi module for Linux kernel"
|
||||
HOMEPAGE="https://github.com/aircrack-ng/rtl8814au"
|
||||
SRC_URI="https://github.com/aircrack-ng/rtl8814au/archive/${COMMIT}.zip -> rtl8814au-${PV}.zip"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND="virtual/linux-sources
|
||||
app-arch/unzip"
|
||||
RDEPEND=""
|
||||
|
||||
S="${WORKDIR}/rtl8814au-${COMMIT}"
|
||||
|
||||
MODULE_NAMES="8814au(net/wireless)"
|
||||
BUILD_TARGETS="all"
|
||||
BUILD_TARGET_ARCH="${ARCH}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
epatch "${FILESDIR}/rtl-20201228-kernel-5.10.patch"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
linux-mod_pkg_setup
|
||||
BUILD_PARAMS="KERN_DIR=${KV_DIR} KSRC=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
|
||||
}
|
||||
|
||||
src_compile(){
|
||||
linux-mod_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod_pkg_postinst
|
||||
}
|
||||
|
Loading…
Reference in new issue