On Fri Jun 26, 2026 at 11:39 AM CEST, Wei Deng wrote:
> From: Xiuzhuo Shang <[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.
>
> Signed-off-by: Xiuzhuo Shang <[email protected]>
> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
> Signed-off-by: Richard Purdie <[email protected]>
> ---
>  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
>
> 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}"
>  
> diff --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 <[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]

Hello,

For next patches, please provide a full URL when possible, that is way
easier to check.
In that case: 
https://github.com/bluez/bluez/commit/2a6968b40378dca5650e18e03ad0407738c47be5

That said, I'll proceed with the series.

Thanks!

> +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
> +


-- 
Yoann Congal
Smile ECS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#240112): 
https://lists.openembedded.org/g/openembedded-core/message/240112
Mute This Topic: https://lists.openembedded.org/mt/119987286/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to