Accepting request 534905 from home:alarrosa:packages

New package rtl8812au with the driver for Realtek 8812au wifi cards

OBS-URL: https://build.opensuse.org/request/show/534905
OBS-URL: https://build.opensuse.org/package/show/hardware/rtl8812au?expand=0&rev=1
This commit is contained in:
Ismail Dönmez 2017-10-19 12:07:15 +00:00 committed by Git OBS Bridge
commit 3318ab6141
11 changed files with 345 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,26 @@
From 060b103f388f3cb485cad96355e2335fec03bba9 Mon Sep 17 00:00:00 2001
From: Mauro Rossi <issor.oruam@gmail.com>
Date: Sat, 13 May 2017 23:47:35 +0200
Subject: [PATCH] rtl8812au: add support for kernel 4.11
kernel 4.11 requires to include <linux/sched/signal.h>
in include/osdep_service_linux.h
---
include/osdep_service_linux.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/osdep_service_linux.h b/include/osdep_service_linux.h
index 9aaf191..e875e63 100755
--- a/include/osdep_service_linux.h
+++ b/include/osdep_service_linux.h
@@ -117,6 +117,10 @@
#include <linux/netlink.h>
#endif //CONFIG_BT_COEXIST_SOCKET_TRX
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))
+ #include <linux/sched/signal.h>
+#endif
+
#ifdef CONFIG_USB_HCI
typedef struct urb * PURB;
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,22))

View File

@ -0,0 +1,71 @@
From 1d3af1e8e931f6fee3ceb26cee4c8b214bb8384c Mon Sep 17 00:00:00 2001
From: Mauro Rossi <issor.oruam@gmail.com>
Date: Sat, 13 May 2017 22:30:17 +0200
Subject: [PATCH] rtl8812au: add support for kernel 4.12
/home/utente/nougat-x86_kernel_49/kernel/os_dep/linux/ioctl_cfg80211.c:803:3:
error: too many arguments to function 'cfg80211_roamed'
cfg80211_roamed(padapter->pnetdev
^
/home/utente/nougat-x86_kernel_49/kernel/os_dep/linux/ioctl_cfg80211.c:6580:18:
error: 'WIPHY_FLAG_SUPPORTS_SCHED_SCAN' undeclared (first use in this function)
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
^
---
os_dep/linux/ioctl_cfg80211.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index e040059..1cca0dd 100755
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -794,12 +794,28 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
struct ieee80211_channel *notify_channel;
u32 freq;
u16 channel = cur_network->network.Configuration.DSConfig;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
+ struct cfg80211_roam_info roam_info = {};
+#endif
freq = rtw_ch2freq(channel);
notify_channel = ieee80211_get_channel(wiphy, freq);
#endif
DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
+ roam_info.channel = notify_channel;
+ roam_info.bssid = cur_network->network.MacAddress;
+ roam_info.req_ie =
+ pmlmepriv->assoc_req+sizeof(struct rtw_ieee80211_hdr_3addr)+2;
+ roam_info.req_ie_len =
+ pmlmepriv->assoc_req_len-sizeof(struct rtw_ieee80211_hdr_3addr)-2;
+ roam_info.resp_ie =
+ pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6;
+ roam_info.resp_ie_len =
+ pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6;
+ cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
+#else
cfg80211_roamed(padapter->pnetdev
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
, notify_channel
@@ -810,6 +826,7 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
, pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6
, pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6
, GFP_ATOMIC);
+#endif
}
else
{
@@ -6577,7 +6594,11 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
#endif
#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0))
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
+#else // kernel >= 4.12
+ wiphy->max_sched_scan_reqs = 1;
+#endif
#ifdef CONFIG_PNO_SUPPORT
wiphy->max_sched_scan_ssids = MAX_PNO_LIST_COUNT;
#endif

View File

@ -0,0 +1,27 @@
From 128289124927edb14e780ddaa9d91a16d44a805c Mon Sep 17 00:00:00 2001
From: Yoyosan <veselu@gmail.com>
Date: Fri, 14 Jul 2017 08:35:14 +0300
Subject: [PATCH] Fix build with kernel 4.11.9.
---
os_dep/linux/ioctl_cfg80211.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index e040059..684447e 100755
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -3961,7 +3961,13 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name,
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
strncpy(mon_ndev->name, name, IFNAMSIZ);
mon_ndev->name[IFNAMSIZ - 1] = 0;
+
+#if (LINUX_VERSION_CODE>=KERNEL_VERSION(4,11,9))
+ mon_ndev->needs_free_netdev = false;
+ mon_ndev->priv_destructor = rtw_ndev_destructor;
+#else
mon_ndev->destructor = rtw_ndev_destructor;
+#endif
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29))
mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops;

View File

@ -0,0 +1,34 @@
From 6cd2e46745638287302bf439e523d7ffd74d5987 Mon Sep 17 00:00:00 2001
From: Manuel Colmenero <manuel@colmenero.es>
Date: Wed, 16 Aug 2017 20:49:58 +0200
Subject: [PATCH] Fix for Linux kernel 4.12.5
Prevents error "initialization from incompatible pointer type".
See: https://patchwork.kernel.org/patch/9684967/
---
os_dep/linux/ioctl_cfg80211.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index 6246f14..e24dc3e 100755
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -1895,7 +1895,7 @@ enum nl80211_iftype {
*/
static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
struct net_device *ndev,
- enum nl80211_iftype type, u32 *flags,
+ enum nl80211_iftype type,
struct vif_params *params)
{
enum nl80211_iftype old_type;
@@ -4051,7 +4051,7 @@ static int
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
unsigned char name_assign_type,
#endif
- enum nl80211_iftype type, u32 *flags, struct vif_params *params)
+ enum nl80211_iftype type, struct vif_params *params)
{
int ret = 0;
struct net_device* ndev = NULL;

14
_service Normal file
View File

@ -0,0 +1,14 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/diederikdehaas/rtl8812AU</param>
<param name="scm">git</param>
<param name="versionformat">4.3.20</param>
<param name="revision">driver-4.3.20</param>
<param name="filename">rtl8812au</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

3
rtl8812au-4.3.20.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a4d2f7d9a1535bf0dea411f5a5d468319e62f70cbc31537bf448a6f6e53f8fe8
size 1301656

30
rtl8812au-preamble Normal file
View File

@ -0,0 +1,30 @@
Requires: kernel-%1
Enhances: kernel-%1
Supplements: modalias(usb:v7392pA822d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v2357p0103d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v2357p0101d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v20F4p805Bd*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v2019pAB30d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v2001p3316d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v2001p3315d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v2001p3313d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v2001p330Ed*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v1740p0100d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v148Fp9097d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v13B1p003Fd*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v1058p0632d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v0E66p0022d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v0DF6p0074d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v0B05p17D2d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v07B8p8812d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v0789p016Ed*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v0586p3426d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v050Dp1109d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v050Dp1106d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v04BBp0952d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v0409p0408d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v0BDAp881Cd*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v0BDAp881Bd*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v0BDAp881Ad*dc*dsc*dp*ic*isc*ip*in*)
Supplements: modalias(usb:v0BDAp8812d*dc*dsc*dp*ic*isc*ip*in*)
Supplements: packageand(kernel-%1:%name)

20
rtl8812au.changes Normal file
View File

@ -0,0 +1,20 @@
-------------------------------------------------------------------
Mon Oct 2 14:34:29 UTC 2017 - alarrosa@suse.com
- Add 0001-add-support-for-kernel-4.11.patch
0002-add-support-for-kernel-4.12.patch
0003-Fix-build-with-kernel-4.11.9.patch
0004-Fix-for-Linux-kernel-4.12.5.patch
from https://github.com/maurossi/rtl8812au/ to fix
builds with the kernel versions in TW
-------------------------------------------------------------------
Fri Sep 29 16:46:58 UTC 2017 - alarrosa@suse.com
- Build fixes and add Supplements modalias
-------------------------------------------------------------------
Fri Nov 25 14:02:17 UTC 2016 - alarrosa@suse.com
- Initial build

96
rtl8812au.spec Normal file
View File

@ -0,0 +1,96 @@
#
# spec file for package rtl8812au
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: rtl8812au
Version: 4.3.20
Release: 0
Summary: Kernel driver for Realtek 802.11ac 8812au wifi cards
License: GPL-2.0
Group: System/Kernel
Url: https://github.com/diederikdehaas/rtl8812AU
Source0: %{name}-%{version}.tar.xz
Source1: %{name}-preamble
Patch0: 0001-add-support-for-kernel-4.11.patch
Patch1: 0002-add-support-for-kernel-4.12.patch
Patch2: 0003-Fix-build-with-kernel-4.11.9.patch
Patch3: 0004-Fix-for-Linux-kernel-4.12.5.patch
BuildRequires: %{kernel_module_package_buildreqs}
BuildRequires: fdupes
BuildRequires: kernel-devel
BuildRequires: kernel-source
BuildRequires: module-init-tools
BuildRequires: binutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#BuildArch: noarch
%kernel_module_package -p %{name}-preamble
%description
Kernel driver for Realtek 802.11ac 8812au wifi cards
The sources were obtained from https://github.com/diederikdehaas/rtl8812AU, which adapted the official driver
released by Realtek to build on recent kernels.
%package KMP
Summary: Kernel driver for Realtek 802.11ac rtl8812au wifi cards
Group: System/Kernel
%description KMP
Kernel driver for Realtek 802.11ac 8812au wifi cards
The sources were obtained from https://github.com/diederikdehaas/rtl8812AU, which adapted the official driver
released by TP-Link for the Archer T4U AC1200 V1 to build on recent kernels.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
set -- *
mkdir source
mv "$@" source/
mkdir obj
%build
for flavor in %{flavors_to_build} ; do
# rm -rf obj/$flavor
cp -a source obj/$flavor
pushd obj/$flavor
sed -i -e "s,^KSRC := /lib/modules/\$(KVER)/build$,KSRC := /usr/src/linux-obj/%_target_cpu/$flavor," Makefile
make
popd
done
%install
export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=%{kernel_module_package_moddir}
kernel_version=`uname -r | sed -e "s/\(-[0-9\.]*\)-.*/\1/"`
echo ${kernel_version}
for flavor in %{flavors_to_build} ; do
pushd obj/$flavor
install -d %{buildroot}/lib/modules/${kernel_version}-$flavor/${INSTALL_MOD_DIR}/
install -p -m 644 8812au.ko %{buildroot}/lib/modules/${kernel_version}-$flavor/${INSTALL_MOD_DIR}/
popd
done
%files
%defattr(-,root,root)
%doc source/LICENSE source/README.md
%changelog