From cf310f05e7ba20c69e2a6fbab3b9f6ab16ee0943 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:48:45 +0000 Subject: [PATCH 01/18] linux (Allwinner aarch64): update .config add RTL8192DU --- projects/Allwinner/linux/linux.aarch64.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/Allwinner/linux/linux.aarch64.conf b/projects/Allwinner/linux/linux.aarch64.conf index 0389651d1d..534f27727c 100644 --- a/projects/Allwinner/linux/linux.aarch64.conf +++ b/projects/Allwinner/linux/linux.aarch64.conf @@ -2244,6 +2244,11 @@ CONFIG_RTL8187=m CONFIG_RTL8187_LEDS=y CONFIG_RTL_CARDS=m # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192D_COMMON=m CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y CONFIG_RTW88=m From e9fe467e7425abcbb40404701a51b3e8eaa413d0 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:48:45 +0000 Subject: [PATCH 02/18] linux (Allwinner arm): update .config add RTL8192DU --- projects/Allwinner/linux/linux.arm.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/Allwinner/linux/linux.arm.conf b/projects/Allwinner/linux/linux.arm.conf index 049a27d015..ed22d3c7b8 100644 --- a/projects/Allwinner/linux/linux.arm.conf +++ b/projects/Allwinner/linux/linux.arm.conf @@ -2086,6 +2086,11 @@ CONFIG_RTL8187=m CONFIG_RTL8187_LEDS=y CONFIG_RTL_CARDS=m # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192D_COMMON=m CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y CONFIG_RTW88=m From 1c918ea82f922963c7094f18b2743240dba49b8f Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:48:45 +0000 Subject: [PATCH 03/18] linux (Generic): update .config add RTL8192DU --- projects/Generic/linux/linux.x86_64.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/Generic/linux/linux.x86_64.conf b/projects/Generic/linux/linux.x86_64.conf index 7ca62e6be3..96ff334907 100644 --- a/projects/Generic/linux/linux.x86_64.conf +++ b/projects/Generic/linux/linux.x86_64.conf @@ -2659,8 +2659,10 @@ CONFIG_RTL8188EE=m CONFIG_RTL8192EE=m CONFIG_RTL8821AE=m # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m CONFIG_RTLWIFI=m CONFIG_RTLWIFI_PCI=m +CONFIG_RTLWIFI_USB=m # CONFIG_RTLWIFI_DEBUG is not set CONFIG_RTL8192C_COMMON=m CONFIG_RTL8723_COMMON=m From 3c33cf6b0a343fbcd003bafcad2c74817887f66c Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:48:46 +0000 Subject: [PATCH 04/18] linux (NXP iMX6): update .config add RTL8192DU --- projects/NXP/devices/iMX6/linux/linux.arm.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/NXP/devices/iMX6/linux/linux.arm.conf b/projects/NXP/devices/iMX6/linux/linux.arm.conf index 3f5b5013d4..bc88ecec00 100644 --- a/projects/NXP/devices/iMX6/linux/linux.arm.conf +++ b/projects/NXP/devices/iMX6/linux/linux.arm.conf @@ -2439,6 +2439,11 @@ CONFIG_RTL_CARDS=m # CONFIG_RTL8192EE is not set # CONFIG_RTL8821AE is not set # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192D_COMMON=m # CONFIG_RTL8XXXU is not set CONFIG_RTW88=m CONFIG_RTW88_CORE=m From ef5d41c52abecc776080304e4f0ca3681b388665 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:48:46 +0000 Subject: [PATCH 05/18] linux (NXP iMX8): update .config add RTL8192DU --- projects/NXP/devices/iMX8/linux/linux.aarch64.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/NXP/devices/iMX8/linux/linux.aarch64.conf b/projects/NXP/devices/iMX8/linux/linux.aarch64.conf index d51cb554f8..b4f938a449 100644 --- a/projects/NXP/devices/iMX8/linux/linux.aarch64.conf +++ b/projects/NXP/devices/iMX8/linux/linux.aarch64.conf @@ -2241,6 +2241,11 @@ CONFIG_RTL8187=m CONFIG_RTL8187_LEDS=y CONFIG_RTL_CARDS=m # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192D_COMMON=m CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y CONFIG_RTW88=m From cb25a47627f58d0ab6656a97f4be162ffc66cf87 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:48:46 +0000 Subject: [PATCH 06/18] linux (Rockchip RK3288): update .config add RTL8192DU --- .../Rockchip/devices/RK3288/linux/default/linux.arm.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/Rockchip/devices/RK3288/linux/default/linux.arm.conf b/projects/Rockchip/devices/RK3288/linux/default/linux.arm.conf index a7edeb6df8..2d72041c59 100644 --- a/projects/Rockchip/devices/RK3288/linux/default/linux.arm.conf +++ b/projects/Rockchip/devices/RK3288/linux/default/linux.arm.conf @@ -2202,6 +2202,11 @@ CONFIG_RTL8187=m CONFIG_RTL8187_LEDS=y CONFIG_RTL_CARDS=m # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192D_COMMON=m CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y CONFIG_RTW88=m From 6bcb33254e1d656f2942251faabbe10ea339e1bc Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:48:46 +0000 Subject: [PATCH 07/18] linux (Rockchip RK3328): update .config add RTL8192DU --- .../Rockchip/devices/RK3328/linux/default/linux.aarch64.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/Rockchip/devices/RK3328/linux/default/linux.aarch64.conf b/projects/Rockchip/devices/RK3328/linux/default/linux.aarch64.conf index 122d32eb78..760c19d644 100644 --- a/projects/Rockchip/devices/RK3328/linux/default/linux.aarch64.conf +++ b/projects/Rockchip/devices/RK3328/linux/default/linux.aarch64.conf @@ -2229,6 +2229,11 @@ CONFIG_RTL8187=m CONFIG_RTL8187_LEDS=y CONFIG_RTL_CARDS=m # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192D_COMMON=m CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y CONFIG_RTW88=m From 878a43ade42548d0c499490d3761d3defd631b68 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:48:46 +0000 Subject: [PATCH 08/18] linux (Rockchip RK331010): update .config add RTL8192DU --- .../Rockchip/devices/RK3399/linux/default/linux.aarch64.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/Rockchip/devices/RK3399/linux/default/linux.aarch64.conf b/projects/Rockchip/devices/RK3399/linux/default/linux.aarch64.conf index d3a8067601..4f0aa5356b 100644 --- a/projects/Rockchip/devices/RK3399/linux/default/linux.aarch64.conf +++ b/projects/Rockchip/devices/RK3399/linux/default/linux.aarch64.conf @@ -2618,6 +2618,11 @@ CONFIG_RTL_CARDS=m # CONFIG_RTL8192EE is not set # CONFIG_RTL8821AE is not set # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192D_COMMON=m CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y CONFIG_RTW88=m From b8ee620891cad094550d0d0474c1a96ff8318160 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:48:46 +0000 Subject: [PATCH 09/18] linux (Samsung): update .config add RTL8192DU --- projects/Samsung/linux/linux.arm.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/Samsung/linux/linux.arm.conf b/projects/Samsung/linux/linux.arm.conf index aeb953a063..49f7ddfd24 100644 --- a/projects/Samsung/linux/linux.arm.conf +++ b/projects/Samsung/linux/linux.arm.conf @@ -1993,6 +1993,11 @@ CONFIG_RTL8187=m CONFIG_RTL8187_LEDS=y CONFIG_RTL_CARDS=m # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192D_COMMON=m CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y CONFIG_RTW88=m From 5f398eb02bfd80baf4739f251d754bcb742714a7 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:50:08 +0000 Subject: [PATCH 10/18] linux (RPi): update .config add RTL8192DU --- projects/RPi/devices/RPi/linux/linux.arm.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/RPi/devices/RPi/linux/linux.arm.conf b/projects/RPi/devices/RPi/linux/linux.arm.conf index 6ccd091fc6..dd88aa72ba 100644 --- a/projects/RPi/devices/RPi/linux/linux.arm.conf +++ b/projects/RPi/devices/RPi/linux/linux.arm.conf @@ -1737,6 +1737,11 @@ CONFIG_RTL8187=m CONFIG_RTL8187_LEDS=y CONFIG_RTL_CARDS=m # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192D_COMMON=m CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y CONFIG_RTW88=m From 801ea633844f477b1150a90bf749470be4ccdc20 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:50:23 +0000 Subject: [PATCH 11/18] linux (RPi2): update .config add RTL8192DU --- projects/RPi/devices/RPi2/linux/linux.arm.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/RPi/devices/RPi2/linux/linux.arm.conf b/projects/RPi/devices/RPi2/linux/linux.arm.conf index febef1abb3..17e569ac69 100644 --- a/projects/RPi/devices/RPi2/linux/linux.arm.conf +++ b/projects/RPi/devices/RPi2/linux/linux.arm.conf @@ -1965,6 +1965,11 @@ CONFIG_RTL8187=m CONFIG_RTL8187_LEDS=y CONFIG_RTL_CARDS=m # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192D_COMMON=m CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y CONFIG_RTW88=m From f6b6b9c039b1dec72119390d10510fa4b7d8a0f8 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:50:47 +0000 Subject: [PATCH 12/18] linux (RPi4): update .config add RTL8192DU --- projects/RPi/devices/RPi4/linux/linux.aarch64.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/RPi/devices/RPi4/linux/linux.aarch64.conf b/projects/RPi/devices/RPi4/linux/linux.aarch64.conf index 19a033292b..c0c581cec3 100644 --- a/projects/RPi/devices/RPi4/linux/linux.aarch64.conf +++ b/projects/RPi/devices/RPi4/linux/linux.aarch64.conf @@ -2503,6 +2503,11 @@ CONFIG_RTL_CARDS=m # CONFIG_RTL8192EE is not set # CONFIG_RTL8821AE is not set # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192D_COMMON=m CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y CONFIG_RTW88=m From a24176d3d56f21d5248ff2175931e69759c4d9ad Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:51:01 +0000 Subject: [PATCH 13/18] linux (RPi5): update .config add RTL8192DU --- projects/RPi/devices/RPi5/linux/linux.aarch64.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/RPi/devices/RPi5/linux/linux.aarch64.conf b/projects/RPi/devices/RPi5/linux/linux.aarch64.conf index 7e8410ba6c..f34273ac98 100644 --- a/projects/RPi/devices/RPi5/linux/linux.aarch64.conf +++ b/projects/RPi/devices/RPi5/linux/linux.aarch64.conf @@ -2512,6 +2512,11 @@ CONFIG_RTL_CARDS=m # CONFIG_RTL8192EE is not set # CONFIG_RTL8821AE is not set # CONFIG_RTL8192CU is not set +CONFIG_RTL8192DU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192D_COMMON=m CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y CONFIG_RTW88=m From a77242656db81fbe5f7ea4db9c3f611fe560737a Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 3 Jun 2024 09:00:41 +0000 Subject: [PATCH 14/18] distro: drop RTL8192DU as now in-kernel --- distributions/LibreELEC/options | 2 +- projects/Amlogic/options | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distributions/LibreELEC/options b/distributions/LibreELEC/options index 5a663f4f05..33002f49c9 100644 --- a/distributions/LibreELEC/options +++ b/distributions/LibreELEC/options @@ -64,7 +64,7 @@ # for a list of additional drivers see packages/linux-drivers # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2" - ADDITIONAL_DRIVERS="RTL8192DU RTL8812AU" + ADDITIONAL_DRIVERS="RTL8812AU" # Default size of system partition, in MB, eg. 512 SYSTEM_SIZE=512 diff --git a/projects/Amlogic/options b/projects/Amlogic/options index 0f0487f310..3cd89e6d95 100644 --- a/projects/Amlogic/options +++ b/projects/Amlogic/options @@ -64,7 +64,7 @@ # for a list of additional drivers see packages/linux-drivers # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS+=" DRIVER1 DRIVER2" - ADDITIONAL_DRIVERS="${ADDITIONAL_DRIVERS//RTL8192DU/}" + ADDITIONAL_DRIVERS+="" # build and install driver addons (yes / no) DRIVER_ADDONS_SUPPORT="no" From cbac65f16f6b6ca51ff7d192ae44a651fa0ce141 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 13:01:33 +0000 Subject: [PATCH 15/18] RTL8192DU: drop package --- packages/linux-drivers/RTL8192DU/package.mk | 29 ------------------- ...L8192DU-0001-remove_overlapping_pids.patch | 12 -------- .../patches/aarch64/RTL8192DU-0101-PR63.patch | 25 ---------------- 3 files changed, 66 deletions(-) delete mode 100644 packages/linux-drivers/RTL8192DU/package.mk delete mode 100644 packages/linux-drivers/RTL8192DU/patches/RTL8192DU-0001-remove_overlapping_pids.patch delete mode 100644 packages/linux-drivers/RTL8192DU/patches/aarch64/RTL8192DU-0101-PR63.patch diff --git a/packages/linux-drivers/RTL8192DU/package.mk b/packages/linux-drivers/RTL8192DU/package.mk deleted file mode 100644 index f8ca60d5a2..0000000000 --- a/packages/linux-drivers/RTL8192DU/package.mk +++ /dev/null @@ -1,29 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) -# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) - -PKG_NAME="RTL8192DU" -PKG_VERSION="b65f87820526cd8835c5cac19fd7e659c84e8215" -PKG_SHA256="05b387a9d06df98cf444954818eb81d0d145c42d23f706e95cabfa96052ddf03" -PKG_LICENSE="GPL" -PKG_SITE="https://github.com/lwfinger/rtl8192du" -PKG_URL="https://github.com/lwfinger/rtl8192du/archive/${PKG_VERSION}.tar.gz" -PKG_LONGDESC="Realtek RTL8192DU Linux driver" -PKG_IS_KERNEL_PKG="yes" - -pre_make_target() { - unset LDFLAGS -} - -make_target() { - make V=1 \ - ARCH=${TARGET_KERNEL_ARCH} \ - KSRC=$(kernel_path) \ - CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \ - CONFIG_POWER_SAVING=n -} - -makeinstall_target() { - mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} - cp *.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} -} diff --git a/packages/linux-drivers/RTL8192DU/patches/RTL8192DU-0001-remove_overlapping_pids.patch b/packages/linux-drivers/RTL8192DU/patches/RTL8192DU-0001-remove_overlapping_pids.patch deleted file mode 100644 index 97a7bf70d7..0000000000 --- a/packages/linux-drivers/RTL8192DU/patches/RTL8192DU-0001-remove_overlapping_pids.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur RTL8192DU-085e206/os_dep/usb_intf.c RTL8192DU-085e206.patch/os_dep/usb_intf.c ---- RTL8192DU-085e206/os_dep/usb_intf.c 2014-03-25 15:48:57.000000000 +0100 -+++ RTL8192DU-085e206.patch/os_dep/usb_intf.c 2014-04-11 09:23:12.097223906 +0200 -@@ -137,7 +137,7 @@ - {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8194)},/* 8192DU-VS */ \ - {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8111)},/* Realtek 5G dongle for WiFi Display */ \ - {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0193)},/* 8192DE-VAU */ \ -- {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8171)},/* 8192DU-VC */ \ -+/* {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8171)}, 8192DU-VC overlaps with in-kernel rtl8192se */ \ - /*=== Customer ID ===*/ \ - /****** 8192DU-VC ********/ \ - {USB_DEVICE(0x2019, 0xAB2C)},/* PCI - Abocm */ \ diff --git a/packages/linux-drivers/RTL8192DU/patches/aarch64/RTL8192DU-0101-PR63.patch b/packages/linux-drivers/RTL8192DU/patches/aarch64/RTL8192DU-0101-PR63.patch deleted file mode 100644 index 0cabd59f81..0000000000 --- a/packages/linux-drivers/RTL8192DU/patches/aarch64/RTL8192DU-0101-PR63.patch +++ /dev/null @@ -1,25 +0,0 @@ -From fb85a57a5cd6241cc8c066c5efc5b43781b0e42d Mon Sep 17 00:00:00 2001 -From: MilhouseVH -Date: Wed, 13 Jun 2018 06:43:10 +0100 -Subject: [PATCH] aarch64/4.4.y: implicit declaration of function - 'csum_ipv6_magic' - ---- - core/rtw_br_ext.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c -index da9c5e5..19af0fe 100644 ---- a/core/rtw_br_ext.c -+++ b/core/rtw_br_ext.c -@@ -51,6 +51,7 @@ - #include - #include - #include -+#include - #endif - #endif - --- -2.14.1 - From d8d60385cb6f1fa0319946d544488601cb6c0f2c Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 11:57:28 +0000 Subject: [PATCH 16/18] linux: move rtlwifi patches from Amlogic to shared for RTL8192DU --- .../0001-6.10-wifi-rtlwifi-rtl8192de-Fix-5-GHz-TX-pow.patch | 2 +- .../0002-6.10-wifi-rtlwifi-rtl8192de-Fix-low-speed-wi.patch | 2 +- .../0003-6.10-wifi-rtlwifi-rtl8192de-Fix-endianness-i.patch | 2 +- .../0004-6.10-wifi-rtlwifi-Move-code-from-rtl8192de-t.patch | 2 +- .../0005-6.10-wifi-rtlwifi-Clean-up-rtl8192d-common-a.patch | 2 +- .../0006-6.10-wifi-rtlwifi-Adjust-rtl8192d-common-for.patch | 2 +- .../0007-6.10-wifi-rtlwifi-Ignore-IEEE80211_CONF_CHAN.patch | 2 +- .../0001-6.11-wifi-rtlwifi-rtl8192d-Use-rtl92d-prefix.patch | 2 +- .../6.11/0002-6.11-wifi-rtlwifi-Add-rtl8192du-table.-c-h.patch | 2 +- .../0003-6.11-wifi-rtlwifi-Add-new-members-to-struct-.patch | 2 +- .../6.11/0004-6.11-wifi-rtlwifi-Add-rtl8192du-hw.-c-h.patch | 2 +- .../6.11/0005-6.11-wifi-rtlwifi-Add-rtl8192du-phy.-c-h.patch | 2 +- .../6.11/0006-6.11-wifi-rtlwifi-Add-rtl8192du-trx.-c-h.patch | 2 +- .../6.11/0007-6.11-wifi-rtlwifi-Add-rtl8192du-rf.-c-h.patch | 2 +- .../0008-6.11-wifi-rtlwifi-Add-rtl8192du-fw.-c-h-and-.patch | 2 +- .../6.11/0009-6.11-wifi-rtlwifi-Add-rtl8192du-dm.-c-h.patch | 2 +- .../0010-6.11-wifi-rtlwifi-Constify-rtl_hal_cfg.-ops-.patch | 2 +- .../6.11/0011-6.11-wifi-rtlwifi-Add-rtl8192du-sw.c.patch | 2 +- .../0012-6.11-wifi-rtlwifi-Enable-the-new-rtl8192du-d.patch | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0011-FROMGIT-6.10-wifi-rtlwifi-rtl8192de-Fix-5-GHz-TX-pow.patch => packages/linux/patches/rtlwifi/6.10/0001-6.10-wifi-rtlwifi-rtl8192de-Fix-5-GHz-TX-pow.patch (95%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0012-FROMGIT-6.10-wifi-rtlwifi-rtl8192de-Fix-low-speed-wi.patch => packages/linux/patches/rtlwifi/6.10/0002-6.10-wifi-rtlwifi-rtl8192de-Fix-low-speed-wi.patch (97%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0013-FROMGIT-6.10-wifi-rtlwifi-rtl8192de-Fix-endianness-i.patch => packages/linux/patches/rtlwifi/6.10/0003-6.10-wifi-rtlwifi-rtl8192de-Fix-endianness-i.patch (98%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0014-FROMGIT-6.10-wifi-rtlwifi-Move-code-from-rtl8192de-t.patch => packages/linux/patches/rtlwifi/6.10/0004-6.10-wifi-rtlwifi-Move-code-from-rtl8192de-t.patch (99%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0015-FROMGIT-6.10-wifi-rtlwifi-Clean-up-rtl8192d-common-a.patch => packages/linux/patches/rtlwifi/6.10/0005-6.10-wifi-rtlwifi-Clean-up-rtl8192d-common-a.patch (99%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0016-FROMGIT-6.10-wifi-rtlwifi-Adjust-rtl8192d-common-for.patch => packages/linux/patches/rtlwifi/6.10/0006-6.10-wifi-rtlwifi-Adjust-rtl8192d-common-for.patch (99%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0017-FROMGIT-6.10-wifi-rtlwifi-Ignore-IEEE80211_CONF_CHAN.patch => packages/linux/patches/rtlwifi/6.10/0007-6.10-wifi-rtlwifi-Ignore-IEEE80211_CONF_CHAN.patch (97%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0018-FROMGIT-6.11-wifi-rtlwifi-rtl8192d-Use-rtl92d-prefix.patch => packages/linux/patches/rtlwifi/6.11/0001-6.11-wifi-rtlwifi-rtl8192d-Use-rtl92d-prefix.patch (99%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0019-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-table.-c-h.patch => packages/linux/patches/rtlwifi/6.11/0002-6.11-wifi-rtlwifi-Add-rtl8192du-table.-c-h.patch (99%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0020-FROMGIT-6.11-wifi-rtlwifi-Add-new-members-to-struct-.patch => packages/linux/patches/rtlwifi/6.11/0003-6.11-wifi-rtlwifi-Add-new-members-to-struct-.patch (94%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0021-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-hw.-c-h.patch => packages/linux/patches/rtlwifi/6.11/0004-6.11-wifi-rtlwifi-Add-rtl8192du-hw.-c-h.patch (99%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0022-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-phy.-c-h.patch => packages/linux/patches/rtlwifi/6.11/0005-6.11-wifi-rtlwifi-Add-rtl8192du-phy.-c-h.patch (99%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0023-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-trx.-c-h.patch => packages/linux/patches/rtlwifi/6.11/0006-6.11-wifi-rtlwifi-Add-rtl8192du-trx.-c-h.patch (99%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0024-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-rf.-c-h.patch => packages/linux/patches/rtlwifi/6.11/0007-6.11-wifi-rtlwifi-Add-rtl8192du-rf.-c-h.patch (99%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0025-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-fw.-c-h-and-.patch => packages/linux/patches/rtlwifi/6.11/0008-6.11-wifi-rtlwifi-Add-rtl8192du-fw.-c-h-and-.patch (98%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0026-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-dm.-c-h.patch => packages/linux/patches/rtlwifi/6.11/0009-6.11-wifi-rtlwifi-Add-rtl8192du-dm.-c-h.patch (98%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0027-FROMGIT-6.11-wifi-rtlwifi-Constify-rtl_hal_cfg.-ops-.patch => packages/linux/patches/rtlwifi/6.11/0010-6.11-wifi-rtlwifi-Constify-rtl_hal_cfg.-ops-.patch (98%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0028-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-sw.c.patch => packages/linux/patches/rtlwifi/6.11/0011-6.11-wifi-rtlwifi-Add-rtl8192du-sw.c.patch (99%) rename projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0029-FROMGIT-6.11-wifi-rtlwifi-Enable-the-new-rtl8192du-d.patch => packages/linux/patches/rtlwifi/6.11/0012-6.11-wifi-rtlwifi-Enable-the-new-rtl8192du-d.patch (97%) diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0011-FROMGIT-6.10-wifi-rtlwifi-rtl8192de-Fix-5-GHz-TX-pow.patch b/packages/linux/patches/rtlwifi/6.10/0001-6.10-wifi-rtlwifi-rtl8192de-Fix-5-GHz-TX-pow.patch similarity index 95% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0011-FROMGIT-6.10-wifi-rtlwifi-rtl8192de-Fix-5-GHz-TX-pow.patch rename to packages/linux/patches/rtlwifi/6.10/0001-6.10-wifi-rtlwifi-rtl8192de-Fix-5-GHz-TX-pow.patch index 3bbb5e5b58..fb340b4b27 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0011-FROMGIT-6.10-wifi-rtlwifi-rtl8192de-Fix-5-GHz-TX-pow.patch +++ b/packages/linux/patches/rtlwifi/6.10/0001-6.10-wifi-rtlwifi-rtl8192de-Fix-5-GHz-TX-pow.patch @@ -1,7 +1,7 @@ From b51a3b582d9626e5b896141c9b9edbf0d49d147d Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 25 Apr 2024 21:09:21 +0300 -Subject: [PATCH 11/69] FROMGIT(6.10): wifi: rtlwifi: rtl8192de: Fix 5 GHz TX +Subject: [PATCH 01/07] 6.10: wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power Different channels have different TX power settings. rtl8192de is using diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0012-FROMGIT-6.10-wifi-rtlwifi-rtl8192de-Fix-low-speed-wi.patch b/packages/linux/patches/rtlwifi/6.10/0002-6.10-wifi-rtlwifi-rtl8192de-Fix-low-speed-wi.patch similarity index 97% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0012-FROMGIT-6.10-wifi-rtlwifi-rtl8192de-Fix-low-speed-wi.patch rename to packages/linux/patches/rtlwifi/6.10/0002-6.10-wifi-rtlwifi-rtl8192de-Fix-low-speed-wi.patch index 1b9a997c43..ae51d55cf6 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0012-FROMGIT-6.10-wifi-rtlwifi-rtl8192de-Fix-low-speed-wi.patch +++ b/packages/linux/patches/rtlwifi/6.10/0002-6.10-wifi-rtlwifi-rtl8192de-Fix-low-speed-wi.patch @@ -1,7 +1,7 @@ From 93f781bf3955bd65a73ad8878c6f76439cdd4aaf Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 25 Apr 2024 21:12:38 +0300 -Subject: [PATCH 12/69] FROMGIT(6.10): wifi: rtlwifi: rtl8192de: Fix low speed +Subject: [PATCH 02/07] 6.10: wifi: rtlwifi: rtl8192de: Fix low speed with WPA3-SAE Some (all?) management frames are incorrectly reported to mac80211 as diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0013-FROMGIT-6.10-wifi-rtlwifi-rtl8192de-Fix-endianness-i.patch b/packages/linux/patches/rtlwifi/6.10/0003-6.10-wifi-rtlwifi-rtl8192de-Fix-endianness-i.patch similarity index 98% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0013-FROMGIT-6.10-wifi-rtlwifi-rtl8192de-Fix-endianness-i.patch rename to packages/linux/patches/rtlwifi/6.10/0003-6.10-wifi-rtlwifi-rtl8192de-Fix-endianness-i.patch index 5194a48e79..90bde902d5 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0013-FROMGIT-6.10-wifi-rtlwifi-rtl8192de-Fix-endianness-i.patch +++ b/packages/linux/patches/rtlwifi/6.10/0003-6.10-wifi-rtlwifi-rtl8192de-Fix-endianness-i.patch @@ -1,7 +1,7 @@ From 91b01523927c0e78c0c53c0c8347ee9d194d34f0 Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 25 Apr 2024 21:13:12 +0300 -Subject: [PATCH 13/69] FROMGIT(6.10): wifi: rtlwifi: rtl8192de: Fix endianness +Subject: [PATCH 03/07] 6.10: wifi: rtlwifi: rtl8192de: Fix endianness issue in RX path Structs rx_desc_92d and rx_fwinfo_92d will not work for big endian diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0014-FROMGIT-6.10-wifi-rtlwifi-Move-code-from-rtl8192de-t.patch b/packages/linux/patches/rtlwifi/6.10/0004-6.10-wifi-rtlwifi-Move-code-from-rtl8192de-t.patch similarity index 99% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0014-FROMGIT-6.10-wifi-rtlwifi-Move-code-from-rtl8192de-t.patch rename to packages/linux/patches/rtlwifi/6.10/0004-6.10-wifi-rtlwifi-Move-code-from-rtl8192de-t.patch index 2712aa8b85..db97f4d1a4 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0014-FROMGIT-6.10-wifi-rtlwifi-Move-code-from-rtl8192de-t.patch +++ b/packages/linux/patches/rtlwifi/6.10/0004-6.10-wifi-rtlwifi-Move-code-from-rtl8192de-t.patch @@ -1,7 +1,7 @@ From eb9c40199ae9ae29f43705a11b7a0dba79dcfb8b Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 25 Apr 2024 21:14:04 +0300 -Subject: [PATCH 14/69] FROMGIT(6.10): wifi: rtlwifi: Move code from rtl8192de +Subject: [PATCH 04/07] 6.10: wifi: rtlwifi: Move code from rtl8192de to rtl8192d-common Create the new module rtl8192d-common and move some code into it from diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0015-FROMGIT-6.10-wifi-rtlwifi-Clean-up-rtl8192d-common-a.patch b/packages/linux/patches/rtlwifi/6.10/0005-6.10-wifi-rtlwifi-Clean-up-rtl8192d-common-a.patch similarity index 99% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0015-FROMGIT-6.10-wifi-rtlwifi-Clean-up-rtl8192d-common-a.patch rename to packages/linux/patches/rtlwifi/6.10/0005-6.10-wifi-rtlwifi-Clean-up-rtl8192d-common-a.patch index 779ae4bfee..533ccb5879 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0015-FROMGIT-6.10-wifi-rtlwifi-Clean-up-rtl8192d-common-a.patch +++ b/packages/linux/patches/rtlwifi/6.10/0005-6.10-wifi-rtlwifi-Clean-up-rtl8192d-common-a.patch @@ -1,7 +1,7 @@ From 01596bb6b5fa383bd37590981b6cf660ad5d51f4 Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 25 Apr 2024 21:14:35 +0300 -Subject: [PATCH 15/69] FROMGIT(6.10): wifi: rtlwifi: Clean up rtl8192d-common +Subject: [PATCH 05/07] 6.10: wifi: rtlwifi: Clean up rtl8192d-common a bit Improve readability: diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0016-FROMGIT-6.10-wifi-rtlwifi-Adjust-rtl8192d-common-for.patch b/packages/linux/patches/rtlwifi/6.10/0006-6.10-wifi-rtlwifi-Adjust-rtl8192d-common-for.patch similarity index 99% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0016-FROMGIT-6.10-wifi-rtlwifi-Adjust-rtl8192d-common-for.patch rename to packages/linux/patches/rtlwifi/6.10/0006-6.10-wifi-rtlwifi-Adjust-rtl8192d-common-for.patch index 3f9561fed8..8e7d431c8f 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0016-FROMGIT-6.10-wifi-rtlwifi-Adjust-rtl8192d-common-for.patch +++ b/packages/linux/patches/rtlwifi/6.10/0006-6.10-wifi-rtlwifi-Adjust-rtl8192d-common-for.patch @@ -1,7 +1,7 @@ From 7335e62025a7cfe186aab54609b23c4f24d838e0 Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 25 Apr 2024 21:15:20 +0300 -Subject: [PATCH 16/69] FROMGIT(6.10): wifi: rtlwifi: Adjust rtl8192d-common +Subject: [PATCH 06/07] 6.10: wifi: rtlwifi: Adjust rtl8192d-common for USB A few of the shared functions need small changes for the USB driver: diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0017-FROMGIT-6.10-wifi-rtlwifi-Ignore-IEEE80211_CONF_CHAN.patch b/packages/linux/patches/rtlwifi/6.10/0007-6.10-wifi-rtlwifi-Ignore-IEEE80211_CONF_CHAN.patch similarity index 97% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0017-FROMGIT-6.10-wifi-rtlwifi-Ignore-IEEE80211_CONF_CHAN.patch rename to packages/linux/patches/rtlwifi/6.10/0007-6.10-wifi-rtlwifi-Ignore-IEEE80211_CONF_CHAN.patch index 6bf0f71a6a..2d3e89a7cc 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0017-FROMGIT-6.10-wifi-rtlwifi-Ignore-IEEE80211_CONF_CHAN.patch +++ b/packages/linux/patches/rtlwifi/6.10/0007-6.10-wifi-rtlwifi-Ignore-IEEE80211_CONF_CHAN.patch @@ -1,7 +1,7 @@ From d34a7e456b723f5b5b11834abd39f46352d2b776 Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Wed, 29 May 2024 20:19:47 +0300 -Subject: [PATCH 17/69] FROMGIT(6.10): wifi: rtlwifi: Ignore +Subject: [PATCH 07/07] 6.10: wifi: rtlwifi: Ignore IEEE80211_CONF_CHANGE_RETRY_LIMITS Since commit 0a44dfc07074 ("wifi: mac80211: simplify non-chanctx diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0018-FROMGIT-6.11-wifi-rtlwifi-rtl8192d-Use-rtl92d-prefix.patch b/packages/linux/patches/rtlwifi/6.11/0001-6.11-wifi-rtlwifi-rtl8192d-Use-rtl92d-prefix.patch similarity index 99% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0018-FROMGIT-6.11-wifi-rtlwifi-rtl8192d-Use-rtl92d-prefix.patch rename to packages/linux/patches/rtlwifi/6.11/0001-6.11-wifi-rtlwifi-rtl8192d-Use-rtl92d-prefix.patch index a4b6a3aade..61b4429d20 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0018-FROMGIT-6.11-wifi-rtlwifi-rtl8192d-Use-rtl92d-prefix.patch +++ b/packages/linux/patches/rtlwifi/6.11/0001-6.11-wifi-rtlwifi-rtl8192d-Use-rtl92d-prefix.patch @@ -1,7 +1,7 @@ From dec5fc45e4b69ac5c4c628fa9e482199d6e5ad71 Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 23 May 2024 17:43:37 +0300 -Subject: [PATCH 18/69] FROMGIT(6.11): wifi: rtlwifi: rtl8192d: Use "rtl92d" +Subject: [PATCH 01/12] 6.11: wifi: rtlwifi: rtl8192d: Use "rtl92d" prefix Some functions moved from rtl8192de still use the "rtl92de" prefix. diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0019-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-table.-c-h.patch b/packages/linux/patches/rtlwifi/6.11/0002-6.11-wifi-rtlwifi-Add-rtl8192du-table.-c-h.patch similarity index 99% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0019-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-table.-c-h.patch rename to packages/linux/patches/rtlwifi/6.11/0002-6.11-wifi-rtlwifi-Add-rtl8192du-table.-c-h.patch index e673c551a2..b3eb25fbae 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0019-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-table.-c-h.patch +++ b/packages/linux/patches/rtlwifi/6.11/0002-6.11-wifi-rtlwifi-Add-rtl8192du-table.-c-h.patch @@ -1,7 +1,7 @@ From 76b9d3316e2d5db38de05e1ad8fe3c6acaabf21a Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 23 May 2024 17:44:09 +0300 -Subject: [PATCH 19/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/table.{c,h} +Subject: [PATCH 02/12] 6.11: wifi: rtlwifi: Add rtl8192du/table.{c,h} These contain the MAC, BB, RF, and AGC initialisation tables for RTL8192DU. diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0020-FROMGIT-6.11-wifi-rtlwifi-Add-new-members-to-struct-.patch b/packages/linux/patches/rtlwifi/6.11/0003-6.11-wifi-rtlwifi-Add-new-members-to-struct-.patch similarity index 94% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0020-FROMGIT-6.11-wifi-rtlwifi-Add-new-members-to-struct-.patch rename to packages/linux/patches/rtlwifi/6.11/0003-6.11-wifi-rtlwifi-Add-new-members-to-struct-.patch index 3f8ca00177..e54b44831f 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0020-FROMGIT-6.11-wifi-rtlwifi-Add-new-members-to-struct-.patch +++ b/packages/linux/patches/rtlwifi/6.11/0003-6.11-wifi-rtlwifi-Add-new-members-to-struct-.patch @@ -1,7 +1,7 @@ From 34ddbe7398b1e23d78192999dcc88a7f57bcaae5 Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 23 May 2024 17:44:39 +0300 -Subject: [PATCH 20/69] FROMGIT(6.11): wifi: rtlwifi: Add new members to struct +Subject: [PATCH 03/12] 6.11: wifi: rtlwifi: Add new members to struct rtl_priv for RTL8192DU These are needed for the dual MAC version of RTL8192DU. diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0021-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-hw.-c-h.patch b/packages/linux/patches/rtlwifi/6.11/0004-6.11-wifi-rtlwifi-Add-rtl8192du-hw.-c-h.patch similarity index 99% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0021-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-hw.-c-h.patch rename to packages/linux/patches/rtlwifi/6.11/0004-6.11-wifi-rtlwifi-Add-rtl8192du-hw.-c-h.patch index ede573a835..c517f267eb 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0021-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-hw.-c-h.patch +++ b/packages/linux/patches/rtlwifi/6.11/0004-6.11-wifi-rtlwifi-Add-rtl8192du-hw.-c-h.patch @@ -1,7 +1,7 @@ From 37626e4f236435875f40fd3e8a463aac1cd47c8b Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 23 May 2024 17:45:31 +0300 -Subject: [PATCH 21/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/hw.{c,h} +Subject: [PATCH 04/12] 6.11: wifi: rtlwifi: Add rtl8192du/hw.{c,h} These contain mostly hardware init/deinit routines for RTL8192DU. diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0022-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-phy.-c-h.patch b/packages/linux/patches/rtlwifi/6.11/0005-6.11-wifi-rtlwifi-Add-rtl8192du-phy.-c-h.patch similarity index 99% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0022-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-phy.-c-h.patch rename to packages/linux/patches/rtlwifi/6.11/0005-6.11-wifi-rtlwifi-Add-rtl8192du-phy.-c-h.patch index ddbc3925c5..9679b288fc 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0022-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-phy.-c-h.patch +++ b/packages/linux/patches/rtlwifi/6.11/0005-6.11-wifi-rtlwifi-Add-rtl8192du-phy.-c-h.patch @@ -1,7 +1,7 @@ From 40249d26740fceb059f121dde0922de1f9ec209a Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 23 May 2024 17:46:02 +0300 -Subject: [PATCH 22/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/phy.{c,h} +Subject: [PATCH 05/12] 6.11: wifi: rtlwifi: Add rtl8192du/phy.{c,h} These contain mostly the calibration and channel switching routines for RTL8192DU. diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0023-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-trx.-c-h.patch b/packages/linux/patches/rtlwifi/6.11/0006-6.11-wifi-rtlwifi-Add-rtl8192du-trx.-c-h.patch similarity index 99% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0023-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-trx.-c-h.patch rename to packages/linux/patches/rtlwifi/6.11/0006-6.11-wifi-rtlwifi-Add-rtl8192du-trx.-c-h.patch index 3274cf29dd..338addb7cb 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0023-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-trx.-c-h.patch +++ b/packages/linux/patches/rtlwifi/6.11/0006-6.11-wifi-rtlwifi-Add-rtl8192du-trx.-c-h.patch @@ -1,7 +1,7 @@ From 8125d619567b9a3620244251b8eab25074cafcfa Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 23 May 2024 17:46:26 +0300 -Subject: [PATCH 23/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/trx.{c,h} +Subject: [PATCH 06/12] 6.11: wifi: rtlwifi: Add rtl8192du/trx.{c,h} These contain routines related to sending frames to the chip. diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0024-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-rf.-c-h.patch b/packages/linux/patches/rtlwifi/6.11/0007-6.11-wifi-rtlwifi-Add-rtl8192du-rf.-c-h.patch similarity index 99% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0024-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-rf.-c-h.patch rename to packages/linux/patches/rtlwifi/6.11/0007-6.11-wifi-rtlwifi-Add-rtl8192du-rf.-c-h.patch index e5b6473523..675e4b883b 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0024-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-rf.-c-h.patch +++ b/packages/linux/patches/rtlwifi/6.11/0007-6.11-wifi-rtlwifi-Add-rtl8192du-rf.-c-h.patch @@ -1,7 +1,7 @@ From f42c4cb0031563e684a66ea2e21072387d9fcc7f Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 23 May 2024 17:46:51 +0300 -Subject: [PATCH 24/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/rf.{c,h} +Subject: [PATCH 07/12] 6.11: wifi: rtlwifi: Add rtl8192du/rf.{c,h} These contain one RF configuration function and some functions related to dual MAC operation. diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0025-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-fw.-c-h-and-.patch b/packages/linux/patches/rtlwifi/6.11/0008-6.11-wifi-rtlwifi-Add-rtl8192du-fw.-c-h-and-.patch similarity index 98% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0025-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-fw.-c-h-and-.patch rename to packages/linux/patches/rtlwifi/6.11/0008-6.11-wifi-rtlwifi-Add-rtl8192du-fw.-c-h-and-.patch index 951ad60703..2e767d66b4 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0025-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-fw.-c-h-and-.patch +++ b/packages/linux/patches/rtlwifi/6.11/0008-6.11-wifi-rtlwifi-Add-rtl8192du-fw.-c-h-and-.patch @@ -1,7 +1,7 @@ From 07d8e12d4523008675013f91d46a8a8d133a41c2 Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 23 May 2024 17:47:19 +0300 -Subject: [PATCH 25/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/fw.{c,h} +Subject: [PATCH 08/12] 6.11: wifi: rtlwifi: Add rtl8192du/fw.{c,h} and rtl8192du/led.{c,h} fw.c contains a function for loading the firmware. diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0026-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-dm.-c-h.patch b/packages/linux/patches/rtlwifi/6.11/0009-6.11-wifi-rtlwifi-Add-rtl8192du-dm.-c-h.patch similarity index 98% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0026-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-dm.-c-h.patch rename to packages/linux/patches/rtlwifi/6.11/0009-6.11-wifi-rtlwifi-Add-rtl8192du-dm.-c-h.patch index a5317f7002..e50395d93b 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0026-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-dm.-c-h.patch +++ b/packages/linux/patches/rtlwifi/6.11/0009-6.11-wifi-rtlwifi-Add-rtl8192du-dm.-c-h.patch @@ -1,7 +1,7 @@ From e4592b803eb8ff3eda15c030906cc33226cc794e Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 23 May 2024 17:47:40 +0300 -Subject: [PATCH 26/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/dm.{c,h} +Subject: [PATCH 09/12] 6.11: wifi: rtlwifi: Add rtl8192du/dm.{c,h} These contain functions related to the dynamic mechanism, which runs every two seconds to adjust to changes in the environment. diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0027-FROMGIT-6.11-wifi-rtlwifi-Constify-rtl_hal_cfg.-ops-.patch b/packages/linux/patches/rtlwifi/6.11/0010-6.11-wifi-rtlwifi-Constify-rtl_hal_cfg.-ops-.patch similarity index 98% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0027-FROMGIT-6.11-wifi-rtlwifi-Constify-rtl_hal_cfg.-ops-.patch rename to packages/linux/patches/rtlwifi/6.11/0010-6.11-wifi-rtlwifi-Constify-rtl_hal_cfg.-ops-.patch index 1bc1efe00a..714abd1376 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0027-FROMGIT-6.11-wifi-rtlwifi-Constify-rtl_hal_cfg.-ops-.patch +++ b/packages/linux/patches/rtlwifi/6.11/0010-6.11-wifi-rtlwifi-Constify-rtl_hal_cfg.-ops-.patch @@ -1,7 +1,7 @@ From c791ad6e48ba58f4473b899ba7bf2de1d1536d17 Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 23 May 2024 17:48:02 +0300 -Subject: [PATCH 27/69] FROMGIT(6.11): wifi: rtlwifi: Constify +Subject: [PATCH 10/12] 6.11: wifi: rtlwifi: Constify rtl_hal_cfg.{ops,usb_interface_cfg} and rtl_priv.cfg This allows the drivers to declare the structs rtl_hal_cfg, rtl_hal_ops, diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0028-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-sw.c.patch b/packages/linux/patches/rtlwifi/6.11/0011-6.11-wifi-rtlwifi-Add-rtl8192du-sw.c.patch similarity index 99% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0028-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-sw.c.patch rename to packages/linux/patches/rtlwifi/6.11/0011-6.11-wifi-rtlwifi-Add-rtl8192du-sw.c.patch index 963d691ae7..1b009ca93a 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0028-FROMGIT-6.11-wifi-rtlwifi-Add-rtl8192du-sw.c.patch +++ b/packages/linux/patches/rtlwifi/6.11/0011-6.11-wifi-rtlwifi-Add-rtl8192du-sw.c.patch @@ -1,7 +1,7 @@ From 11fc9ecc1d73fd506a3bd359bf3f8b9a94ca59df Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 23 May 2024 17:48:32 +0300 -Subject: [PATCH 28/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/sw.c +Subject: [PATCH 11/12] 6.11: wifi: rtlwifi: Add rtl8192du/sw.c This contains the new module's entry point. diff --git a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0029-FROMGIT-6.11-wifi-rtlwifi-Enable-the-new-rtl8192du-d.patch b/packages/linux/patches/rtlwifi/6.11/0012-6.11-wifi-rtlwifi-Enable-the-new-rtl8192du-d.patch similarity index 97% rename from projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0029-FROMGIT-6.11-wifi-rtlwifi-Enable-the-new-rtl8192du-d.patch rename to packages/linux/patches/rtlwifi/6.11/0012-6.11-wifi-rtlwifi-Enable-the-new-rtl8192du-d.patch index c263902e66..5af2cc7c72 100644 --- a/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0029-FROMGIT-6.11-wifi-rtlwifi-Enable-the-new-rtl8192du-d.patch +++ b/packages/linux/patches/rtlwifi/6.11/0012-6.11-wifi-rtlwifi-Enable-the-new-rtl8192du-d.patch @@ -1,7 +1,7 @@ From da2287b41888e02866f1416caa36c148c5723f8b Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Thu, 23 May 2024 17:49:00 +0300 -Subject: [PATCH 29/69] FROMGIT(6.11): wifi: rtlwifi: Enable the new rtl8192du +Subject: [PATCH 12/12] 6.11: wifi: rtlwifi: Enable the new rtl8192du driver The RTL8192DU is an older Wifi 4 dual band chip. It comes in two From 9d6ba74438e210dd2c3ca667425d40aababafdfb Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:34:11 +0000 Subject: [PATCH 17/18] linux (RPi): backport rtlwifi patches to support new RTL8192DU inkernel driver --- ...anup-few-rtlxxxx_set_hw_reg-routines.patch | 142 ++++++ ...ove-unreachable-code-in-rtl92d_dm_ch.patch | 62 +++ ...i-simplify-TX-command-fill-callbacks.patch | 413 ++++++++++++++++++ ...tlwifi-drop-unused-const_amdpci_aspm.patch | 182 ++++++++ ...8192de-Don-t-read-register-in-_rtl92.patch | 50 +++ ...-Remove-rtl_intf_ops.read_efuse_byte.patch | 66 +++ ...rtl_usb-Store-the-endpoint-addresses.patch | 259 +++++++++++ 7 files changed, 1174 insertions(+) create mode 100644 packages/linux/patches/rtlwifi/6.9/0001-wifi-rtlwifi-cleanup-few-rtlxxxx_set_hw_reg-routines.patch create mode 100644 packages/linux/patches/rtlwifi/6.9/0002-wifi-rtlwifi-remove-unreachable-code-in-rtl92d_dm_ch.patch create mode 100644 packages/linux/patches/rtlwifi/6.9/0003-wifi-rtlwifi-simplify-TX-command-fill-callbacks.patch create mode 100644 packages/linux/patches/rtlwifi/6.9/0004-wifi-rtlwifi-drop-unused-const_amdpci_aspm.patch create mode 100644 packages/linux/patches/rtlwifi/6.9/0005-wifi-rtlwifi-rtl8192de-Don-t-read-register-in-_rtl92.patch create mode 100644 packages/linux/patches/rtlwifi/6.9/0006-wifi-rtlwifi-Remove-rtl_intf_ops.read_efuse_byte.patch create mode 100644 packages/linux/patches/rtlwifi/6.9/0007-wifi-rtlwifi-rtl_usb-Store-the-endpoint-addresses.patch diff --git a/packages/linux/patches/rtlwifi/6.9/0001-wifi-rtlwifi-cleanup-few-rtlxxxx_set_hw_reg-routines.patch b/packages/linux/patches/rtlwifi/6.9/0001-wifi-rtlwifi-cleanup-few-rtlxxxx_set_hw_reg-routines.patch new file mode 100644 index 0000000000..b445f0299b --- /dev/null +++ b/packages/linux/patches/rtlwifi/6.9/0001-wifi-rtlwifi-cleanup-few-rtlxxxx_set_hw_reg-routines.patch @@ -0,0 +1,142 @@ +From 624934a7cfabca7dea2b2c1d10b029c1ff4c1f3f Mon Sep 17 00:00:00 2001 +From: Dmitry Antipov +Date: Mon, 25 Sep 2023 12:04:48 +0300 +Subject: [PATCH 1/7] wifi: rtlwifi: cleanup few rtlxxxx_set_hw_reg() routines + +Since 'u8' comparison against zero is always false, drop the +corresponding branches of AMPDU_MIN_SPACE adjustment within +'rtlxxxx_set_hw_reg()' for rtl8188ee, rtl8192ce, rtl8192de, +rtl8723ae, rtl8723be, and rtl8821ae. Compile tested only. + +Found by Linux Verification Center (linuxtesting.org) with SVACE. + +Signed-off-by: Dmitry Antipov +Acked-by: Ping-Ke Shih +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20230925090452.25633-1-dmantipov@yandex.ru +--- + drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 5 ----- + drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 5 ----- + drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 4 ---- + drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 5 ----- + drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 6 ------ + drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 5 ----- + 6 files changed, 30 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c +index 58b1a46066b5..27f6c35ba0f9 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c +@@ -433,14 +433,9 @@ void rtl88ee_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) + break; + case HW_VAR_AMPDU_MIN_SPACE:{ + u8 min_spacing_to_set; +- u8 sec_min_space; + + min_spacing_to_set = *val; + if (min_spacing_to_set <= 7) { +- sec_min_space = 0; +- +- if (min_spacing_to_set < sec_min_space) +- min_spacing_to_set = sec_min_space; + + mac->min_space_cfg = ((mac->min_space_cfg & + 0xf8) | +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c +index 049c4fe9eeed..0bc915723b93 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c +@@ -208,14 +208,9 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) + } + case HW_VAR_AMPDU_MIN_SPACE:{ + u8 min_spacing_to_set; +- u8 sec_min_space; + + min_spacing_to_set = *val; + if (min_spacing_to_set <= 7) { +- sec_min_space = 0; +- +- if (min_spacing_to_set < sec_min_space) +- min_spacing_to_set = sec_min_space; + + mac->min_space_cfg = ((mac->min_space_cfg & + 0xf8) | +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c +index 31a18bbface9..743ac6871bf4 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c +@@ -225,13 +225,9 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) + } + case HW_VAR_AMPDU_MIN_SPACE: { + u8 min_spacing_to_set; +- u8 sec_min_space; + + min_spacing_to_set = *val; + if (min_spacing_to_set <= 7) { +- sec_min_space = 0; +- if (min_spacing_to_set < sec_min_space) +- min_spacing_to_set = sec_min_space; + mac->min_space_cfg = ((mac->min_space_cfg & 0xf8) | + min_spacing_to_set); + *val = min_spacing_to_set; +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c +index d26d4c4314a3..6991713a66d0 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c +@@ -212,14 +212,9 @@ void rtl8723e_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) + } + case HW_VAR_AMPDU_MIN_SPACE:{ + u8 min_spacing_to_set; +- u8 sec_min_space; + + min_spacing_to_set = *((u8 *)val); + if (min_spacing_to_set <= 7) { +- sec_min_space = 0; +- +- if (min_spacing_to_set < sec_min_space) +- min_spacing_to_set = sec_min_space; + + mac->min_space_cfg = ((mac->min_space_cfg & + 0xf8) | +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c +index 15575644551f..0e77de1baaf8 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c +@@ -468,15 +468,9 @@ void rtl8723be_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) + break; + case HW_VAR_AMPDU_MIN_SPACE:{ + u8 min_spacing_to_set; +- u8 sec_min_space; + + min_spacing_to_set = *((u8 *)val); + if (min_spacing_to_set <= 7) { +- sec_min_space = 0; +- +- if (min_spacing_to_set < sec_min_space) +- min_spacing_to_set = sec_min_space; +- + mac->min_space_cfg = ((mac->min_space_cfg & 0xf8) | + min_spacing_to_set); + +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c +index 3f8f6da33b12..1633328bc3d1 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c +@@ -546,14 +546,9 @@ void rtl8821ae_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) + break; + case HW_VAR_AMPDU_MIN_SPACE:{ + u8 min_spacing_to_set; +- u8 sec_min_space; + + min_spacing_to_set = *((u8 *)val); + if (min_spacing_to_set <= 7) { +- sec_min_space = 0; +- +- if (min_spacing_to_set < sec_min_space) +- min_spacing_to_set = sec_min_space; + + mac->min_space_cfg = ((mac->min_space_cfg & + 0xf8) | +-- +2.43.0 + diff --git a/packages/linux/patches/rtlwifi/6.9/0002-wifi-rtlwifi-remove-unreachable-code-in-rtl92d_dm_ch.patch b/packages/linux/patches/rtlwifi/6.9/0002-wifi-rtlwifi-remove-unreachable-code-in-rtl92d_dm_ch.patch new file mode 100644 index 0000000000..c552f1ff58 --- /dev/null +++ b/packages/linux/patches/rtlwifi/6.9/0002-wifi-rtlwifi-remove-unreachable-code-in-rtl92d_dm_ch.patch @@ -0,0 +1,62 @@ +From 583494febbdd6a76b6c2a3fad704082f4f9f4d75 Mon Sep 17 00:00:00 2001 +From: Dmitry Antipov +Date: Tue, 3 Oct 2023 07:33:16 +0300 +Subject: [PATCH 2/7] wifi: rtlwifi: remove unreachable code in + rtl92d_dm_check_edca_turbo() + +Since '!(0x5ea42b & 0xffff0000)' is always false, remove unreachable +block in 'rtl92d_dm_check_edca_turbo()' and convert EDCA limits to +constant variables. Compile tested only. + +Found by Linux Verification Center (linuxtesting.org) with SVACE. + +Signed-off-by: Dmitry Antipov +Acked-by: Ping-Ke Shih +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20231003043318.11370-1-dmantipov@yandex.ru +--- + .../wireless/realtek/rtlwifi/rtl8192de/dm.c | 18 ++---------------- + 1 file changed, 2 insertions(+), 16 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c +index 6cc9c7649eda..cf4aca83bd05 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c +@@ -592,32 +592,18 @@ static void rtl92d_dm_check_edca_turbo(struct ieee80211_hw *hw) + { + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); ++ const u32 edca_be_ul = 0x5ea42b; ++ const u32 edca_be_dl = 0x5ea42b; + static u64 last_txok_cnt; + static u64 last_rxok_cnt; + u64 cur_txok_cnt; + u64 cur_rxok_cnt; +- u32 edca_be_ul = 0x5ea42b; +- u32 edca_be_dl = 0x5ea42b; + + if (mac->link_state != MAC80211_LINKED) { + rtlpriv->dm.current_turbo_edca = false; + goto exit; + } + +- /* Enable BEQ TxOP limit configuration in wireless G-mode. */ +- /* To check whether we shall force turn on TXOP configuration. */ +- if ((!rtlpriv->dm.disable_framebursting) && +- (rtlpriv->sec.pairwise_enc_algorithm == WEP40_ENCRYPTION || +- rtlpriv->sec.pairwise_enc_algorithm == WEP104_ENCRYPTION || +- rtlpriv->sec.pairwise_enc_algorithm == TKIP_ENCRYPTION)) { +- /* Force TxOP limit to 0x005e for UL. */ +- if (!(edca_be_ul & 0xffff0000)) +- edca_be_ul |= 0x005e0000; +- /* Force TxOP limit to 0x005e for DL. */ +- if (!(edca_be_dl & 0xffff0000)) +- edca_be_dl |= 0x005e0000; +- } +- + if ((!rtlpriv->dm.is_any_nonbepkts) && + (!rtlpriv->dm.disable_framebursting)) { + cur_txok_cnt = rtlpriv->stats.txbytesunicast - last_txok_cnt; +-- +2.43.0 + diff --git a/packages/linux/patches/rtlwifi/6.9/0003-wifi-rtlwifi-simplify-TX-command-fill-callbacks.patch b/packages/linux/patches/rtlwifi/6.9/0003-wifi-rtlwifi-simplify-TX-command-fill-callbacks.patch new file mode 100644 index 0000000000..754669891b --- /dev/null +++ b/packages/linux/patches/rtlwifi/6.9/0003-wifi-rtlwifi-simplify-TX-command-fill-callbacks.patch @@ -0,0 +1,413 @@ +From bc77b0b9adf81b9d4b7a33de3246f75fe756fd32 Mon Sep 17 00:00:00 2001 +From: Dmitry Antipov +Date: Wed, 11 Oct 2023 18:44:37 +0300 +Subject: [PATCH 3/7] wifi: rtlwifi: simplify TX command fill callbacks + +Since 'rtlpriv->cfg->ops->fill_tx_cmddesc()' is always called +with 'firstseg' and 'lastseg' set to 1 (and the latter is +never actually used), all of the relevant chip-specific +routines may be simplified. Compile tested only. + +Signed-off-by: Dmitry Antipov +Acked-by: Ping-Ke Shih +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20231011154442.52457-2-dmantipov@yandex.ru +--- + drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- + drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c | 8 +++----- + drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h | 1 - + drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c | 9 +++------ + drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h | 1 - + drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c | 2 +- + drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c | 8 +++----- + drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h | 5 ++--- + drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 2 +- + drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c | 8 +++----- + drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h | 1 - + drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 8 +++----- + drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.h | 1 - + drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c | 2 +- + drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.c | 2 +- + drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.h | 4 ++-- + drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c | 8 +++----- + drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.h | 1 - + drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c | 1 - + drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.h | 1 - + drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c | 5 ++--- + drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h | 1 - + drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 - + 23 files changed, 29 insertions(+), 53 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c +index 3835b639d453..cc9b2a459386 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/core.c ++++ b/drivers/net/wireless/realtek/rtlwifi/core.c +@@ -1897,7 +1897,7 @@ bool rtl_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb) + /*this is wrong, fill_tx_cmddesc needs update*/ + pdesc = &ring->desc[0]; + +- rtlpriv->cfg->ops->fill_tx_cmddesc(hw, (u8 *)pdesc, 1, 1, skb); ++ rtlpriv->cfg->ops->fill_tx_cmddesc(hw, (u8 *)pdesc, skb); + + __skb_queue_tail(&ring->queue, skb); + +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c +index 65ebe52883d3..d094163a9a71 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c +@@ -665,9 +665,8 @@ void rtl88ee_tx_fill_desc(struct ieee80211_hw *hw, + rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE, "\n"); + } + +-void rtl88ee_tx_fill_cmddesc(struct ieee80211_hw *hw, +- u8 *pdesc8, bool firstseg, +- bool lastseg, struct sk_buff *skb) ++void rtl88ee_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc8, ++ struct sk_buff *skb) + { + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); +@@ -687,8 +686,7 @@ void rtl88ee_tx_fill_cmddesc(struct ieee80211_hw *hw, + } + clear_pci_tx_desc_content(pdesc, TX_DESC_SIZE); + +- if (firstseg) +- set_tx_desc_offset(pdesc, USB_HWDESC_HEADER_LEN); ++ set_tx_desc_offset(pdesc, USB_HWDESC_HEADER_LEN); + + set_tx_desc_tx_rate(pdesc, DESC92C_RATE1M); + +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h +index e17f70b4d199..aae654b0e3ba 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h +@@ -797,6 +797,5 @@ bool rtl88ee_is_tx_desc_closed(struct ieee80211_hw *hw, + u8 hw_queue, u16 index); + void rtl88ee_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); + void rtl88ee_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, +- bool firstseg, bool lastseg, + struct sk_buff *skb); + #endif +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c +index 5376bb34251f..50e139186a93 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c +@@ -518,9 +518,8 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, + rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE, "\n"); + } + +-void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, +- u8 *pdesc8, bool firstseg, +- bool lastseg, struct sk_buff *skb) ++void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc8, ++ struct sk_buff *skb) + { + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); +@@ -540,9 +539,7 @@ void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, + } + clear_pci_tx_desc_content(pdesc, TX_DESC_SIZE); + +- if (firstseg) +- set_tx_desc_offset(pdesc, USB_HWDESC_HEADER_LEN); +- ++ set_tx_desc_offset(pdesc, USB_HWDESC_HEADER_LEN); + set_tx_desc_tx_rate(pdesc, DESC_RATE1M); + + set_tx_desc_seq(pdesc, 0); +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h +index b45b05a6a523..f3ffe3d9883c 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h +@@ -527,6 +527,5 @@ bool rtl92ce_is_tx_desc_closed(struct ieee80211_hw *hw, + u8 hw_queue, u16 index); + void rtl92ce_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); + void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, +- bool b_firstseg, bool b_lastseg, + struct sk_buff *skb); + #endif +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c +index a040c07791d1..5ec0eb8773a5 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c +@@ -1539,7 +1539,7 @@ static bool usb_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb) + * if its "here". + * + * This is maybe necessary: +- * rtlpriv->cfg->ops->fill_tx_cmddesc(hw, buffer, 1, 1, skb); ++ * rtlpriv->cfg->ops->fill_tx_cmddesc(hw, buffer, skb); + */ + dev_kfree_skb(skb); + +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c +index b70767e72f3d..9969e9d1fc4b 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c +@@ -626,9 +626,8 @@ void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 *pdesc8, + _rtl_tx_desc_checksum(pdesc); + } + +-void rtl92cu_tx_fill_cmddesc(struct ieee80211_hw *hw, +- u8 *pdesc8, bool firstseg, +- bool lastseg, struct sk_buff *skb) ++void rtl92cu_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc8, ++ struct sk_buff *skb) + { + struct rtl_priv *rtlpriv = rtl_priv(hw); + u8 fw_queue = QSLT_BEACON; +@@ -637,8 +636,7 @@ void rtl92cu_tx_fill_cmddesc(struct ieee80211_hw *hw, + __le32 *pdesc = (__le32 *)pdesc8; + + memset((void *)pdesc, 0, RTL_TX_HEADER_SIZE); +- if (firstseg) +- set_tx_desc_offset(pdesc, RTL_TX_HEADER_SIZE); ++ set_tx_desc_offset(pdesc, RTL_TX_HEADER_SIZE); + set_tx_desc_tx_rate(pdesc, DESC_RATE1M); + set_tx_desc_seq(pdesc, 0); + set_tx_desc_linip(pdesc, 0); +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h +index 171fe39dfb0c..cc4ef2bfd2e7 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h +@@ -396,8 +396,7 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, + struct rtl_tcb_desc *tcb_desc); + void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 *pdesc, + u32 buffer_len, bool ispspoll); +-void rtl92cu_tx_fill_cmddesc(struct ieee80211_hw *hw, +- u8 *pdesc, bool b_firstseg, +- bool b_lastseg, struct sk_buff *skb); ++void rtl92cu_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, ++ struct sk_buff *skb); + + #endif +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c +index 9ddb8478784b..e1fb29962801 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c +@@ -469,7 +469,7 @@ static bool _rtl92d_cmd_send_packet(struct ieee80211_hw *hw, + pdesc = &ring->desc[idx]; + /* discard output from call below */ + rtlpriv->cfg->ops->get_desc(hw, (u8 *)pdesc, true, HW_DESC_OWN); +- rtlpriv->cfg->ops->fill_tx_cmddesc(hw, (u8 *) pdesc, 1, 1, skb); ++ rtlpriv->cfg->ops->fill_tx_cmddesc(hw, (u8 *)pdesc, skb); + __skb_queue_tail(&ring->queue, skb); + spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags); + rtlpriv->cfg->ops->tx_polling(hw, BEACON_QUEUE); +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c +index c09c0c312665..02ac69c08ed3 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c +@@ -655,9 +655,8 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, + rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE, "\n"); + } + +-void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, +- u8 *pdesc8, bool firstseg, +- bool lastseg, struct sk_buff *skb) ++void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc8, ++ struct sk_buff *skb) + { + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); +@@ -678,8 +677,7 @@ void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, + return; + } + clear_pci_tx_desc_content(pdesc, TX_DESC_SIZE); +- if (firstseg) +- set_tx_desc_offset(pdesc, USB_HWDESC_HEADER_LEN); ++ set_tx_desc_offset(pdesc, USB_HWDESC_HEADER_LEN); + /* 5G have no CCK rate + * Caution: The macros below are multi-line expansions. + * The braces are needed no matter what checkpatch says +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h +index d01578875cd5..2992668c156c 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h +@@ -564,7 +564,6 @@ bool rtl92de_is_tx_desc_closed(struct ieee80211_hw *hw, + u8 hw_queue, u16 index); + void rtl92de_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); + void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, +- bool b_firstseg, bool b_lastseg, + struct sk_buff *skb); + + #endif +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c +index a182cdeb58e2..67388e0b3fa0 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c +@@ -827,9 +827,8 @@ void rtl92ee_tx_fill_desc(struct ieee80211_hw *hw, + rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE, "\n"); + } + +-void rtl92ee_tx_fill_cmddesc(struct ieee80211_hw *hw, +- u8 *pdesc8, bool firstseg, +- bool lastseg, struct sk_buff *skb) ++void rtl92ee_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc8, ++ struct sk_buff *skb) + { + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); +@@ -846,8 +845,7 @@ void rtl92ee_tx_fill_cmddesc(struct ieee80211_hw *hw, + } + clear_pci_tx_desc_content(pdesc, txdesc_len); + +- if (firstseg) +- set_tx_desc_offset(pdesc, txdesc_len); ++ set_tx_desc_offset(pdesc, txdesc_len); + + set_tx_desc_tx_rate(pdesc, DESC_RATE1M); + +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.h +index 967cef3a9cbf..3852a50a688b 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.h ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.h +@@ -743,6 +743,5 @@ u64 rtl92ee_get_desc(struct ieee80211_hw *hw, + bool rtl92ee_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index); + void rtl92ee_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); + void rtl92ee_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, +- bool firstseg, bool lastseg, + struct sk_buff *skb); + #endif +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c +index f570495af044..579b1789d6d1 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c +@@ -122,7 +122,7 @@ static bool _rtl92s_cmd_send_packet(struct ieee80211_hw *hw, + + idx = (ring->idx + skb_queue_len(&ring->queue)) % ring->entries; + pdesc = &ring->desc[idx]; +- rtlpriv->cfg->ops->fill_tx_cmddesc(hw, (u8 *)pdesc, 1, 1, skb); ++ rtlpriv->cfg->ops->fill_tx_cmddesc(hw, (u8 *)pdesc, skb); + __skb_queue_tail(&ring->queue, skb); + + spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags); +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.c +index a5853a170b58..f104cdb649f8 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.c +@@ -492,7 +492,7 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, + } + + void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc8, +- bool firstseg, bool lastseg, struct sk_buff *skb) ++ struct sk_buff *skb) + { + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.h +index 90aa12fc6a7f..40291a6a15d0 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.h ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.h +@@ -10,8 +10,8 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, + struct ieee80211_sta *sta, + struct sk_buff *skb, u8 hw_queue, + struct rtl_tcb_desc *ptcb_desc); +-void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, bool firstseg, +- bool lastseg, struct sk_buff *skb); ++void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, ++ struct sk_buff *skb); + bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats, + struct ieee80211_rx_status *rx_status, u8 *pdesc, + struct sk_buff *skb); +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c +index 7f294e698994..d9823ddab7be 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c +@@ -519,9 +519,8 @@ void rtl8723e_tx_fill_desc(struct ieee80211_hw *hw, + rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE, "\n"); + } + +-void rtl8723e_tx_fill_cmddesc(struct ieee80211_hw *hw, +- u8 *pdesc8, bool firstseg, +- bool lastseg, struct sk_buff *skb) ++void rtl8723e_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc8, ++ struct sk_buff *skb) + { + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); +@@ -541,8 +540,7 @@ void rtl8723e_tx_fill_cmddesc(struct ieee80211_hw *hw, + } + clear_pci_tx_desc_content(pdesc, TX_DESC_SIZE); + +- if (firstseg) +- set_tx_desc_offset(pdesc, USB_HWDESC_HEADER_LEN); ++ set_tx_desc_offset(pdesc, USB_HWDESC_HEADER_LEN); + + set_tx_desc_tx_rate(pdesc, DESC92C_RATE1M); + +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.h +index 2d25f62a4d52..f352fddfff32 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.h ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.h +@@ -530,6 +530,5 @@ bool rtl8723e_is_tx_desc_closed(struct ieee80211_hw *hw, + u8 hw_queue, u16 index); + void rtl8723e_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); + void rtl8723e_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, +- bool firstseg, bool lastseg, + struct sk_buff *skb); + #endif +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c +index 24ef7cc52e99..8b6352f7f93b 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c +@@ -585,7 +585,6 @@ void rtl8723be_tx_fill_desc(struct ieee80211_hw *hw, + } + + void rtl8723be_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc8, +- bool firstseg, bool lastseg, + struct sk_buff *skb) + { + struct rtl_priv *rtlpriv = rtl_priv(hw); +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.h +index 174aca20c7e1..da027f915cf4 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.h ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.h +@@ -642,6 +642,5 @@ bool rtl8723be_is_tx_desc_closed(struct ieee80211_hw *hw, + u8 hw_queue, u16 index); + void rtl8723be_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); + void rtl8723be_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, +- bool firstseg, bool lastseg, + struct sk_buff *skb); + #endif +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c +index d7cb3319d885..bd71592fe26a 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c +@@ -828,9 +828,8 @@ void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw, + rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE, "\n"); + } + +-void rtl8821ae_tx_fill_cmddesc(struct ieee80211_hw *hw, +- u8 *pdesc8, bool firstseg, +- bool lastseg, struct sk_buff *skb) ++void rtl8821ae_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc8, ++ struct sk_buff *skb) + { + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h +index a9ed6fd41089..1155365348f3 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h +@@ -648,6 +648,5 @@ bool rtl8821ae_is_tx_desc_closed(struct ieee80211_hw *hw, + u8 hw_queue, u16 index); + void rtl8821ae_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); + void rtl8821ae_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, +- bool firstseg, bool lastseg, + struct sk_buff *skb); + #endif +diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h +index 2e7e04f91279..600b33905cab 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h ++++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h +@@ -2249,7 +2249,6 @@ struct rtl_hal_ops { + void (*fill_fake_txdesc)(struct ieee80211_hw *hw, u8 *pdesc, + u32 buffer_len, bool bsspspoll); + void (*fill_tx_cmddesc)(struct ieee80211_hw *hw, u8 *pdesc, +- bool firstseg, bool lastseg, + struct sk_buff *skb); + void (*fill_tx_special_desc)(struct ieee80211_hw *hw, + u8 *pdesc, u8 *pbd_desc, +-- +2.43.0 + diff --git a/packages/linux/patches/rtlwifi/6.9/0004-wifi-rtlwifi-drop-unused-const_amdpci_aspm.patch b/packages/linux/patches/rtlwifi/6.9/0004-wifi-rtlwifi-drop-unused-const_amdpci_aspm.patch new file mode 100644 index 0000000000..5955a05317 --- /dev/null +++ b/packages/linux/patches/rtlwifi/6.9/0004-wifi-rtlwifi-drop-unused-const_amdpci_aspm.patch @@ -0,0 +1,182 @@ +From 1705e79a096e605b9f9da5442024f05c5e240694 Mon Sep 17 00:00:00 2001 +From: Bjorn Helgaas +Date: Thu, 16 Nov 2023 12:05:29 -0600 +Subject: [PATCH 4/7] wifi: rtlwifi: drop unused const_amdpci_aspm +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Remove the unused "const_amdpci_aspm" member of struct rtl_pci and +struct rtl_ps_ctl. + +Signed-off-by: Bjorn Helgaas +Acked-by: Ping-Ke Shih +Reviewed-by: Ilpo Järvinen +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20231116180529.52752-1-helgaas@kernel.org +--- + drivers/net/wireless/realtek/rtlwifi/pci.c | 1 - + drivers/net/wireless/realtek/rtlwifi/pci.h | 1 - + drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 3 --- + drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 3 --- + drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 3 --- + drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 3 --- + drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 3 --- + drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 3 --- + drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 3 --- + drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 3 --- + drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 -- + 11 files changed, 28 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c +index 9886e719739b..b163a069660b 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/pci.c ++++ b/drivers/net/wireless/realtek/rtlwifi/pci.c +@@ -70,7 +70,6 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw) + ppsc->support_aspm = false; + + /*Update PCI ASPM setting */ +- ppsc->const_amdpci_aspm = rtlpci->const_amdpci_aspm; + switch (rtlpci->const_pci_aspm) { + case 0: + /*No ASPM */ +diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.h b/drivers/net/wireless/realtek/rtlwifi/pci.h +index 866861626a0a..4725d43609fd 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/pci.h ++++ b/drivers/net/wireless/realtek/rtlwifi/pci.h +@@ -195,7 +195,6 @@ struct rtl_pci { + u32 reg_bcn_ctrl_val; + + /*ASPM*/ u8 const_pci_aspm; +- u8 const_amdpci_aspm; + u8 const_hwsw_rfoff_d3; + u8 const_support_pciaspm; + /*pci-e bridge */ +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c +index b77937fe2448..37bb59fa8bfa 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c +@@ -21,9 +21,6 @@ static void rtl88e_init_aspm_vars(struct ieee80211_hw *hw) + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); + +- /*close ASPM for AMD defaultly */ +- rtlpci->const_amdpci_aspm = 0; +- + /* ASPM PS mode. + * 0 - Disable ASPM, + * 1 - Enable ASPM without Clock Req, +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c +index e452275d8789..e20f2bec45c4 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c +@@ -24,9 +24,6 @@ static void rtl92c_init_aspm_vars(struct ieee80211_hw *hw) + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); + +- /*close ASPM for AMD defaultly */ +- rtlpci->const_amdpci_aspm = 0; +- + /* + * ASPM PS mode. + * 0 - Disable ASPM, +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c +index 11f319c97124..afd685ed460a 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c +@@ -21,9 +21,6 @@ static void rtl92d_init_aspm_vars(struct ieee80211_hw *hw) + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); + +- /*close ASPM for AMD defaultly */ +- rtlpci->const_amdpci_aspm = 0; +- + /* + * ASPM PS mode. + * 0 - Disable ASPM, +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c +index 616a47d8d97a..a5ea2b44a97c 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c +@@ -24,9 +24,6 @@ static void rtl92ee_init_aspm_vars(struct ieee80211_hw *hw) + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); + +- /*close ASPM for AMD defaultly */ +- rtlpci->const_amdpci_aspm = 0; +- + /** + * ASPM PS mode. + * 0 - Disable ASPM, +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c +index 30bce381c3bb..675bdd32feb1 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c +@@ -21,9 +21,6 @@ static void rtl92s_init_aspm_vars(struct ieee80211_hw *hw) + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); + +- /*close ASPM for AMD defaultly */ +- rtlpci->const_amdpci_aspm = 0; +- + /* ASPM PS mode. + * 0 - Disable ASPM, + * 1 - Enable ASPM without Clock Req, +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c +index c821436a1991..dd7505e2f22c 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c +@@ -26,9 +26,6 @@ static void rtl8723e_init_aspm_vars(struct ieee80211_hw *hw) + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); + +- /*close ASPM for AMD defaultly */ +- rtlpci->const_amdpci_aspm = 0; +- + /** + * ASPM PS mode. + * 0 - Disable ASPM, +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c +index 43b611d5288d..162c34f0e9b7 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c +@@ -26,9 +26,6 @@ static void rtl8723be_init_aspm_vars(struct ieee80211_hw *hw) + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); + +- /*close ASPM for AMD defaultly */ +- rtlpci->const_amdpci_aspm = 0; +- + /* ASPM PS mode. + * 0 - Disable ASPM, + * 1 - Enable ASPM without Clock Req, +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c +index 0bca542e103f..7b911695db33 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c +@@ -23,9 +23,6 @@ static void rtl8821ae_init_aspm_vars(struct ieee80211_hw *hw) + struct rtl_priv *rtlpriv = rtl_priv(hw); + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); + +- /*close ASPM for AMD defaultly */ +- rtlpci->const_amdpci_aspm = 0; +- + /** + * ASPM PS mode. + * 0 - Disable ASPM, +diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h +index 600b33905cab..b105c713e35f 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h ++++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h +@@ -2023,8 +2023,6 @@ struct rtl_ps_ctl { + u32 cur_ps_level; + u32 reg_rfps_level; + +- /*just for PCIE ASPM */ +- u8 const_amdpci_aspm; + bool pwrdown_mode; + + enum rf_pwrstate inactive_pwrstate; +-- +2.43.0 + diff --git a/packages/linux/patches/rtlwifi/6.9/0005-wifi-rtlwifi-rtl8192de-Don-t-read-register-in-_rtl92.patch b/packages/linux/patches/rtlwifi/6.9/0005-wifi-rtlwifi-rtl8192de-Don-t-read-register-in-_rtl92.patch new file mode 100644 index 0000000000..4ddd97b32d --- /dev/null +++ b/packages/linux/patches/rtlwifi/6.9/0005-wifi-rtlwifi-rtl8192de-Don-t-read-register-in-_rtl92.patch @@ -0,0 +1,50 @@ +From 366e361d988e0d62cc2b27e1e6255651b0353f3c Mon Sep 17 00:00:00 2001 +From: Bitterblue Smith +Date: Sat, 13 Jan 2024 01:42:29 +0200 +Subject: [PATCH 5/7] wifi: rtlwifi: rtl8192de: Don't read register in + _rtl92de_query_rxphystatus + +Instead of reading bit 9 of RFPGA0_XA_HSSIPARAMETER2 every time a frame +is received, just use rtlphy->cck_high_power, which is initialised in +_rtl92d_phy_bb_config(). That bit never changes anyway. + +With this change _rtl92de_query_rxphystatus() can be shared with the +upcoming USB driver. The USB driver can't read registers in this +function because register reading can sleep. + +Compile tested only. + +Signed-off-by: Bitterblue Smith +Acked-by: Ping-Ke Shih +Signed-off-by: Kalle Valo +Link: https://msgid.link/19a3e023-0eaa-4096-9f78-a2c8e909cb54@gmail.com +--- + drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c +index 02ac69c08ed3..192982ec8152 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c +@@ -42,6 +42,7 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw, + bool packet_beacon) + { + struct rtl_priv *rtlpriv = rtl_priv(hw); ++ struct rtl_phy *rtlphy = &(rtlpriv->phy); + struct rtl_ps_ctl *ppsc = rtl_psc(rtlpriv); + struct phy_sts_cck_8192d *cck_buf; + s8 rx_pwr_all, rx_pwr[4]; +@@ -62,9 +63,7 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw, + u8 report, cck_highpwr; + cck_buf = (struct phy_sts_cck_8192d *)p_drvinfo; + if (ppsc->rfpwr_state == ERFON) +- cck_highpwr = (u8) rtl_get_bbreg(hw, +- RFPGA0_XA_HSSIPARAMETER2, +- BIT(9)); ++ cck_highpwr = rtlphy->cck_high_power; + else + cck_highpwr = false; + if (!cck_highpwr) { +-- +2.43.0 + diff --git a/packages/linux/patches/rtlwifi/6.9/0006-wifi-rtlwifi-Remove-rtl_intf_ops.read_efuse_byte.patch b/packages/linux/patches/rtlwifi/6.9/0006-wifi-rtlwifi-Remove-rtl_intf_ops.read_efuse_byte.patch new file mode 100644 index 0000000000..dd865f08ef --- /dev/null +++ b/packages/linux/patches/rtlwifi/6.9/0006-wifi-rtlwifi-Remove-rtl_intf_ops.read_efuse_byte.patch @@ -0,0 +1,66 @@ +From 5c051c716329a26d66f893e9415f22f65381a77a Mon Sep 17 00:00:00 2001 +From: Bitterblue Smith +Date: Tue, 27 Feb 2024 14:15:52 +0200 +Subject: [PATCH 6/7] wifi: rtlwifi: Remove rtl_intf_ops.read_efuse_byte + +PCI drivers and USB drivers can both use the same function, +read_efuse_byte(), and they can call it directly. + +rtl8192de was the only user. + +Tested only with the upcoming rtl8192du driver. + +Signed-off-by: Bitterblue Smith +Acked-by: Ping-Ke Shih +Signed-off-by: Kalle Valo +Link: https://msgid.link/4e2c968d-f25c-4a40-be97-4fdcbdde69cf@gmail.com +--- + drivers/net/wireless/realtek/rtlwifi/pci.c | 1 - + drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 6 ++---- + drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 - + 3 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c +index b163a069660b..6f57bf8f404e 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/pci.c ++++ b/drivers/net/wireless/realtek/rtlwifi/pci.c +@@ -2422,7 +2422,6 @@ EXPORT_SYMBOL(rtl_pci_resume); + #endif /* CONFIG_PM_SLEEP */ + + const struct rtl_intf_ops rtl_pci_ops = { +- .read_efuse_byte = read_efuse_byte, + .adapter_start = rtl_pci_start, + .adapter_stop = rtl_pci_stop, + .check_buddy_priv = rtl_pci_check_buddy_priv, +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c +index 743ac6871bf4..4ba42f6be3f2 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c +@@ -1669,10 +1669,8 @@ static void _rtl92de_efuse_update_chip_version(struct ieee80211_hw *hw) + u8 cutvalue[2]; + u16 chipvalue; + +- rtlpriv->intf_ops->read_efuse_byte(hw, EEPROME_CHIP_VERSION_H, +- &cutvalue[1]); +- rtlpriv->intf_ops->read_efuse_byte(hw, EEPROME_CHIP_VERSION_L, +- &cutvalue[0]); ++ read_efuse_byte(hw, EEPROME_CHIP_VERSION_H, &cutvalue[1]); ++ read_efuse_byte(hw, EEPROME_CHIP_VERSION_L, &cutvalue[0]); + chipvalue = (cutvalue[1] << 8) | cutvalue[0]; + switch (chipvalue) { + case 0xAA55: +diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h +index b105c713e35f..3cd95dd4e711 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h ++++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h +@@ -2315,7 +2315,6 @@ struct rtl_hal_ops { + + struct rtl_intf_ops { + /*com */ +- void (*read_efuse_byte)(struct ieee80211_hw *hw, u16 _offset, u8 *pbuf); + int (*adapter_start)(struct ieee80211_hw *hw); + void (*adapter_stop)(struct ieee80211_hw *hw); + bool (*check_buddy_priv)(struct ieee80211_hw *hw, +-- +2.43.0 + diff --git a/packages/linux/patches/rtlwifi/6.9/0007-wifi-rtlwifi-rtl_usb-Store-the-endpoint-addresses.patch b/packages/linux/patches/rtlwifi/6.9/0007-wifi-rtlwifi-rtl_usb-Store-the-endpoint-addresses.patch new file mode 100644 index 0000000000..78506f47c5 --- /dev/null +++ b/packages/linux/patches/rtlwifi/6.9/0007-wifi-rtlwifi-rtl_usb-Store-the-endpoint-addresses.patch @@ -0,0 +1,259 @@ +From 548fc9fe36544db208afb45c4ce6e85c7a548fad Mon Sep 17 00:00:00 2001 +From: Bitterblue Smith +Date: Tue, 13 Feb 2024 16:33:11 +0200 +Subject: [PATCH 7/7] wifi: rtlwifi: rtl_usb: Store the endpoint addresses + +And use the stored addresses in rtl8192cu instead of hardcoding them. + +This is what the vendor drivers do. + +Perhaps this is not strictly necessary for RTL8192CU devices. However, +the dual mac version of RTL8192DU has two USB interfaces, each with its +own set of endpoints. Hardcoding their addresses in the upcoming +rtl8192du driver would require making some assumptions which I'm not +qualified to make. + +Signed-off-by: Bitterblue Smith +Acked-by: Ping-Ke Shih +Signed-off-by: Kalle Valo +Link: https://msgid.link/7b6a602a-6101-4bab-958d-bcff4d565b40@gmail.com +--- + .../wireless/realtek/rtlwifi/rtl8192cu/sw.c | 1 - + .../wireless/realtek/rtlwifi/rtl8192cu/trx.c | 77 ++++++++++--------- + .../wireless/realtek/rtlwifi/rtl8192cu/trx.h | 1 - + drivers/net/wireless/realtek/rtlwifi/usb.c | 31 ++++++-- + drivers/net/wireless/realtek/rtlwifi/usb.h | 2 + + drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 - + 6 files changed, 68 insertions(+), 45 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c +index e6403d4c937c..bf63c060c985 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c +@@ -146,7 +146,6 @@ MODULE_PARM_DESC(debug_mask, "Set debug mask (default 0)"); + + static struct rtl_hal_usbint_cfg rtl92cu_interface_cfg = { + /* rx */ +- .in_ep_num = RTL92C_USB_BULK_IN_NUM, + .rx_urb_num = RTL92C_NUM_RX_URBS, + .rx_max_size = RTL92C_SIZE_MAX_RX_BUFFER, + .usb_rx_hdl = rtl8192cu_rx_hdl, +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c +index 9969e9d1fc4b..e051295ea596 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c +@@ -79,68 +79,75 @@ static int configvernoutep(struct ieee80211_hw *hw) + static void twooutepmapping(struct ieee80211_hw *hw, bool is_chip8, + bool bwificfg, struct rtl_ep_map *ep_map) + { ++ struct rtl_usb_priv *usb_priv = rtl_usbpriv(hw); ++ struct rtl_usb *rtlusb = rtl_usbdev(usb_priv); + struct rtl_priv *rtlpriv = rtl_priv(hw); + + if (bwificfg) { /* for WMM */ + rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, + "USB Chip-B & WMM Setting.....\n"); +- ep_map->ep_mapping[RTL_TXQ_BE] = 2; +- ep_map->ep_mapping[RTL_TXQ_BK] = 3; +- ep_map->ep_mapping[RTL_TXQ_VI] = 3; +- ep_map->ep_mapping[RTL_TXQ_VO] = 2; +- ep_map->ep_mapping[RTL_TXQ_MGT] = 2; +- ep_map->ep_mapping[RTL_TXQ_BCN] = 2; +- ep_map->ep_mapping[RTL_TXQ_HI] = 2; ++ ep_map->ep_mapping[RTL_TXQ_BE] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_BK] = rtlusb->out_eps[1]; ++ ep_map->ep_mapping[RTL_TXQ_VI] = rtlusb->out_eps[1]; ++ ep_map->ep_mapping[RTL_TXQ_VO] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_MGT] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_BCN] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_HI] = rtlusb->out_eps[0]; + } else { /* typical setting */ + rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, + "USB typical Setting.....\n"); +- ep_map->ep_mapping[RTL_TXQ_BE] = 3; +- ep_map->ep_mapping[RTL_TXQ_BK] = 3; +- ep_map->ep_mapping[RTL_TXQ_VI] = 2; +- ep_map->ep_mapping[RTL_TXQ_VO] = 2; +- ep_map->ep_mapping[RTL_TXQ_MGT] = 2; +- ep_map->ep_mapping[RTL_TXQ_BCN] = 2; +- ep_map->ep_mapping[RTL_TXQ_HI] = 2; ++ ep_map->ep_mapping[RTL_TXQ_BE] = rtlusb->out_eps[1]; ++ ep_map->ep_mapping[RTL_TXQ_BK] = rtlusb->out_eps[1]; ++ ep_map->ep_mapping[RTL_TXQ_VI] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_VO] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_MGT] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_BCN] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_HI] = rtlusb->out_eps[0]; + } + } + + static void threeoutepmapping(struct ieee80211_hw *hw, bool bwificfg, + struct rtl_ep_map *ep_map) + { ++ struct rtl_usb_priv *usb_priv = rtl_usbpriv(hw); ++ struct rtl_usb *rtlusb = rtl_usbdev(usb_priv); + struct rtl_priv *rtlpriv = rtl_priv(hw); + + if (bwificfg) { /* for WMM */ + rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, + "USB 3EP Setting for WMM.....\n"); +- ep_map->ep_mapping[RTL_TXQ_BE] = 5; +- ep_map->ep_mapping[RTL_TXQ_BK] = 3; +- ep_map->ep_mapping[RTL_TXQ_VI] = 3; +- ep_map->ep_mapping[RTL_TXQ_VO] = 2; +- ep_map->ep_mapping[RTL_TXQ_MGT] = 2; +- ep_map->ep_mapping[RTL_TXQ_BCN] = 2; +- ep_map->ep_mapping[RTL_TXQ_HI] = 2; ++ ep_map->ep_mapping[RTL_TXQ_BE] = rtlusb->out_eps[2]; ++ ep_map->ep_mapping[RTL_TXQ_BK] = rtlusb->out_eps[1]; ++ ep_map->ep_mapping[RTL_TXQ_VI] = rtlusb->out_eps[1]; ++ ep_map->ep_mapping[RTL_TXQ_VO] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_MGT] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_BCN] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_HI] = rtlusb->out_eps[0]; + } else { /* typical setting */ + rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, + "USB 3EP Setting for typical.....\n"); +- ep_map->ep_mapping[RTL_TXQ_BE] = 5; +- ep_map->ep_mapping[RTL_TXQ_BK] = 5; +- ep_map->ep_mapping[RTL_TXQ_VI] = 3; +- ep_map->ep_mapping[RTL_TXQ_VO] = 2; +- ep_map->ep_mapping[RTL_TXQ_MGT] = 2; +- ep_map->ep_mapping[RTL_TXQ_BCN] = 2; +- ep_map->ep_mapping[RTL_TXQ_HI] = 2; ++ ep_map->ep_mapping[RTL_TXQ_BE] = rtlusb->out_eps[2]; ++ ep_map->ep_mapping[RTL_TXQ_BK] = rtlusb->out_eps[2]; ++ ep_map->ep_mapping[RTL_TXQ_VI] = rtlusb->out_eps[1]; ++ ep_map->ep_mapping[RTL_TXQ_VO] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_MGT] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_BCN] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_HI] = rtlusb->out_eps[0]; + } + } + + static void oneoutepmapping(struct ieee80211_hw *hw, struct rtl_ep_map *ep_map) + { +- ep_map->ep_mapping[RTL_TXQ_BE] = 2; +- ep_map->ep_mapping[RTL_TXQ_BK] = 2; +- ep_map->ep_mapping[RTL_TXQ_VI] = 2; +- ep_map->ep_mapping[RTL_TXQ_VO] = 2; +- ep_map->ep_mapping[RTL_TXQ_MGT] = 2; +- ep_map->ep_mapping[RTL_TXQ_BCN] = 2; +- ep_map->ep_mapping[RTL_TXQ_HI] = 2; ++ struct rtl_usb_priv *usb_priv = rtl_usbpriv(hw); ++ struct rtl_usb *rtlusb = rtl_usbdev(usb_priv); ++ ++ ep_map->ep_mapping[RTL_TXQ_BE] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_BK] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_VI] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_VO] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_MGT] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_BCN] = rtlusb->out_eps[0]; ++ ep_map->ep_mapping[RTL_TXQ_HI] = rtlusb->out_eps[0]; + } + + static int _out_ep_mapping(struct ieee80211_hw *hw) +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h +index cc4ef2bfd2e7..31ec9deae7fb 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h +@@ -4,7 +4,6 @@ + #ifndef __RTL92CU_TRX_H__ + #define __RTL92CU_TRX_H__ + +-#define RTL92C_USB_BULK_IN_NUM 1 + #define RTL92C_NUM_RX_URBS 8 + #define RTL92C_NUM_TX_URBS 32 + +diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c +index 30bf2775a335..706909a50790 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/usb.c ++++ b/drivers/net/wireless/realtek/rtlwifi/usb.c +@@ -280,7 +280,6 @@ static int _rtl_usb_init_rx(struct ieee80211_hw *hw) + + rtlusb->rx_max_size = rtlpriv->cfg->usb_interface_cfg->rx_max_size; + rtlusb->rx_urb_num = rtlpriv->cfg->usb_interface_cfg->rx_urb_num; +- rtlusb->in_ep = rtlpriv->cfg->usb_interface_cfg->in_ep_num; + rtlusb->usb_rx_hdl = rtlpriv->cfg->usb_interface_cfg->usb_rx_hdl; + rtlusb->usb_rx_segregate_hdl = + rtlpriv->cfg->usb_interface_cfg->usb_rx_segregate_hdl; +@@ -312,20 +311,38 @@ static int _rtl_usb_init(struct ieee80211_hw *hw) + + pep_desc = &usb_intf->cur_altsetting->endpoint[epidx].desc; + +- if (usb_endpoint_dir_in(pep_desc)) ++ if (usb_endpoint_dir_in(pep_desc)) { ++ if (usb_endpoint_xfer_bulk(pep_desc)) { ++ /* The vendor drivers assume there is only one ++ * bulk in ep and that it's the first in ep. ++ */ ++ if (rtlusb->in_ep_nums == 0) ++ rtlusb->in_ep = usb_endpoint_num(pep_desc); ++ else ++ pr_warn("%s: bulk in endpoint is not the first in endpoint\n", ++ __func__); ++ } ++ + rtlusb->in_ep_nums++; +- else if (usb_endpoint_dir_out(pep_desc)) ++ } else if (usb_endpoint_dir_out(pep_desc)) { ++ if (rtlusb->out_ep_nums < RTL_USB_MAX_BULKOUT_NUM) { ++ if (usb_endpoint_xfer_bulk(pep_desc)) ++ rtlusb->out_eps[rtlusb->out_ep_nums] = ++ usb_endpoint_num(pep_desc); ++ } else { ++ pr_warn("%s: found more bulk out endpoints than the expected %d\n", ++ __func__, RTL_USB_MAX_BULKOUT_NUM); ++ } ++ + rtlusb->out_ep_nums++; ++ } + + rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, + "USB EP(0x%02x), MaxPacketSize=%d, Interval=%d\n", + pep_desc->bEndpointAddress, pep_desc->wMaxPacketSize, + pep_desc->bInterval); + } +- if (rtlusb->in_ep_nums < rtlpriv->cfg->usb_interface_cfg->in_ep_num) { +- pr_err("Too few input end points found\n"); +- return -EINVAL; +- } ++ + if (rtlusb->out_ep_nums == 0) { + pr_err("No output end points found\n"); + return -EINVAL; +diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.h b/drivers/net/wireless/realtek/rtlwifi/usb.h +index 3bf85b23eec1..12529afc0510 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/usb.h ++++ b/drivers/net/wireless/realtek/rtlwifi/usb.h +@@ -19,6 +19,7 @@ + + #define RTL_USB_MAX_TXQ_NUM 4 /* max tx queue */ + #define RTL_USB_MAX_EP_NUM 6 /* max ep number */ ++#define RTL_USB_MAX_BULKOUT_NUM 4 + #define RTL_USB_MAX_TX_URBS_NUM 8 + + enum rtl_txq { +@@ -94,6 +95,7 @@ struct rtl_usb { + + /* Tx */ + u8 out_ep_nums ; ++ u8 out_eps[RTL_USB_MAX_BULKOUT_NUM]; + u8 out_queue_sel; + struct rtl_ep_map ep_map; + +diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h +index 3cd95dd4e711..b2179fd1d709 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h ++++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h +@@ -2378,7 +2378,6 @@ struct rtl_mod_params { + + struct rtl_hal_usbint_cfg { + /* data - rx */ +- u32 in_ep_num; + u32 rx_urb_num; + u32 rx_max_size; + +-- +2.43.0 + From f775077b1b8b9097d1e409210a6ab68b13a0a58c Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Mon, 10 Jun 2024 12:35:13 +0000 Subject: [PATCH 18/18] linux: update builds to include rtlwifi RTL8192DU upstream patches --- packages/linux/package.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/linux/package.mk b/packages/linux/package.mk index 8f57a49415..721d5f3d54 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -20,19 +20,20 @@ case "${LINUX}" in PKG_SHA256="2502f1858175fc03ba38198df6b7ac62e167c9d2ee9b08b157bff66c73130e2c" PKG_URL="https://github.com/torvalds/linux/archive/${PKG_VERSION}.tar.gz" PKG_SOURCE_NAME="linux-${LINUX}-${PKG_VERSION}.tar.gz" - PKG_PATCH_DIRS="default" + PKG_PATCH_DIRS="default rtlwifi/6.10 rtlwifi/6.11" ;; raspberrypi) PKG_VERSION="573f8fd0abf1d63ef719672a3c26e7abc0169620" # 6.6.31 PKG_SHA256="61f3e50e8841787ab3c8dff0e26ded2a4f4ff671603f6be8f7bcc61286eaf037" PKG_URL="https://github.com/raspberrypi/linux/archive/${PKG_VERSION}.tar.gz" PKG_SOURCE_NAME="linux-${LINUX}-${PKG_VERSION}.tar.gz" + PKG_PATCH_DIRS="raspberrypi rtlwifi/6.9 rtlwifi/6.10 rtlwifi/6.11" ;; *) PKG_VERSION="6.9.2" PKG_SHA256="d46c5bdf2c5961cc2a4dedefe0434d456865e95e4a7cd9f93fff054f9090e5f9" PKG_URL="https://www.kernel.org/pub/linux/kernel/v${PKG_VERSION/.*/}.x/${PKG_NAME}-${PKG_VERSION}.tar.xz" - PKG_PATCH_DIRS="default" + PKG_PATCH_DIRS="default rtlwifi/6.10 rtlwifi/6.11" ;; esac