SHA256
1
0
forked from pool/rtl88x2bu

Accepting request 924513 from home:MasterPatricko:branches:hardware

New package of rtl88x2bu for Realtek USB devices, from https://github.com/cilynx/rtl88x2bu

OBS-URL: https://build.opensuse.org/request/show/924513
OBS-URL: https://build.opensuse.org/package/show/hardware/rtl88x2bu?expand=0&rev=1
This commit is contained in:
Michal Suchanek 2021-10-20 18:01:00 +00:00 committed by Git OBS Bridge
commit 80fdda2096
11 changed files with 235 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

15
_service Normal file
View File

@ -0,0 +1,15 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/cilynx/rtl88x2bu.git</param>
<param name="filename">rtl88x2bu</param>
<param name="versionformat">5.8.7.1+git%cd.%h</param>
<param name="revision">5.8.7.1_35809.20191129_COEX20191120-7777</param>
</service>
<service name="set_version" mode="disabled"/>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="compression">xz</param>
<param name="file">*.tar</param>
</service>
</services>

View File

@ -0,0 +1,56 @@
From: Antonio Larrosa <alarrosa@suse.com>
Subject: Fix build with SLE 15-SP3 / Leap 15.3
The SLE 15 SP3/Leap 15.3's kernel includes
backported patches to support update_mgmt_frame_registrations
instead of mgmt_frame_register which would be expected
according to the kernel version, so we force to use the
more modern interface.
--- os_dep/linux/ioctl_cfg80211.c.orig
+++ os_dep/linux/ioctl_cfg80211.c
@@ -7771,7 +7771,7 @@ exit:
return ret;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18))
static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
@@ -7787,7 +7787,7 @@ static void cfg80211_rtw_update_mgmt_fra
struct mgmt_frame_regs *upd)
#endif
{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 18))
u32 rtw_mask = BIT(IEEE80211_STYPE_PROBE_REQ >> 4);
#endif
@@ -7805,7 +7805,7 @@ static void cfg80211_rtw_update_mgmt_fra
pwdev_priv = adapter_wdev_data(adapter);
#ifdef CONFIG_DEBUG_CFG80211
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18))
RTW_INFO(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter),
frame_type, reg);
#else
@@ -7817,7 +7817,7 @@ static void cfg80211_rtw_update_mgmt_fra
/* Wait QC Verify */
return;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18))
switch (frame_type) {
case IEEE80211_STYPE_AUTH: /* 0x00B0 */
if (reg > 0)
@@ -10230,7 +10230,7 @@ static struct cfg80211_ops rtw_cfg80211_
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
.mgmt_tx = cfg80211_rtw_mgmt_tx,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18))
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
#else
.update_mgmt_frame_registrations =

View File

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

View File

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

2
rtl88x2bu-preamble Normal file
View File

@ -0,0 +1,2 @@
Requires: kernel-%1
Enhances: kernel-%1

9
rtl88x2bu.changes Normal file
View File

@ -0,0 +1,9 @@
-------------------------------------------------------------------
Mon Oct 4 00:39:57 UTC 2021 - Tejas Guruswamy <tejas.guruswamy@opensuse.org>
- Add fix-backported-update_mgmt_frame_registrations.patch for build on 15.3 kernel
-------------------------------------------------------------------
Mon Oct 4 00:11:41 UTC 2021 - Tejas Guruswamy <tejas.guruswamy@opensuse.org>
- Initial package from https://github.com/cilynx/rtl88x2bu

5
rtl88x2bu.obsinfo Normal file
View File

@ -0,0 +1,5 @@
name: rtl88x2bu
version: 5.8.7.1+git20210928.f2bccb9
mtime: 1632829912
commit: f2bccb96ac8e54b63ef35a3c873075f21fb95030

107
rtl88x2bu.spec Normal file
View File

@ -0,0 +1,107 @@
#
# spec file for package rtl88x2bu
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: rtl88x2bu
Version: 5.8.7.1+git20210928.f2bccb9
Release: 0
Summary: Kernel driver for Realtek 88x2bu wifi cards
License: GPL-2.0-only
Group: System/Kernel
URL: https://github.com/cilynx/rtl88x2bu
ExcludeArch: s390x
Source0: %{name}-%{version}.tar.xz
Source1: %{name}-preamble
# PATCH-FIX-OPENSUSE rtl88x2bu_nodate_time.patch
Patch0: rtl88x2bu_nodate_time.patch
# PATCH-FIX-OPENSUSE fix-backported-update_mgmt_frame_registrations.patch
Patch1: fix-backported-update_mgmt_frame_registrations.patch
BuildRequires: %{kernel_module_package_buildreqs}
BuildRequires: kernel-syms
BuildRequires: module-init-tools
%description
Kernel driver for Realtek 88x2bu wifi cards
The sources were obtained from https://github.com/cilynx/rtl88x2bu, which adapts the official driver
released by Realtek to build on recent kernels.
%package KMP
Summary: Kernel driver for Realtek rtl88x2bu wifi cards
Group: System/Kernel
%description KMP
Kernel driver for Realtek 88x2bu wifi cards
The sources were obtained from https://github.com/cilynx/rtl88x2bu, which adapts the official driver
released by Realtek to build on recent kernels.
%kernel_module_package -p %{name}-preamble
%prep
%setup -q
sed -i '/EXTRA_CFLAGS += -O2/d' Makefile
sed -i '/EXTRA_LDFLAGS += --strip-debug/d' Makefile
%patch0 -p0
%if 0%{?sle_version} == 150300
%patch1 -p0
%endif
set -- *
mkdir source
mv "$@" source/
mkdir obj
%build
%ifarch %{arm}
export ARCH=arm
%endif
%ifarch aarch64
export ARCH=arm64
%endif
%ifarch %{ppc} ppc64 ppc64le
export ARCH=powerpc
%endif
%ifarch riscv64
export ARCH=riscv
%endif
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 := %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor," Makefile
%make_build
popd
done
%install
export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=%{kernel_module_package_moddir}
kernel_version=`uname -r | sed -e "s/-[^-]*$//"`
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 88x2bu.ko %{buildroot}/lib/modules/${kernel_version}-${flavor}/${INSTALL_MOD_DIR}/
popd
done
%files
%license source/LICENSE
%changelog

View File

@ -0,0 +1,11 @@
--- core/rtw_debug.c.orig
+++ core/rtw_debug.c
@@ -42,7 +42,7 @@ const char *rtw_log_level_str[] = {
void dump_drv_version(void *sel)
{
RTW_PRINT_SEL(sel, "%s %s\n", DRV_NAME, DRIVERVERSION);
- RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__);
+// RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__);
}
void dump_drv_cfg(void *sel)