Skip to content

Commit c7717f5

Browse files
committed
[nrf noup] Bluetooth: Mesh: Disable processing of ext ADV packets
Disable processing of extended ADV packets by mesh scanner. This is done to prevent loss of scan time due to reception of pointer packets while scanning for mesh packets. Signed-off-by: Ingar Kulbrandstad <[email protected]> (cherry picked from commit 378c13f) Signed-off-by: Ingar Kulbrandstad <[email protected]>
1 parent 01ba0e4 commit c7717f5

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

subsys/bluetooth/mesh/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,17 @@ config BT_MESH_ADV_EXT_FRIEND_SEPARATE
210210
messages as close to the start of the ReceiveWindow as possible,
211211
thus reducing the scanning time on the Low Power node.
212212

213+
config BT_MESH_ADV_EXT_ACCEPT_EXT_ADV_PACKETS
214+
bool "Reject or accept extended advertising packets"
215+
depends on BT_LL_SOFTDEVICE
216+
help
217+
Configure the scanner and initiator to either reject or accept extended
218+
advertising packets by the SoftDevice Controller. This is set to false
219+
by default, to prevent loss of scan time when receiving a pointer packet
220+
while scanning for Bluetooth Mesh packets. Set to true if extended
221+
advertising packets are to be received by the SoftDevice Controller for
222+
purposes other than Bluetooth Mesh.
223+
213224
endif # BT_MESH_ADV_EXT
214225

215226
endchoice

subsys/bluetooth/mesh/adv_ext.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,18 @@ void bt_mesh_adv_init(void)
478478
K_PRIO_COOP(MESH_WORKQ_PRIORITY), NULL);
479479
k_thread_name_set(&bt_mesh_workq.thread, "BT MESH WQ");
480480
}
481+
482+
#if defined(CONFIG_BT_LL_SOFTDEVICE)
483+
const sdc_hci_cmd_vs_scan_accept_ext_adv_packets_set_t cmd_params = {
484+
.accept_ext_adv_packets = IS_ENABLED(CONFIG_BT_MESH_ADV_EXT_ACCEPT_EXT_ADV_PACKETS),
485+
};
486+
487+
int err = sdc_hci_cmd_vs_scan_accept_ext_adv_packets_set(&cmd_params);
488+
489+
if (err) {
490+
LOG_ERR("Failed to set accept_ext_adv_packets: %d", err);
491+
}
492+
#endif
481493
}
482494

483495
static struct bt_mesh_ext_adv *adv_instance_find(struct bt_le_ext_adv *instance)

0 commit comments

Comments
 (0)