Skip to content

Commit

Permalink
[nrf noup] Bluetooth: Mesh: Disable processing of ext ADV packets
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Balaklaka authored and rlubos committed Nov 22, 2024
1 parent 2f9a65d commit f4cb303
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions subsys/bluetooth/mesh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,17 @@ config BT_MESH_ADV_EXT_FRIEND_SEPARATE
messages as close to the start of the ReceiveWindow as possible,
thus reducing the scanning time on the Low Power node.

config BT_MESH_ADV_EXT_ACCEPT_EXT_ADV_PACKETS
bool "Reject or accept extended advertising packets"
depends on BT_LL_SOFTDEVICE
help
Configure the scanner and initiator to either reject or accept extended
advertising packets by the SoftDevice Controller. This is set to false
by default, to prevent loss of scan time when receiving a pointer packet
while scanning for Bluetooth Mesh packets. Set to true if extended
advertising packets are to be received by the SoftDevice Controller for
purposes other than Bluetooth Mesh.

endif # BT_MESH_ADV_EXT

endchoice
Expand Down
12 changes: 12 additions & 0 deletions subsys/bluetooth/mesh/adv_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,18 @@ void bt_mesh_adv_init(void)
K_PRIO_COOP(MESH_WORKQ_PRIORITY), NULL);
k_thread_name_set(&bt_mesh_workq.thread, "BT MESH WQ");
}

#if defined(CONFIG_BT_LL_SOFTDEVICE)
const sdc_hci_cmd_vs_scan_accept_ext_adv_packets_set_t cmd_params = {
.accept_ext_adv_packets = IS_ENABLED(CONFIG_BT_MESH_ADV_EXT_ACCEPT_EXT_ADV_PACKETS),
};

int err = sdc_hci_cmd_vs_scan_accept_ext_adv_packets_set(&cmd_params);

if (err) {
LOG_ERR("Failed to set accept_ext_adv_packets: %d", err);
}
#endif
}

static struct bt_mesh_ext_adv *adv_instance_find(struct bt_le_ext_adv *instance)
Expand Down

0 comments on commit f4cb303

Please sign in to comment.