Skip to content

Commit bc11d5d

Browse files
Balaklakarlubos
authored andcommitted
[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 542b335)
1 parent 63f0fae commit bc11d5d

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
@@ -214,6 +214,17 @@ config BT_MESH_ADV_EXT_FRIEND_SEPARATE
214214
messages as close to the start of the ReceiveWindow as possible,
215215
thus reducing the scanning time on the Low Power node.
216216

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

219230
endchoice

subsys/bluetooth/mesh/adv_ext.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,18 @@ void bt_mesh_adv_init(void)
519519
K_PRIO_COOP(MESH_WORKQ_PRIORITY), NULL);
520520
k_thread_name_set(&bt_mesh_workq.thread, "BT MESH WQ");
521521
}
522+
523+
#if defined(CONFIG_BT_LL_SOFTDEVICE)
524+
const sdc_hci_cmd_vs_scan_accept_ext_adv_packets_set_t cmd_params = {
525+
.accept_ext_adv_packets = IS_ENABLED(CONFIG_BT_MESH_ADV_EXT_ACCEPT_EXT_ADV_PACKETS),
526+
};
527+
528+
int err = sdc_hci_cmd_vs_scan_accept_ext_adv_packets_set(&cmd_params);
529+
530+
if (err) {
531+
LOG_ERR("Failed to set accept_ext_adv_packets: %d", err);
532+
}
533+
#endif
522534
}
523535

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

0 commit comments

Comments
 (0)