diff options
author | Scott B | 2022-01-29 12:29:58 -0800 |
---|---|---|
committer | Scott B | 2022-01-29 12:32:52 -0800 |
commit | 372a7991ad6c80b212e751607df40d599ff87819 (patch) | |
tree | cfd2cc020dd08c797aaa61736bf01cb849b683a9 | |
parent | f64eb47f50b21c5653e5ab9eb13eecfccef679f0 (diff) | |
download | aur-372a7991ad6c80b212e751607df40d599ff87819.tar.gz |
patch: Arch bluetooth hotfixes
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | Bluetooth-Read-codec-capabilities-only-if-supported.patch | 56 | ||||
-rw-r--r-- | Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch | 14 | ||||
-rw-r--r-- | PKGBUILD | 4 |
4 files changed, 70 insertions, 8 deletions
@@ -21,6 +21,7 @@ pkgbase = linux-xanmod-rog source = https://github.com/xanmod/linux/releases/download/5.16.3-xanmod1/patch-5.16.3-xanmod1.xz source = choose-gcc-optimization.sh source = Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch + source = Bluetooth-Read-codec-capabilities-only-if-supported.patch source = UDP-IPv6-Optimizations-from-5.17-partial.patch source = acpi-battery-Always-read-fresh-battery-state-on-update.patch source = cfg80211-dont-WARN-if-a-self-managed-device.patch @@ -40,7 +41,8 @@ pkgbase = linux-xanmod-rog sha256sums = SKIP sha256sums = 188e5f155f1dd66d5c636b725ee6b9c312f4aa2bdc866ce5ff5b3f2de1101cda sha256sums = 278118011d7a2eeca9971ac97b31bf0c55ab55e99c662ab9ae4717b55819c9a2 - sha256sums = 802e9f8d5c98088946b8ad5629e0732350b4b0fd91c24e12af31935791fcd556 + sha256sums = 241f01f06849fcec462d72355ca3ab6bd34931731dec89876d785912ac532398 + sha256sums = dd01bd3f774c3a9af42b6d89f534f39c4a5f200db32cd6d4b72a29325645100e sha256sums = 41b0cef536675f10fdfb69eeca2f1927653c69eb351dd92f4085ab6590485851 sha256sums = f7a4bf6293912bfc4a20743e58a5a266be8c4dbe3c1862d196d3a3b45f2f7c90 sha256sums = 3d8961438b5c8110588ff0b881d472fc71a4304d306808d78a4055a4150f351e diff --git a/Bluetooth-Read-codec-capabilities-only-if-supported.patch b/Bluetooth-Read-codec-capabilities-only-if-supported.patch new file mode 100644 index 000000000000..062149a01337 --- /dev/null +++ b/Bluetooth-Read-codec-capabilities-only-if-supported.patch @@ -0,0 +1,56 @@ +From 3c21dd2525afbdb91db755e8b6d6a9636fffa80f Mon Sep 17 00:00:00 2001 +From: Kiran K <kiran.k@intel.com> +Date: Tue, 5 Oct 2021 20:15:56 +0530 +Subject: [PATCH 3/3] Bluetooth: Read codec capabilities only if supported + +Read codec capabilities only if HCI_READ_LOCAL_CODEC_CAPABILITIES +command is supported. If capablities are not supported, then +cache codec data without caps. + +Signed-off-by: Kiran K <kiran.k@intel.com> +Signed-off-by: Marcel Holtmann <marcel@holtmann.org> +For: https://bugs.archlinux.org/task/73454 +--- + net/bluetooth/hci_codec.c | 18 ++++++++++++++++-- + 1 file changed, 16 insertions(+), 2 deletions(-) + +diff --git a/net/bluetooth/hci_codec.c b/net/bluetooth/hci_codec.c +index f0421d0edaa3..38201532f58e 100644 +--- a/net/bluetooth/hci_codec.c ++++ b/net/bluetooth/hci_codec.c +@@ -25,9 +25,11 @@ static int hci_codec_list_add(struct list_head *list, + } + entry->transport = sent->transport; + entry->len = len; +- entry->num_caps = rp->num_caps; +- if (rp->num_caps) ++ entry->num_caps = 0; ++ if (rp) { ++ entry->num_caps = rp->num_caps; + memcpy(entry->caps, caps, len); ++ } + list_add(&entry->list, list); + + return 0; +@@ -58,6 +60,18 @@ static void hci_read_codec_capabilities(struct hci_dev *hdev, __u8 transport, + __u32 len; + + cmd->transport = i; ++ ++ /* If Read_Codec_Capabilities command is not supported ++ * then just add codec to the list without caps ++ */ ++ if (!(hdev->commands[45] & 0x08)) { ++ hci_dev_lock(hdev); ++ hci_codec_list_add(&hdev->local_codecs, cmd, ++ NULL, NULL, 0); ++ hci_dev_unlock(hdev); ++ continue; ++ } ++ + skb = __hci_cmd_sync(hdev, HCI_OP_READ_LOCAL_CODEC_CAPS, + sizeof(*cmd), cmd, + HCI_CMD_TIMEOUT); +-- +2.35.0 + diff --git a/Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch b/Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch index 469213c9bb85..67ec57c5a511 100644 --- a/Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch +++ b/Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch @@ -1,7 +1,7 @@ -From 79a6a06eaac891858a2f41a6a63d75c7d00cbf04 Mon Sep 17 00:00:00 2001 +From 4e694320c993c1172cacce8add0735cc228d2231 Mon Sep 17 00:00:00 2001 From: Kiran K <kiran.k@intel.com> Date: Wed, 13 Oct 2021 13:35:11 +0530 -Subject: [PATCH 3/3] Bluetooth: btintel: Fix bdaddress comparison with garbage +Subject: [PATCH 2/3] Bluetooth: btintel: Fix bdaddress comparison with garbage value Intel Read Verision(TLV) data is parsed into a local structure variable @@ -11,15 +11,17 @@ only if controller is present in boot loader mode. Signed-off-by: Kiran K <kiran.k@intel.com> Reviewed-by: Tedd Ho-Jeong An <tedd.an@intel.com> +Signed-off-by: Marcel Holtmann <marcel@holtmann.org> +(cherry picked from commit 893505319c74cf3faa45a5ed9d5338ff03b66949) --- drivers/bluetooth/btintel.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c -index f1705b46fc88..b9055a3e61ed 100644 +index 851a0c9b8fae..1a4f8b227eac 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c -@@ -2006,14 +2006,16 @@ static int btintel_prepare_fw_download_tlv(struct hci_dev *hdev, +@@ -2081,14 +2081,16 @@ static int btintel_prepare_fw_download_tlv(struct hci_dev *hdev, if (ver->img_type == 0x03) { btintel_clear_flag(hdev, INTEL_BOOTLOADER); btintel_check_bdaddr(hdev); @@ -44,7 +46,7 @@ index f1705b46fc88..b9055a3e61ed 100644 } btintel_get_fw_name_tlv(ver, fwname, sizeof(fwname), "sfi"); -@@ -2303,6 +2305,10 @@ static int btintel_setup_combined(struct hci_dev *hdev) +@@ -2467,6 +2469,10 @@ static int btintel_setup_combined(struct hci_dev *hdev) goto exit_error; } @@ -56,5 +58,5 @@ index f1705b46fc88..b9055a3e61ed 100644 err = btintel_parse_version_tlv(hdev, &ver_tlv, skb); if (err) { -- -2.34.1 +2.35.0 @@ -110,6 +110,7 @@ source=("https://cdn.kernel.org/pub/linux/kernel/v${_branch}/linux-${_major}.tar # Arch: misc hotfixes "Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch" + "Bluetooth-Read-codec-capabilities-only-if-supported.patch" # amd-pstate included in Xanmod # multigenerational lru included in Xanmod @@ -153,7 +154,8 @@ sha256sums=('027d7e8988bb69ac12ee92406c3be1fe13f990b1ca2249e226225cd1573308bb' 'SKIP' '188e5f155f1dd66d5c636b725ee6b9c312f4aa2bdc866ce5ff5b3f2de1101cda' '278118011d7a2eeca9971ac97b31bf0c55ab55e99c662ab9ae4717b55819c9a2' - '802e9f8d5c98088946b8ad5629e0732350b4b0fd91c24e12af31935791fcd556' + '241f01f06849fcec462d72355ca3ab6bd34931731dec89876d785912ac532398' + 'dd01bd3f774c3a9af42b6d89f534f39c4a5f200db32cd6d4b72a29325645100e' '41b0cef536675f10fdfb69eeca2f1927653c69eb351dd92f4085ab6590485851' 'f7a4bf6293912bfc4a20743e58a5a266be8c4dbe3c1862d196d3a3b45f2f7c90' '3d8961438b5c8110588ff0b881d472fc71a4304d306808d78a4055a4150f351e' |