Skip to contentSkip to conversation

bluez5: backport fixes from master to wrynose

PATCH In review Wei Deng 2 participants 6 messages Jun 26

lore
Share & tools
lore

Wei Deng

author
#0 lore raw

cover bluez5: backport fixes from master to wrynose

These four patches are backports of fixes already merged in OE-core master that are missing from wrynose. The first three patches (fixes from Jinwang, Xiuzhuo and Mengshi) shift the SRC_URI context in bluez5.inc such that the fourth patch (OBEX IMTU fix) cannot be cherry-picked cleanly onto wrynose without them.

Please add to the wrynose review series.

Jinwang Li (1):
bluez5: fix set volume failure

Mengshi Wu (1):
bluez5: fix gatt cache sync issue

Wei Deng (1):
bluez5: set L2CAP IMTU for OBEX profile listeners

[email protected] (1):
bluez5: Fix sending extra bytes with MGMT_OP_ADD_EXT_ADV_DATA

 meta/recipes-connectivity/bluez5/bluez5.inc   |   4 +
 ...sending-extra-bytes-with-MGMT_OP_ADD.patch |  33 +++++
 ...2CAP-IMTU-for-OBEX-profile-listeners.patch | 118 ++++++++++++++++++
 ...x-stored-gatt-cache-DB-Hash-value-no.patch |  84 +++++++++++++
 ...t-volume-failure-with-invalid-device.patch |  46 +++++++
 5 files changed, 285 insertions(+)
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-advertising-Fix-sending-extra-bytes-with-MGMT_OP_ADD.patch
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-profile-Set-L2CAP-IMTU-for-OBEX-profile-listeners.patch
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-src-device-Fix-stored-gatt-cache-DB-Hash-value-no.patch
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-transport-Fix-set-volume-failure-with-invalid-device.patch
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 1/4 bluez5: fix set volume failure

From: Jinwang Li <[email protected]>

Backport upstream fix for AVRCP volume initialization failure when AVRCP connects before AVDTP.

Upstream-Status: Backport [bluez/bluez@121e5ca]

---
 meta/recipes-connectivity/bluez5/bluez5.inc   |  1 +
 ...t-volume-failure-with-invalid-device.patch | 46 +++++++++++++++++++
 2 files changed, 47 insertions(+)
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-transport-Fix-set-volume-failure-with-invalid-device.patch
meta/recipes-connectivity/bluez5/bluez5.inc +1 -0
index c792cc9c66c..c09a759244e 100644
@@ -71,6 +71,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
            file://0001-Revert-shared-shell-Don-t-init-input-for-non-interac.patch \
            file://0001-tools-Work-around-broken-stdin-handling-in-home-made.patch \
            file://0001-gatt-client-Fix-use-after-free-caused-by-reentrant-c.patch \
+           file://0001-transport-Fix-set-volume-failure-with-invalid-device.patch \
            "
 S = "${UNPACKDIR}/bluez-${PV}"
 
meta/recipes-connectivity/bluez5/bluez5/0001-transport-Fix-set-volume-failure-with-invalid-device.patch new file +46 -0

46 lines not on this page · raw message

Signature · 1 line
2.34.1
author
#2 lore raw

PATCH 2/4 bluez5: Fix sending extra bytes with MGMT_OP_ADD_EXT_ADV_DATA

In reply to Wei Deng

From: "[email protected]" <[email protected]>

MGMT_OP_ADD_EXT_ADV_DATA expects the command to be of struct mgmt_cp_add_ext_adv_data not mgmt_cp_add_advertising.

---
 meta/recipes-connectivity/bluez5/bluez5.inc   |  1 +
 ...sending-extra-bytes-with-MGMT_OP_ADD.patch | 33 +++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-advertising-Fix-sending-extra-bytes-with-MGMT_OP_ADD.patch
meta/recipes-connectivity/bluez5/bluez5.inc +1 -0
index c09a759244e..1600107b878 100644
@@ -72,6 +72,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
            file://0001-tools-Work-around-broken-stdin-handling-in-home-made.patch \
            file://0001-gatt-client-Fix-use-after-free-caused-by-reentrant-c.patch \
            file://0001-transport-Fix-set-volume-failure-with-invalid-device.patch \
+           file://0001-advertising-Fix-sending-extra-bytes-with-MGMT_OP_ADD.patch \
            "
 S = "${UNPACKDIR}/bluez-${PV}"
 
meta/recipes-connectivity/bluez5/bluez5/0001-advertising-Fix-sending-extra-bytes-with-MGMT_OP_ADD.patch new file +33 -0
new file mode 100644
index 00000000000..0a737413679
@@ -0,0 +1,33 @@
+From b16441fbb7a24325f7c7d0c5ecedc88b46ddd439 Mon Sep 17 00:00:00 2001
+From: Xiuzhuo Shang <[email protected]>
+Date: Thu, 4 Jun 2026 17:32:27 +0800
+Subject: [PATCH] advertising: Fix sending extra bytes with
+ MGMT_OP_ADD_EXT_ADV_DATA
+
+MGMT_OP_ADD_EXT_ADV_DATA expects the command to be of size of
+struct mgmt_cp_add_ext_adv_data not mgmt_cp_add_advertising.
+
+Upstream-Status: Backport [2a6968b40378dca5650e18e03ad0407738c47be5]
+Signed-off-by: Luiz Augusto von Dentz <[email protected]>
+Signed-off-by: Xiuzhuo Shang <[email protected]>
+---
+ src/advertising.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/advertising.c b/src/advertising.c
+index 8970e65f7..0cb37d4ae 100644
+--- a/src/advertising.c
++++ b/src/advertising.c
+@@ -1487,8 +1487,7 @@ static void add_adv_params_callback(uint8_t status, uint16_t length,
+ 		}
+ 	}
+ 
+-	param_len = sizeof(struct mgmt_cp_add_advertising) + adv_data_len +
+-							scan_rsp_len;
++	param_len = sizeof(*cp) + adv_data_len + scan_rsp_len;
+ 
+ 	cp = malloc0(param_len);
+ 	if (!cp) {
+-- 
+2.43.0
+
Signature · 1 line
2.34.1
author
#3 lore raw

PATCH 3/4 bluez5: fix gatt cache sync issue

In reply to Wei Deng

From: Mengshi Wu <[email protected]>

There is a timing issue to update DB Hash value.

The gatt_client_service_changed() callback in src/device.c is called from service_changed_complete() in gatt-client.c, which is invoked after db_hash_read_cb() has already updated the hash. Adding store_gatt_db(device) here guarantees the db is persisted with the correct, up-to-date hash for both the addition and removal cases.

Upstream-Status: Backport [bluez/bluez@0fd01e9]

---
 meta/recipes-connectivity/bluez5/bluez5.inc   |  1 +
 ...x-stored-gatt-cache-DB-Hash-value-no.patch | 84 +++++++++++++++++++
 2 files changed, 85 insertions(+)
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-src-device-Fix-stored-gatt-cache-DB-Hash-value-no.patch
meta/recipes-connectivity/bluez5/bluez5.inc +1 -0
index 1600107b878..4e51cc9a213 100644
@@ -73,6 +73,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
            file://0001-gatt-client-Fix-use-after-free-caused-by-reentrant-c.patch \
            file://0001-transport-Fix-set-volume-failure-with-invalid-device.patch \
            file://0001-advertising-Fix-sending-extra-bytes-with-MGMT_OP_ADD.patch \
+           file://0001-src-device-Fix-stored-gatt-cache-DB-Hash-value-no.patch    \
            "
 S = "${UNPACKDIR}/bluez-${PV}"
 
meta/recipes-connectivity/bluez5/bluez5/0001-src-device-Fix-stored-gatt-cache-DB-Hash-value-no.patch new file +84 -0

84 lines not on this page · raw message

Signature · 1 line
2.34.1
author
#4 lore raw

PATCH 4/4 bluez5: set L2CAP IMTU for OBEX profile listeners

In reply to Wei Deng

Backport upstream fix that adds an imtu field to default_settings for OBEX profiles (OPP, FTP, PBAP, MAS, MNS) and applies it to the L2CAP listening socket via bt_io_set(). Without this, the listening socket advertises the L2CAP minimum of 672 bytes in L2CAP_CONFIGURATION_RSP, limiting the peer's outgoing PDU size and degrading Rx throughput.

Upstream-Status: Backport [bluez/bluez@646014a]

---
 meta/recipes-connectivity/bluez5/bluez5.inc   |   1 +
 ...2CAP-IMTU-for-OBEX-profile-listeners.patch | 118 ++++++++++++++++++
 2 files changed, 119 insertions(+)
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-profile-Set-L2CAP-IMTU-for-OBEX-profile-listeners.patch
meta/recipes-connectivity/bluez5/bluez5.inc +1 -0
index 4e51cc9a213..ad07e0d3c4f 100644
@@ -74,6 +74,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
            file://0001-transport-Fix-set-volume-failure-with-invalid-device.patch \
            file://0001-advertising-Fix-sending-extra-bytes-with-MGMT_OP_ADD.patch \
            file://0001-src-device-Fix-stored-gatt-cache-DB-Hash-value-no.patch    \
+           file://0001-profile-Set-L2CAP-IMTU-for-OBEX-profile-listeners.patch \
            "
 S = "${UNPACKDIR}/bluez-${PV}"
 
meta/recipes-connectivity/bluez5/bluez5/0001-profile-Set-L2CAP-IMTU-for-OBEX-profile-listeners.patch new file +118 -0

118 lines not on this page · raw message

Signature · 1 line
2.34.1
#5 lore raw
In reply to Wei Deng
Quoted 6 lines · Wei Deng

These four patches are backports of fixes already merged in OE-core master that are missing from wrynose. The first three patches (fixes from Jinwang, Xiuzhuo and Mengshi) shift the SRC_URI context in bluez5.inc such that the fourth patch (OBEX IMTU fix) cannot be cherry-picked cleanly onto wrynose without them.
Please add to the wrynose review series.

Hello,

Since this series is for wrynose, could you resend it with [wrynose] in the patch titles?

Something like (adapted from the README suggestion):
git send-email -M -4 --to [email protected] --subject-prefix='wrynose][PATCH'

This helps a lot to avoid losing track of patches.

Thanks!

Quoted 23 lines

Jinwang Li (1):
bluez5: fix set volume failure

Mengshi Wu (1):
bluez5: fix gatt cache sync issue

Wei Deng (1):
bluez5: set L2CAP IMTU for OBEX profile listeners

[email protected] (1):
bluez5: Fix sending extra bytes with MGMT_OP_ADD_EXT_ADV_DATA

 meta/recipes-connectivity/bluez5/bluez5.inc   |   4 +
 ...sending-extra-bytes-with-MGMT_OP_ADD.patch |  33 +++++
 ...2CAP-IMTU-for-OBEX-profile-listeners.patch | 118 ++++++++++++++++++
 ...x-stored-gatt-cache-DB-Hash-value-no.patch |  84 +++++++++++++
 ...t-volume-failure-with-invalid-device.patch |  46 +++++++
 5 files changed, 285 insertions(+)
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-advertising-Fix-sending-extra-bytes-with-MGMT_OP_ADD.patch
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-profile-Set-L2CAP-IMTU-for-OBEX-profile-listeners.patch
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-src-device-Fix-stored-gatt-cache-DB-Hash-value-no.patch
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-transport-Fix-set-volume-failure-with-invalid-device.patch
Signature · 2 lines
Yoann Congal
Smile ECS