Lines Matching refs:key_idx

34 	uint16_t key_idx:12,    /* AppKey or NetKey Index */  member
623 static struct key_update *cdb_key_update_find(bool app_key, uint16_t key_idx, in cdb_key_update_find() argument
644 if (update->key_idx == key_idx) { in cdb_key_update_find()
677 free_slot->key_idx = sub->net_idx; in update_cdb_subnet_settings()
710 free_slot->key_idx = key->app_idx; in update_cdb_app_key_settings()
885 int bt_mesh_cdb_subnet_key_import(struct bt_mesh_cdb_subnet *sub, int key_idx, in bt_mesh_cdb_subnet_key_import() argument
888 if (!bt_mesh_key_compare(in, &sub->keys[key_idx].net_key)) { in bt_mesh_cdb_subnet_key_import()
892 bt_mesh_key_destroy(&sub->keys[key_idx].net_key); in bt_mesh_cdb_subnet_key_import()
894 return bt_mesh_key_import(BT_MESH_KEY_TYPE_NET, in, &sub->keys[key_idx].net_key); in bt_mesh_cdb_subnet_key_import()
897 int bt_mesh_cdb_subnet_key_export(const struct bt_mesh_cdb_subnet *sub, int key_idx, in bt_mesh_cdb_subnet_key_export() argument
900 return bt_mesh_key_export(out, &sub->keys[key_idx].net_key); in bt_mesh_cdb_subnet_key_export()
1094 int bt_mesh_cdb_app_key_import(struct bt_mesh_cdb_app_key *key, int key_idx, const uint8_t in[16]) in bt_mesh_cdb_app_key_import() argument
1096 if (!bt_mesh_key_compare(in, &key->keys[key_idx].app_key)) { in bt_mesh_cdb_app_key_import()
1100 bt_mesh_key_destroy(&key->keys[key_idx].app_key); in bt_mesh_cdb_app_key_import()
1102 return bt_mesh_key_import(BT_MESH_KEY_TYPE_APP, in, &key->keys[key_idx].app_key); in bt_mesh_cdb_app_key_import()
1105 int bt_mesh_cdb_app_key_export(const struct bt_mesh_cdb_app_key *key, int key_idx, uint8_t out[16]) in bt_mesh_cdb_app_key_export() argument
1107 return bt_mesh_key_export(out, &key->keys[key_idx].app_key); in bt_mesh_cdb_app_key_export()
1189 clear_cdb_app_key(update->key_idx); in store_cdb_pending_keys()
1191 clear_cdb_subnet(update->key_idx); in store_cdb_pending_keys()
1197 key = bt_mesh_cdb_app_key_get(update->key_idx); in store_cdb_pending_keys()
1201 LOG_WRN("AppKeyIndex 0x%03x not found", update->key_idx); in store_cdb_pending_keys()
1206 sub = bt_mesh_cdb_subnet_get(update->key_idx); in store_cdb_pending_keys()
1210 LOG_WRN("NetKeyIndex 0x%03x not found", update->key_idx); in store_cdb_pending_keys()