From fb9ccce37a5874af7189598866313b8e0458c9cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 31 Oct 2024 01:40:13 -0300 Subject: [PATCH] monolith: remove bluetooth dongle patch --- hosts/monolith/default.nix | 8 +--- ...b-Fix-regression-with-CSR-controllers.diff | 24 ---------- pkgs/default.nix | 1 - pkgs/linux-bluetooth.nix | 47 ------------------- 4 files changed, 1 insertion(+), 79 deletions(-) delete mode 100644 patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff delete mode 100644 pkgs/linux-bluetooth.nix diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index 8aa63b8..f4fde3a 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -39,13 +39,7 @@ in boot.kernelPackages = pkgs.linuxPackages_latest; - boot.extraModulePackages = with config.boot.kernelPackages; [ - zenpower - (pkgs.linux-bluetooth.override { - kernel = config.boot.kernelPackages.kernel; - patches = [ ../../patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff ]; - }) - ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ diff --git a/patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff b/patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff deleted file mode 100644 index ae1adeb..0000000 --- a/patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c -index c0b6ef8ee5da..f72218c1037e 100644 ---- a/drivers/bluetooth/btusb.c -+++ b/drivers/bluetooth/btusb.c -@@ -1366,10 +1366,15 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags) - if (!urb) - return -ENOMEM; - -- /* Use maximum HCI Event size so the USB stack handles -- * ZPL/short-transfer automatically. -- */ -- size = HCI_MAX_EVENT_SIZE; -+ if (le16_to_cpu(data->udev->descriptor.idVendor) == 0x0a12 && -+ le16_to_cpu(data->udev->descriptor.idProduct) == 0x0001) -+ /* Fake CSR devices don't seem to support sort-transter */ -+ size = le16_to_cpu(data->intr_ep->wMaxPacketSize); -+ else -+ /* Use maximum HCI Event size so the USB stack handles -+ * ZPL/short-transfer automatically. -+ */ -+ size = HCI_MAX_EVENT_SIZE; - - buf = kmalloc(size, mem_flags); - if (!buf) { diff --git a/pkgs/default.nix b/pkgs/default.nix index 530d1cb..b3f1b79 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -8,5 +8,4 @@ rec { emmet-cli = pkgs.callPackage ./emmet-cli.nix { }; material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { }; gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.nix { }; - linux-bluetooth = pkgs.callPackage ./linux-bluetooth.nix { }; } diff --git a/pkgs/linux-bluetooth.nix b/pkgs/linux-bluetooth.nix deleted file mode 100644 index 609e775..0000000 --- a/pkgs/linux-bluetooth.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - pkgs, - lib, - kernel ? pkgs.linuxPackages_latest.kernel, - patches ? [ ], -}: - -pkgs.stdenv.mkDerivation { - pname = "bluetooth-kernel-module"; - inherit (kernel) - src - version - postPatch - nativeBuildInputs - ; - - inherit patches; - - kernel_dev = kernel.dev; - kernelVersion = kernel.modDirVersion; - - modulePath = "drivers/bluetooth"; - - buildPhase = '' - BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build - - cp $BUILT_KERNEL/Module.symvers . - cp $BUILT_KERNEL/.config . - cp $kernel_dev/vmlinux . - - make "-j$NIX_BUILD_CORES" modules_prepare - make "-j$NIX_BUILD_CORES" M=$modulePath modules - ''; - - installPhase = '' - make \ - INSTALL_MOD_PATH="$out" \ - XZ="xz -T$NIX_BUILD_CORES" \ - M="$modulePath" \ - modules_install - ''; - - meta = { - description = "Bluetooth kernel module"; - license = lib.licenses.gpl3; - }; -}