From 548851ac7a530f20cadab680000282f1e3c697c5 Mon Sep 17 00:00:00 2001 From: Pavel Vasilyev Date: Mon, 5 Feb 2024 16:15:41 +0100 Subject: [PATCH] Bluetooth: Mesh: Fix solicitation PDU tx dep on proxy If `CONFIG_BT_MESH_GATT_SERVER` is disabled or the advertising set doesn't support proxy adv, the solicitation PDU will not be sent. However, solicitation PDU transmission doesn't depend on the proxy feature of the device it sends. Therefore, solicatation PDU should be sent regradless of `CONFIG_BT_MESH_GATT_SERVER` option and advertiser tag. Signed-off-by: Pavel Vasilyev --- subsys/bluetooth/mesh/adv_ext.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/subsys/bluetooth/mesh/adv_ext.c b/subsys/bluetooth/mesh/adv_ext.c index 592081f2773..87869023b8d 100644 --- a/subsys/bluetooth/mesh/adv_ext.c +++ b/subsys/bluetooth/mesh/adv_ext.c @@ -292,13 +292,13 @@ static void send_pending_adv(struct k_work *work) } } - if (!IS_ENABLED(CONFIG_BT_MESH_GATT_SERVER) || - !(ext_adv->tags & BT_MESH_ADV_TAG_BIT_PROXY)) { + if (IS_ENABLED(CONFIG_BT_MESH_PROXY_SOLICITATION) && + !bt_mesh_sol_send()) { return; } - if (IS_ENABLED(CONFIG_BT_MESH_PROXY_SOLICITATION) && - !bt_mesh_sol_send()) { + if (!IS_ENABLED(CONFIG_BT_MESH_GATT_SERVER) || + !(ext_adv->tags & BT_MESH_ADV_TAG_BIT_PROXY)) { return; }