net-wireless/rtl8814au: remove oldest, add latest with kernel 6.3 support

pull/39/head
Victor Kustov 1 year ago
parent 4f4d543db9
commit a57b575b3e

@ -1,3 +1,3 @@
DIST rtl8814au-20210429.zip 3013417 BLAKE2B 8fcec2064b0af092e93446f8041e3849ae0162429849fe15270f24d231f3b6a208e47f1beff3762cc0973e7ade0a625a2a5893856ad474b39a491df43d02707a SHA512 4a999708706d29f0ca490d94a269285eb9a4e61bba28401187caefe8c5ef5565306f4cd8b96b906d66b52265e93c28394cd01132c55238542c656b6064a1f97a
DIST rtl8814au-20211122.tar.gz 2648090 BLAKE2B 4326ccf897903922a1d8efc34756a6dba70b0dd103909ecbc89b1714c25f9f03edfaad5816f5d00336091647254e188a286768996b0e042051df878fc477c1ba SHA512 dc39d0a0fcd275407fa3a4751611172629d9018f6fc5535ecae26d8ff44de5e374a708407a49ce3bce22adee4fee0a96f21e6d5b13dac667c63073b79008b513
DIST rtl8814au-20221110.tar.gz 2642540 BLAKE2B 0d7fab629e31f77526c02eea5391d603c19cdeb4c440a15eab984346ab70aa1c0203b2556d580c9b1040f5bd83535bcf6ad28e18119fb7629772618c75f4d8a5 SHA512 1d72cd9188afaa2e015fc4e321eed8fbf6ffafe9d9e624e97eaccbc68acebc6691a032cf6cfe1c44b1fb907db9f010e140c0100c43ffffb2b7206ab017198d8a
DIST rtl8814au-20230321.tar.gz 2646177 BLAKE2B c458cf6cca2b97ddff5784f1285d0ba1969868507902fe426f7d99f774032a8e09b443df70609f4a56b9bca2ac4d27645cc2ea0c5ba80b2af7865963acab673f SHA512 2c176a3be30dd8398e24a5b7f00bf50f7541225ad25921e1b02cef481450833b6ac65cdbd418303a9ecfbfd7f343296d1d3107cc97049c708e35b9b227723f4f

@ -1,264 +0,0 @@
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);

@ -1,21 +1,19 @@
# Copyright 1999-2019 Gentoo Foundation
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
inherit linux-mod
COMMIT="454321814dbc27e26fcf540de904e9bce9068f8c"
COMMIT="6f80699e68fd2a9f2bba3f1a56ca06d1b7992bd8"
DESCRIPTION="Realtek 8814AU USB WiFi module for Linux kernel"
HOMEPAGE="https://github.com/morrownr/8814au"
SRC_URI="https://github.com/morrownr/8814au/archive/${COMMIT}.zip -> rtl8814au-${PV}.zip"
SRC_URI="https://github.com/morrownr/8814au/archive/${COMMIT}.tar.gz -> rtl8814au-${PV}.tar.gz"
LICENSE="GPL-2"
KEYWORDS="~amd64"
DEPEND="virtual/linux-sources
app-arch/unzip"
RDEPEND=""
DEPEND="virtual/linux-sources"
S="${WORKDIR}/8814au-${COMMIT}"
@ -23,26 +21,7 @@ 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…
Cancel
Save