From 707025f42230a86c27be1338d6b8d81bc569b0ce Mon Sep 17 00:00:00 2001 From: Paolo Sabatino Date: Tue, 6 Jan 2026 18:54:06 +0100 Subject: [PATCH] rtl8723cs: stop including proprietary driver for kernel 6.19 onwards * rtw88 mainline driver has good enough support for rtl8723cs so stop patching the kernel with this ancient driver * fixes rtl8703b (same chip as 8723cs) bluetooth firmware name file --- .../compilation/patch/drivers_network.sh | 30 ++++++++++++------- ...-btrtl-add-support-for-the-RTL8723CS.patch | 0 ...t-for-binding-RTL8723CS-with-device-.patch | 0 .../bluetooth-btrtl-add-rtl8703bs.patch | 2 +- ...tooth-btrtl-quirk-local-ext-features.patch | 0 ...-t-re-initialize-rtl8723cs-on-resume.patch | 0 ...et-bluetooth-Add-rtl8723bs-bluetooth.patch | 0 7 files changed, 21 insertions(+), 11 deletions(-) rename patch/misc/{wireless-rtl8723cs => bluetooth-rtl8723cs}/Bluetooth-btrtl-add-support-for-the-RTL8723CS.patch (100%) rename patch/misc/{wireless-rtl8723cs => bluetooth-rtl8723cs}/Bluetooth-hci_h5-Add-support-for-binding-RTL8723CS-with-device-.patch (100%) rename patch/misc/{wireless-rtl8723cs => bluetooth-rtl8723cs}/bluetooth-btrtl-add-rtl8703bs.patch (96%) rename patch/misc/{wireless-rtl8723cs => bluetooth-rtl8723cs}/bluetooth-btrtl-quirk-local-ext-features.patch (100%) rename patch/misc/{wireless-rtl8723cs => bluetooth-rtl8723cs}/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch (100%) rename patch/misc/{wireless-rtl8723cs => bluetooth-rtl8723cs}/dt-bindings-net-bluetooth-Add-rtl8723bs-bluetooth.patch (100%) diff --git a/lib/functions/compilation/patch/drivers_network.sh b/lib/functions/compilation/patch/drivers_network.sh index 602062b55e..a786bd7a3d 100644 --- a/lib/functions/compilation/patch/drivers_network.sh +++ b/lib/functions/compilation/patch/drivers_network.sh @@ -585,6 +585,25 @@ driver_rtl8723cs() { return 0 fi + # -- BLUETOOTH -- + # these few patches address some issues to let the rtl8723cs/rtl8703b chipsets to be used within the serdev framework + if linux-version compare "${version}" ge 6.2 && linux-version compare "${version}" lt 6.3; then # landed in 6.1.30/6.3.4 # keep for 6.2 + process_patch_file "${SRC}/patch/misc/bluetooth-rtl8723cs/bluetooth-btrtl-quirk-local-ext-features.patch" "applying" + process_patch_file "${SRC}/patch/misc/bluetooth-rtl8723cs/Bluetooth-btrtl-add-support-for-the-RTL8723CS.patch" "applying" + fi + + process_patch_file "${SRC}/patch/misc/bluetooth-rtl8723cs/Bluetooth-hci_h5-Add-support-for-binding-RTL8723CS-with-device-.patch" "applying" + process_patch_file "${SRC}/patch/misc/bluetooth-rtl8723cs/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch" "applying" + process_patch_file "${SRC}/patch/misc/bluetooth-rtl8723cs/bluetooth-btrtl-add-rtl8703bs.patch" "applying" + process_patch_file "${SRC}/patch/misc/bluetooth-rtl8723cs/dt-bindings-net-bluetooth-Add-rtl8723bs-bluetooth.patch" "applying" + + # -- WIFI -- + # Wireless patches; do note kernels >= 6.19 do not need this because it has been superseded by mainline rtw88 driver. + # If we're >= 6.19, we stop here + if linux-version compare "${version}" ge 6.19; then + return 0 + fi + if linux-version compare "${version}" ge 6.1; then # Add to section Makefile @@ -619,17 +638,8 @@ driver_rtl8723cs() { process_patch_file "${SRC}/patch/misc/wireless-rtl8723cs/8723cs-Port-to-6.0.patch" "applying" process_patch_file "${SRC}/patch/misc/wireless-rtl8723cs/8723cs-Port-to-6.1.patch" "applying" process_patch_file "${SRC}/patch/misc/wireless-rtl8723cs/8723cs-Port-to-6.1-rc1.patch" "applying" - process_patch_file "${SRC}/patch/misc/wireless-rtl8723cs/dt-bindings-net-bluetooth-Add-rtl8723bs-bluetooth.patch" "applying" - - if linux-version compare "${version}" ge 6.2 && linux-version compare "${version}" lt 6.3; then # landed in 6.1.30/6.3.4 # keep for 6.2 - process_patch_file "${SRC}/patch/misc/wireless-rtl8723cs/bluetooth-btrtl-quirk-local-ext-features.patch" "applying" - process_patch_file "${SRC}/patch/misc/wireless-rtl8723cs/Bluetooth-btrtl-add-support-for-the-RTL8723CS.patch" "applying" - fi - - process_patch_file "${SRC}/patch/misc/wireless-rtl8723cs/Bluetooth-hci_h5-Add-support-for-binding-RTL8723CS-with-device-.patch" "applying" - process_patch_file "${SRC}/patch/misc/wireless-rtl8723cs/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch" "applying" - process_patch_file "${SRC}/patch/misc/wireless-rtl8723cs/bluetooth-btrtl-add-rtl8703bs.patch" "applying" process_patch_file "${SRC}/patch/misc/wireless-rtl8723cs/8723cs-Fix-symbol-conflicts-with-rtw88-driver.patch" "applying" + fi if linux-version compare "${version}" ge 6.3; then diff --git a/patch/misc/wireless-rtl8723cs/Bluetooth-btrtl-add-support-for-the-RTL8723CS.patch b/patch/misc/bluetooth-rtl8723cs/Bluetooth-btrtl-add-support-for-the-RTL8723CS.patch similarity index 100% rename from patch/misc/wireless-rtl8723cs/Bluetooth-btrtl-add-support-for-the-RTL8723CS.patch rename to patch/misc/bluetooth-rtl8723cs/Bluetooth-btrtl-add-support-for-the-RTL8723CS.patch diff --git a/patch/misc/wireless-rtl8723cs/Bluetooth-hci_h5-Add-support-for-binding-RTL8723CS-with-device-.patch b/patch/misc/bluetooth-rtl8723cs/Bluetooth-hci_h5-Add-support-for-binding-RTL8723CS-with-device-.patch similarity index 100% rename from patch/misc/wireless-rtl8723cs/Bluetooth-hci_h5-Add-support-for-binding-RTL8723CS-with-device-.patch rename to patch/misc/bluetooth-rtl8723cs/Bluetooth-hci_h5-Add-support-for-binding-RTL8723CS-with-device-.patch diff --git a/patch/misc/wireless-rtl8723cs/bluetooth-btrtl-add-rtl8703bs.patch b/patch/misc/bluetooth-rtl8723cs/bluetooth-btrtl-add-rtl8703bs.patch similarity index 96% rename from patch/misc/wireless-rtl8723cs/bluetooth-btrtl-add-rtl8703bs.patch rename to patch/misc/bluetooth-rtl8723cs/bluetooth-btrtl-add-rtl8703bs.patch index 474db44ec3..2bad4e014e 100644 --- a/patch/misc/wireless-rtl8723cs/bluetooth-btrtl-add-rtl8703bs.patch +++ b/patch/misc/bluetooth-rtl8723cs/bluetooth-btrtl-add-rtl8703bs.patch @@ -31,7 +31,7 @@ index ad4085eede4..2c227bf4e00 100644 + .hci_bus = HCI_UART, + .config_needed = true, + .has_rom_version = true, -+ .fw_name = "rtl_bt/rtl8723cs_xx_fw.bin", ++ .fw_name = "rtl_bt/rtl8723cs_xx_fw", + .cfg_name = "rtl_bt/rtl8723cs_xx_config" }, + /* 8723D */ diff --git a/patch/misc/wireless-rtl8723cs/bluetooth-btrtl-quirk-local-ext-features.patch b/patch/misc/bluetooth-rtl8723cs/bluetooth-btrtl-quirk-local-ext-features.patch similarity index 100% rename from patch/misc/wireless-rtl8723cs/bluetooth-btrtl-quirk-local-ext-features.patch rename to patch/misc/bluetooth-rtl8723cs/bluetooth-btrtl-quirk-local-ext-features.patch diff --git a/patch/misc/wireless-rtl8723cs/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch b/patch/misc/bluetooth-rtl8723cs/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch similarity index 100% rename from patch/misc/wireless-rtl8723cs/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch rename to patch/misc/bluetooth-rtl8723cs/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch diff --git a/patch/misc/wireless-rtl8723cs/dt-bindings-net-bluetooth-Add-rtl8723bs-bluetooth.patch b/patch/misc/bluetooth-rtl8723cs/dt-bindings-net-bluetooth-Add-rtl8723bs-bluetooth.patch similarity index 100% rename from patch/misc/wireless-rtl8723cs/dt-bindings-net-bluetooth-Add-rtl8723bs-bluetooth.patch rename to patch/misc/bluetooth-rtl8723cs/dt-bindings-net-bluetooth-Add-rtl8723bs-bluetooth.patch