From: Wei Deng <wei.deng@oss.qualcomm.com>
To: openembedded-core@lists.openembedded.org
Cc: yoann.congal@smile.fr, cheng.jiang@oss.qualcomm.com,
shuai.zhang@oss.qualcomm.com, mengshi.wu@oss.qualcomm.com,
jinwang.li@oss.qualcomm.com, xiuzhuo.shang@oss.qualcomm.com
Subject: [PATCH 2/4] bluez5: Fix sending extra bytes with MGMT_OP_ADD_EXT_ADV_DATA
Date: Fri, 26 Jun 2026 12:12:31 +0530 [thread overview]
Message-ID: <20260626064233.704350-3-wei.deng@oss.qualcomm.com> (raw)
In-Reply-To: <20260626064233.704350-1-wei.deng@oss.qualcomm.com>
From: "xiuzhuo.shang@oss.qualcomm.com" <xiuzhuo.shang@oss.qualcomm.com>
MGMT_OP_ADD_EXT_ADV_DATA expects the command to be of struct mgmt_cp_add_ext_adv_data not mgmt_cp_add_advertising.
Signed-off-by: Xiuzhuo Shang <xiuzhuo.shang@oss.qualcomm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/recipes-connectivity/bluez5/bluez5.inc | 1 +
| 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
diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index c09a759244e..1600107b878 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -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}"
--git a/meta/recipes-connectivity/bluez5/bluez5/0001-advertising-Fix-sending-extra-bytes-with-MGMT_OP_ADD.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-advertising-Fix-sending-extra-bytes-with-MGMT_OP_ADD.patch
new file mode 100644
index 00000000000..0a737413679
--- /dev/null
+++ b/meta/recipes-connectivity/bluez5/bluez5/0001-advertising-Fix-sending-extra-bytes-with-MGMT_OP_ADD.patch
@@ -0,0 +1,33 @@
+From b16441fbb7a24325f7c7d0c5ecedc88b46ddd439 Mon Sep 17 00:00:00 2001
+From: Xiuzhuo Shang <xiuzhuo.shang@oss.qualcomm.com>
+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 <luiz.von.dentz@intel.com>
+Signed-off-by: Xiuzhuo Shang <xiuzhuo.shang@oss.qualcomm.com>
+---
+ 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
+
--
2.34.1
next prev parent reply other threads:[~2026-06-26 6:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 6:42 [PATCH 0/4] bluez5: backport fixes from master to wrynose Wei Deng
2026-06-26 6:42 ` [PATCH 1/4] bluez5: fix set volume failure Wei Deng
2026-06-26 6:42 ` Wei Deng [this message]
2026-06-26 6:42 ` [PATCH 3/4] bluez5: fix gatt cache sync issue Wei Deng
2026-06-26 6:42 ` [PATCH 4/4] bluez5: set L2CAP IMTU for OBEX profile listeners Wei Deng
2026-06-26 8:18 ` [PATCH 0/4] bluez5: backport fixes from master to wrynose Yoann Congal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260626064233.704350-3-wei.deng@oss.qualcomm.com \
--to=wei.deng@oss.qualcomm.com \
--cc=cheng.jiang@oss.qualcomm.com \
--cc=jinwang.li@oss.qualcomm.com \
--cc=mengshi.wu@oss.qualcomm.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=shuai.zhang@oss.qualcomm.com \
--cc=xiuzhuo.shang@oss.qualcomm.com \
--cc=yoann.congal@smile.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox