From 03bf1f3bb4a595091853479ec27b546423bf88d6e3fe72210416e65d12c0b0e6 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Wed, 12 May 2021 05:19:01 +0000 Subject: [PATCH 1/3] Accepting request 892303 from home:vkwan8:branches:hardware - Update to 5.9.3.2+git20210427.6ef5d8f * Works with kernel 5.12. OBS-URL: https://build.opensuse.org/request/show/892303 OBS-URL: https://build.opensuse.org/package/show/hardware/rtl8812au?expand=0&rev=32 --- rtl8812au-5.9.3.2+git20210302.d1bf6df.obscpio | 3 --- rtl8812au-5.9.3.2+git20210427.6ef5d8f.obscpio | 3 +++ rtl8812au.changes | 6 ++++++ rtl8812au.obsinfo | 6 +++--- rtl8812au.spec | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) delete mode 100644 rtl8812au-5.9.3.2+git20210302.d1bf6df.obscpio create mode 100644 rtl8812au-5.9.3.2+git20210427.6ef5d8f.obscpio diff --git a/rtl8812au-5.9.3.2+git20210302.d1bf6df.obscpio b/rtl8812au-5.9.3.2+git20210302.d1bf6df.obscpio deleted file mode 100644 index 95e4c3a..0000000 --- a/rtl8812au-5.9.3.2+git20210302.d1bf6df.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:abc3dce88195416740459c80e52a48ffb20e9278ea295f30da18dc364245608b -size 14401549 diff --git a/rtl8812au-5.9.3.2+git20210427.6ef5d8f.obscpio b/rtl8812au-5.9.3.2+git20210427.6ef5d8f.obscpio new file mode 100644 index 0000000..9483a57 --- /dev/null +++ b/rtl8812au-5.9.3.2+git20210427.6ef5d8f.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b15e340e9b787f0c53ad578d4dbc355bb9535ce0b64157ace3b988ecdacfa1e +size 14402061 diff --git a/rtl8812au.changes b/rtl8812au.changes index eaf7a1e..35bbd89 100644 --- a/rtl8812au.changes +++ b/rtl8812au.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 11 21:50:35 UTC 2021 - Victor Kwan + +- Update to 5.9.3.2+git20210427.6ef5d8f + * Works with kernel 5.12. + ------------------------------------------------------------------- Thu Mar 11 14:02:34 UTC 2021 - Antonio Larrosa diff --git a/rtl8812au.obsinfo b/rtl8812au.obsinfo index b636be9..33815c2 100644 --- a/rtl8812au.obsinfo +++ b/rtl8812au.obsinfo @@ -1,5 +1,5 @@ name: rtl8812au -version: 5.9.3.2+git20210302.d1bf6df -mtime: 1614700034 -commit: d1bf6dfdef9a14ee80768a80df1852312cee7925 +version: 5.9.3.2+git20210427.6ef5d8f +mtime: 1619523090 +commit: 6ef5d8fcdb0b94b7490a9a38353877708fca2cd4 diff --git a/rtl8812au.spec b/rtl8812au.spec index 10fdecc..0aa4107 100644 --- a/rtl8812au.spec +++ b/rtl8812au.spec @@ -17,7 +17,7 @@ Name: rtl8812au -Version: 5.9.3.2+git20210302.d1bf6df +Version: 5.9.3.2+git20210427.6ef5d8f Release: 0 Summary: Kernel driver for Realtek 802.11ac 8812au wifi cards License: GPL-2.0-only From a60437cbcb84e41f1d2bdcc693655ad36661d97cd175ffaa618b1b028ae0ee21 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Wed, 12 May 2021 06:41:12 +0000 Subject: [PATCH 2/3] Accepting request 892370 from home:alarrosa:branches:hardware - Add patch to build with Leap 15.3's kernel which includes backported patches to support update_mgmt_frame_registrations instead of mgmt_frame_register which would be expected according to the kernel version: * fix-backported-update_mgmt_frame_registrations.patch OBS-URL: https://build.opensuse.org/request/show/892370 OBS-URL: https://build.opensuse.org/package/show/hardware/rtl8812au?expand=0&rev=33 --- ...rted-update_mgmt_frame_registrations.patch | 95 +++++++++++++++++++ rtl8812au.changes | 9 ++ rtl8812au.spec | 10 +- 3 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 fix-backported-update_mgmt_frame_registrations.patch diff --git a/fix-backported-update_mgmt_frame_registrations.patch b/fix-backported-update_mgmt_frame_registrations.patch new file mode 100644 index 0000000..020c76f --- /dev/null +++ b/fix-backported-update_mgmt_frame_registrations.patch @@ -0,0 +1,95 @@ +From: Antonio Larrosa +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. + +Index: rtl8812au-5.9.3.2+git20210427.6ef5d8f/os_dep/linux/ioctl_cfg80211.c +=================================================================== +--- rtl8812au-5.9.3.2+git20210427.6ef5d8f.orig/os_dep/linux/ioctl_cfg80211.c ++++ rtl8812au-5.9.3.2+git20210427.6ef5d8f/os_dep/linux/ioctl_cfg80211.c +@@ -7902,61 +7902,6 @@ exit: + return ret; + } + +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) +-static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) +- struct wireless_dev *wdev, +-#else +- struct net_device *ndev, +-#endif +- u16 frame_type, bool reg) +-{ +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) +- struct net_device *ndev = wdev_to_ndev(wdev); +-#endif +- _adapter *adapter; +- struct rtw_wdev_priv *pwdev_priv; +- +- if (ndev == NULL) +- goto exit; +- +- adapter = (_adapter *)rtw_netdev_priv(ndev); +- pwdev_priv = adapter_wdev_data(adapter); +- +-#ifdef CONFIG_DEBUG_CFG80211 +- RTW_INFO(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter), +- frame_type, reg); +-#endif +- +- switch (frame_type) { +- case IEEE80211_STYPE_AUTH: /* 0x00B0 */ +- if (reg > 0) +- SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_AUTH); +- else +- CLR_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_AUTH); +- break; +-#ifdef not_yet +- case IEEE80211_STYPE_PROBE_REQ: /* 0x0040 */ +- if (reg > 0) +- SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ); +- else +- CLR_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ); +- break; +- case IEEE80211_STYPE_ACTION: /* 0x00D0 */ +- if (reg > 0) +- SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_ACTION); +- else +- CLR_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_ACTION); +- break; +-#endif +- default: +- break; +- } +- +-exit: +- return; +-} +-#else + static void cfg80211_rtw_update_mgmt_frame_register( + struct wiphy *wiphy, + struct wireless_dev *wdev, +@@ -7995,7 +7940,6 @@ static void cfg80211_rtw_update_mgmt_fra + exit: + return; + } +-#endif + + #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) + static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, +@@ -10394,11 +10338,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)) +- .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, +-#else + .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_register, +-#endif + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) + .action = cfg80211_rtw_mgmt_tx, + #endif diff --git a/rtl8812au.changes b/rtl8812au.changes index 35bbd89..6c82aa7 100644 --- a/rtl8812au.changes +++ b/rtl8812au.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed May 12 06:21:36 UTC 2021 - Antonio Larrosa + +- Add patch to build with Leap 15.3's kernel which includes + backported patches to support update_mgmt_frame_registrations + instead of mgmt_frame_register which would be expected + according to the kernel version: + * fix-backported-update_mgmt_frame_registrations.patch + ------------------------------------------------------------------- Tue May 11 21:50:35 UTC 2021 - Victor Kwan diff --git a/rtl8812au.spec b/rtl8812au.spec index 0aa4107..6cc75ac 100644 --- a/rtl8812au.spec +++ b/rtl8812au.spec @@ -28,6 +28,8 @@ Source1: %{name}-preamble Source2: LICENSE # PATCH-FIX-OPENSUSE fix-backported-ndo_select_queue.patch Patch0: fix-backported-ndo_select_queue.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: bc BuildRequires: binutils @@ -43,7 +45,7 @@ Kernel driver for Realtek 802.11ac 8812au wifi cards The sources were obtained from https://github.com/gordboy/rtl8812au, which adaptes the official driver released by Realtek to build on recent kernels. -The previous sources were obtained from https://github.com/diederikdehaas/rtl8812AU and +The previous sources were obtained from https://github.com/diederikdehaas/rtl8812AU and https://github.com/maurossi/rtl8812au/ . %package KMP @@ -56,7 +58,7 @@ Kernel driver for Realtek 802.11ac 8812au wifi cards The sources were obtained from https://github.com/gordboy/rtl8812au, which adaptes the official driver released by Realtek to build on recent kernels. -The previous sources were obtained from https://github.com/diederikdehaas/rtl8812AU and +The previous sources were obtained from https://github.com/diederikdehaas/rtl8812AU and https://github.com/maurossi/rtl8812au/ . %prep @@ -65,6 +67,10 @@ https://github.com/maurossi/rtl8812au/ . %patch0 -p1 %endif +%if 0%{?sle_version} == 150300 +%patch1 -p1 +%endif + set -- * mkdir source mv "$@" source/ From 4152db5fe0cf14e28174307e8c2ce9bf47e1758a69ef98b5b79a7fd2e0c2dcb9 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Wed, 12 May 2021 07:39:28 +0000 Subject: [PATCH 3/3] Accepting request 892383 from home:alarrosa:branches:hardware OBS-URL: https://build.opensuse.org/request/show/892383 OBS-URL: https://build.opensuse.org/package/show/hardware/rtl8812au?expand=0&rev=34 --- ...rted-update_mgmt_frame_registrations.patch | 80 ++----------------- 1 file changed, 8 insertions(+), 72 deletions(-) diff --git a/fix-backported-update_mgmt_frame_registrations.patch b/fix-backported-update_mgmt_frame_registrations.patch index 020c76f..8e23d13 100644 --- a/fix-backported-update_mgmt_frame_registrations.patch +++ b/fix-backported-update_mgmt_frame_registrations.patch @@ -11,85 +11,21 @@ Index: rtl8812au-5.9.3.2+git20210427.6ef5d8f/os_dep/linux/ioctl_cfg80211.c =================================================================== --- rtl8812au-5.9.3.2+git20210427.6ef5d8f.orig/os_dep/linux/ioctl_cfg80211.c +++ rtl8812au-5.9.3.2+git20210427.6ef5d8f/os_dep/linux/ioctl_cfg80211.c -@@ -7902,61 +7902,6 @@ exit: +@@ -7902,7 +7902,7 @@ exit: return ret; } -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) --static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) -- struct wireless_dev *wdev, --#else -- struct net_device *ndev, --#endif -- u16 frame_type, bool reg) --{ --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) -- struct net_device *ndev = wdev_to_ndev(wdev); --#endif -- _adapter *adapter; -- struct rtw_wdev_priv *pwdev_priv; -- -- if (ndev == NULL) -- goto exit; -- -- adapter = (_adapter *)rtw_netdev_priv(ndev); -- pwdev_priv = adapter_wdev_data(adapter); -- --#ifdef CONFIG_DEBUG_CFG80211 -- RTW_INFO(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter), -- frame_type, reg); --#endif -- -- switch (frame_type) { -- case IEEE80211_STYPE_AUTH: /* 0x00B0 */ -- if (reg > 0) -- SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_AUTH); -- else -- CLR_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_AUTH); -- break; --#ifdef not_yet -- case IEEE80211_STYPE_PROBE_REQ: /* 0x0040 */ -- if (reg > 0) -- SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ); -- else -- CLR_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ); -- break; -- case IEEE80211_STYPE_ACTION: /* 0x00D0 */ -- if (reg > 0) -- SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_ACTION); -- else -- CLR_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_ACTION); -- break; --#endif -- default: -- break; -- } -- --exit: -- return; --} --#else - static void cfg80211_rtw_update_mgmt_frame_register( - struct wiphy *wiphy, ++#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)) struct wireless_dev *wdev, -@@ -7995,7 +7940,6 @@ static void cfg80211_rtw_update_mgmt_fra - exit: - return; - } --#endif - - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, -@@ -10394,11 +10338,7 @@ static struct cfg80211_ops rtw_cfg80211_ +@@ -10394,7 +10394,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)) -- .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, --#else ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18)) + .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, + #else .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_register, --#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif