Lines Matching full:slot

120 			const struct bt_mesh_dfu_slot *slot,  in dist_fw_recv()  argument
129 const struct bt_mesh_dfu_slot *slot) in dist_fw_del() argument
134 const struct bt_mesh_dfu_slot *slot, in dist_fw_send() argument
443 LOG_WRN("Reserving slot failed"); in slot_reserve_and_set()
462 static bool slot_add(const struct bt_mesh_dfu_slot **slot) in slot_add() argument
482 if (slot) { in slot_add()
483 *slot = new_slot; in slot_add()
596 struct bt_mesh_dfu_slot *slot[CONFIG_BT_MESH_DFU_SLOT_CNT]; in test_dist_dfu_slot_create() local
614 slot[i] = slot_reserve_and_set(size, fwid, fwid_len, metadata, metadata_len); in test_dist_dfu_slot_create()
616 ASSERT_FALSE_MSG(slot[i] == NULL, "Failed to add slot\n"); in test_dist_dfu_slot_create()
619 /* All but first slot are committed */ in test_dist_dfu_slot_create()
620 err = bt_mesh_dfu_slot_commit(slot[i]); in test_dist_dfu_slot_create()
622 FAIL("Committing slot failed (err %d)", err); in test_dist_dfu_slot_create()
627 /* Second slot is deleted */ in test_dist_dfu_slot_create()
628 err = bt_mesh_dfu_slot_del(slot[1]); in test_dist_dfu_slot_create()
630 FAIL("Slot delete failed (err %d)", err); in test_dist_dfu_slot_create()
636 enum bt_mesh_dfu_iter check_slot(const struct bt_mesh_dfu_slot *slot, void *data) in check_slot() argument
643 int idx = bt_mesh_dfu_slot_img_idx_get(slot); in check_slot()
647 ASSERT_EQUAL(size, slot->size); in check_slot()
650 ASSERT_EQUAL(fwid_len, slot->fwid_len); in check_slot()
651 ASSERT_TRUE(memcmp(fwid, slot->fwid, fwid_len) == 0); in check_slot()
654 ASSERT_EQUAL(metadata_len, slot->metadata_len); in check_slot()
655 ASSERT_TRUE(memcmp(metadata, slot->metadata, metadata_len) == 0); in check_slot()
663 struct bt_mesh_dfu_slot *slot; in test_dist_dfu_slot_create_recover() local
683 idx = bt_mesh_dfu_slot_get(fwid, fwid_len, &slot); in test_dist_dfu_slot_create_recover()
685 ASSERT_EQUAL(size, slot->size); in test_dist_dfu_slot_create_recover()
688 ASSERT_EQUAL(metadata_len, slot->metadata_len); in test_dist_dfu_slot_create_recover()
689 ASSERT_TRUE(memcmp(metadata, slot->metadata, metadata_len) == 0); in test_dist_dfu_slot_create_recover()
698 const struct bt_mesh_dfu_slot *slot; in check_delete_all() local
708 slot = bt_mesh_dfu_slot_at(i); in check_delete_all()
709 ASSERT_TRUE(slot == NULL); in check_delete_all()
764 struct bt_mesh_dfu_slot *slot; in test_dist_dfu_slot_idempotency() local
773 slot = bt_mesh_dfu_slot_reserve(); in test_dist_dfu_slot_idempotency()
774 ASSERT_TRUE(slot != NULL); in test_dist_dfu_slot_idempotency()
776 bt_mesh_dfu_slot_release(slot); in test_dist_dfu_slot_idempotency()
777 bt_mesh_dfu_slot_release(slot); in test_dist_dfu_slot_idempotency()
779 slot = bt_mesh_dfu_slot_reserve(); in test_dist_dfu_slot_idempotency()
780 ASSERT_TRUE(slot != NULL); in test_dist_dfu_slot_idempotency()
782 ASSERT_EQUAL(0, bt_mesh_dfu_slot_fwid_set(slot, fwid, fwid_len)); in test_dist_dfu_slot_idempotency()
783 ASSERT_EQUAL(0, bt_mesh_dfu_slot_info_set(slot, 100, NULL, 0)); in test_dist_dfu_slot_idempotency()
785 ASSERT_EQUAL(0, bt_mesh_dfu_slot_commit(slot)); in test_dist_dfu_slot_idempotency()
786 ASSERT_EQUAL(-EINVAL, bt_mesh_dfu_slot_commit(slot)); in test_dist_dfu_slot_idempotency()
788 ASSERT_EQUAL(0, bt_mesh_dfu_slot_del(slot)); in test_dist_dfu_slot_idempotency()
789 ASSERT_EQUAL(-EINVAL, bt_mesh_dfu_slot_del(slot)); in test_dist_dfu_slot_idempotency()
957 const struct bt_mesh_dfu_slot *slot; in cli_common_fail_on_init() local
963 ASSERT_TRUE(slot_add(&slot)); in cli_common_fail_on_init()
967 dfu_cli_xfer.xfer.slot = slot; in cli_common_fail_on_init()
973 struct bt_mesh_dfu_slot *slot; in cli_common_init_recover() local
980 ASSERT_TRUE(bt_mesh_dfu_slot_get(fwid, fwid_len, &slot) >= 0); in cli_common_init_recover()
984 dfu_cli_xfer.xfer.slot = slot; in cli_common_init_recover()
1287 dfu_cli.xfer.slot = dfu_cli_xfer.xfer.slot; in test_cli_stop()
1652 "Distributor checks that the DFU slot APIs are idempotent"),