zephyr/subsys/bluetooth/mesh
Pavel Vasilyev 46b78bb1d5 Bluetooth: Mesh: Stop scanner before resetting mesh
When we receive Node Reset message, we schedule work in the system
workqueue to call bt_mesh_reset(). In bt_mesh_reset() we call
bt_conn_disconnect() to disconnect proxy client. bt_conn_disconnect()
will put a buffer to a pool and call k_sem_take to let BT HCI TX thread
process this buffer. Because we stop scanner after disconnecting the
proxy, we can still receive a message at this point. Since BT RX thread
has higher priority than the system workqueue, if we receive a message
while in bt_mesh_reset(), it will be processed when we call
bt_conn_disconnect().

Stop scanner before resetting the mesh to avoid processing of a received
mesh message while in the process of resetting mesh.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-01-18 10:47:44 +01:00
..
shell Bluetooth: Mesh: Add macros to initialize bt_mesh_msg_ctx struct 2022-12-20 17:05:04 +00:00
access.c Bluetooth: Mesh: Add macros to initialize bt_mesh_msg_ctx struct 2022-12-20 17:05:04 +00:00
access.h Bluetooth: Mesh: Convert model_ackd_send and model_send to a common API 2022-10-19 16:05:16 +02:00
adv_ext.c Bluetooth: Mesh: Separate adv tag/set for friend 2023-01-16 14:40:54 +01:00
adv_legacy.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
adv.c Bluetooth: Mesh: Separate adv tag/set for friend 2023-01-16 14:40:54 +01:00
adv.h Bluetooth: Mesh: Separate adv tag/set for friend 2023-01-16 14:40:54 +01:00
app_keys.c Bluetooth: Mesh: Invalidate pending entries before calling settings API 2023-01-18 10:47:44 +01:00
app_keys.h
beacon.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
beacon.h
cdb.c Bluetooth: Mesh: Invalidate pending entries before calling settings API 2023-01-18 10:47:44 +01:00
cdb.h
cfg_cli.c Bluetooth: Mesh: Add macros to initialize bt_mesh_msg_ctx struct 2022-12-20 17:05:04 +00:00
cfg_srv.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
cfg.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
cfg.h
CMakeLists.txt Bluetooth: Mesh: Move shell.c to subfolder 2022-09-07 15:02:58 +02:00
crypto.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
crypto.h
foundation.h
friend.c Bluetooth: Mesh: Separate adv tag/set for friend 2023-01-16 14:40:54 +01:00
friend.h
gatt_cli.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
gatt_cli.h
health_cli.c Bluetooth: Mesh: Add macros to initialize bt_mesh_msg_ctx struct 2022-12-20 17:05:04 +00:00
health_srv.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
heartbeat.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
heartbeat.h
Kconfig Bluetooth: Mesh: Separate adv tag/set for friend 2023-01-16 14:40:54 +01:00
lpn.c toolchain: gcc: rename popcount to avoid conflict with C++20 2023-01-03 11:06:45 +01:00
lpn.h
main.c Bluetooth: Mesh: Stop scanner before resetting mesh 2023-01-18 10:47:44 +01:00
mesh.h doxygen: remove redundant usages of def 2022-08-09 12:29:28 +02:00
msg.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
msg.h Bluetooth: Mesh: Convert model_ackd_send and model_send to a common API 2022-10-19 16:05:16 +02:00
net.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
net.h Revert "bluetooth: mesh: Remove illegal use of NET_BUF_FRAG in friend.c" 2023-01-11 10:47:06 +00:00
pb_adv.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
pb_gatt_cli.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
pb_gatt_cli.h
pb_gatt_srv.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
pb_gatt_srv.h
pb_gatt.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
pb_gatt.h
prov_bearer.h Bluetooth: Mesh: Add prefix bt_mesh_ for global variable 2022-10-03 10:19:57 +02:00
prov_device.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
prov.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
prov.h
provisioner.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
provisioner.h
proxy_cli.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
proxy_cli.h
proxy_msg.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
proxy_msg.h Bluetooth: Mesh: Limit number of Bluetooth connections used by mesh 2022-11-25 10:45:07 +01:00
proxy_srv.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
proxy.h
rpl.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
rpl.h
settings.c Bluetooth: Mesh: Only settings load post mesh init 2022-11-25 20:02:53 +01:00
settings.h Bluetooth: Mesh: Only settings load post mesh init 2022-11-25 20:02:53 +01:00
subnet.c Bluetooth: Mesh: Invalidate pending entries before calling settings API 2023-01-18 10:47:44 +01:00
subnet.h includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
test.c Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log 2022-11-25 17:08:36 +01:00
test.h
TODO
transport.c toolchain: gcc: rename popcount to avoid conflict with C++20 2023-01-03 11:06:45 +01:00
transport.h