Lines Matching refs:bt_mesh
55 if (!atomic_test_bit(bt_mesh.flags, BT_MESH_INIT)) { in bt_mesh_provision()
65 if (atomic_test_and_set_bit(bt_mesh.flags, BT_MESH_VALID)) { in bt_mesh_provision()
77 atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID); in bt_mesh_provision()
84 atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID); in bt_mesh_provision()
93 atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID); in bt_mesh_provision()
145 atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID); in bt_mesh_provision()
151 bt_mesh.seq = 0U; in bt_mesh_provision()
155 memcpy(&bt_mesh.dev_key, &mesh_dev_key, sizeof(struct bt_mesh_key)); in bt_mesh_provision()
188 bt_hex(&bt_mesh.dev_key_cand, sizeof(struct bt_mesh_key))); in bt_mesh_reprovision()
191 bt_mesh.seq = 0U; in bt_mesh_reprovision()
219 err = bt_mesh_key_import(BT_MESH_KEY_TYPE_DEV, key, &bt_mesh.dev_key_cand); in bt_mesh_dev_key_cand()
225 atomic_set_bit(bt_mesh.flags, BT_MESH_DEVKEY_CAND); in bt_mesh_dev_key_cand()
234 if (!atomic_test_and_clear_bit(bt_mesh.flags, BT_MESH_DEVKEY_CAND)) { in bt_mesh_dev_key_cand_remove()
247 if (!atomic_test_and_clear_bit(bt_mesh.flags, BT_MESH_DEVKEY_CAND)) { in bt_mesh_dev_key_cand_activate()
251 bt_mesh_key_destroy(&bt_mesh.dev_key); in bt_mesh_dev_key_cand_activate()
252 memcpy(&bt_mesh.dev_key, &bt_mesh.dev_key_cand, sizeof(struct bt_mesh_key)); in bt_mesh_dev_key_cand_activate()
253 memset(&bt_mesh.dev_key_cand, 0, sizeof(struct bt_mesh_key)); in bt_mesh_dev_key_cand_activate()
267 if (!atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) { in bt_mesh_provision_adv()
287 if (!atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) { in bt_mesh_provision_gatt()
308 if (!atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) { in bt_mesh_provision_remote()
328 if (!atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) { in bt_mesh_reprovision_remote()
342 if (!atomic_test_bit(bt_mesh.flags, BT_MESH_VALID) || in bt_mesh_reset()
343 !atomic_test_bit(bt_mesh.flags, BT_MESH_INIT)) { in bt_mesh_reset()
347 bt_mesh.iv_index = 0U; in bt_mesh_reset()
348 bt_mesh.ivu_duration = 0; in bt_mesh_reset()
349 bt_mesh.seq = 0U; in bt_mesh_reset()
351 memset(bt_mesh.flags, 0, sizeof(bt_mesh.flags)); in bt_mesh_reset()
352 atomic_set_bit(bt_mesh.flags, BT_MESH_INIT); in bt_mesh_reset()
360 (void)k_work_cancel_delayable(&bt_mesh.ivu_timer); in bt_mesh_reset()
397 bt_mesh_key_destroy(&bt_mesh.dev_key); in bt_mesh_reset()
398 memset(&bt_mesh.dev_key, 0, sizeof(bt_mesh.dev_key)); in bt_mesh_reset()
419 return atomic_test_bit(bt_mesh.flags, BT_MESH_VALID); in bt_mesh_is_provisioned()
438 if (!atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) { in bt_mesh_suspend()
442 if (atomic_test_and_set_bit(bt_mesh.flags, BT_MESH_SUSPENDED)) { in bt_mesh_suspend()
448 atomic_clear_bit(bt_mesh.flags, BT_MESH_SUSPENDED); in bt_mesh_suspend()
483 atomic_clear_bit(bt_mesh.flags, BT_MESH_SUSPENDED); in bt_mesh_suspend()
508 if (!atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) { in bt_mesh_resume()
512 if (!atomic_test_and_clear_bit(bt_mesh.flags, BT_MESH_SUSPENDED)) { in bt_mesh_resume()
522 atomic_set_bit(bt_mesh.flags, BT_MESH_SUSPENDED); in bt_mesh_resume()
530 atomic_set_bit(bt_mesh.flags, BT_MESH_SUSPENDED); in bt_mesh_resume()
568 if (atomic_test_and_set_bit(bt_mesh.flags, BT_MESH_INIT)) { in bt_mesh_init()