From 6cc771cb0c4447fbd41747b003afe4d38000b81a Mon Sep 17 00:00:00 2001 From: Carles Cufi Date: Thu, 20 Jun 2024 15:54:36 +0200 Subject: [PATCH] Bluetooth: mesh: Remove deprecated Kconfig option The MESH_LABEL_NO_RECOVER Kconfig option was introduced as deprecated in Zephyr 3.5.0. Signed-off-by: Carles Cufi --- subsys/bluetooth/mesh/Kconfig | 15 -------------- subsys/bluetooth/mesh/access.c | 36 ---------------------------------- 2 files changed, 51 deletions(-) diff --git a/subsys/bluetooth/mesh/Kconfig b/subsys/bluetooth/mesh/Kconfig index f1714a805bb..5a941e57442 100644 --- a/subsys/bluetooth/mesh/Kconfig +++ b/subsys/bluetooth/mesh/Kconfig @@ -750,21 +750,6 @@ config BT_MESH_COMP_PST_BUF_SIZE Note that this buffer should still be large enough to restore previously stored pages after a performed device firmware update. -config BT_MESH_LABEL_NO_RECOVER - bool "[DEPRECATED] Don't recover Label UUIDs from groups address subscription list" - select DEPRECATED - depends on BT_MESH_LABEL_COUNT > 0 - help - After adding support for virtual addresses with collision (where two Label UUIDs have the - same virtual address), the format of the data in the persistent storage with the Label - UUIDs which a model is subscribed to or publishes to has been changed. The recovery - code is added and the Label UUIDs will be recovered by picking first Label UUID matching - to the virtual address in the subscription list or model publication. This options can - disable the recovery code and save some flash if the recovery is not required (e.g. - virtual address support wasn't enabled before this option was added, or the devices were - unprovisioned before upgrading to the version with this option). The option is marked as - deprecated to remove the recovery code eventually. - menuconfig BT_MESH_ACCESS_DELAYABLE_MSG bool "Access layer tx delayable message" default y diff --git a/subsys/bluetooth/mesh/access.c b/subsys/bluetooth/mesh/access.c index da04b15db73..6358f1656fb 100644 --- a/subsys/bluetooth/mesh/access.c +++ b/subsys/bluetooth/mesh/access.c @@ -1908,26 +1908,6 @@ static int mod_set_sub(const struct bt_mesh_model *mod, size_t len_rd, LOG_DBG("Decoded %zu subscribed group addresses for model", len / sizeof(mod->groups[0])); -#if !IS_ENABLED(CONFIG_BT_MESH_LABEL_NO_RECOVER) && (CONFIG_BT_MESH_LABEL_COUNT > 0) - /* If uuids[0] is NULL, then either the model is not subscribed to virtual addresses or - * uuids are not yet recovered. - */ - if (mod->uuids[0] == NULL) { - int i, j = 0; - - for (i = 0; i < mod->groups_cnt && j < CONFIG_BT_MESH_LABEL_COUNT; i++) { - if (BT_MESH_ADDR_IS_VIRTUAL(mod->groups[i])) { - /* Recover from implementation where uuid was not stored for - * virtual address. It is safe to pick first matched label because - * previously the stack wasn't able to store virtual addresses with - * collisions. - */ - mod->uuids[j] = bt_mesh_va_uuid_get(mod->groups[i], NULL, NULL); - j++; - } - } - } -#endif return 0; } @@ -1997,21 +1977,6 @@ static int mod_set_pub(const struct bt_mesh_model *mod, size_t len_rd, return 0; } - if (!IS_ENABLED(CONFIG_BT_MESH_LABEL_NO_RECOVER)) { - err = bt_mesh_settings_set(read_cb, cb_arg, &pub, sizeof(pub.base)); - if (!err) { - /* Recover from implementation where uuid was not stored for virtual - * address. It is safe to pick first matched label because previously the - * stack wasn't able to store virtual addresses with collisions. - */ - if (BT_MESH_ADDR_IS_VIRTUAL(pub.base.addr)) { - mod->pub->uuid = bt_mesh_va_uuid_get(pub.base.addr, NULL, NULL); - } - - goto pub_base_set; - } - } - err = bt_mesh_settings_set(read_cb, cb_arg, &pub, sizeof(pub)); if (err) { LOG_ERR("Failed to set \'model-pub\'"); @@ -2022,7 +1987,6 @@ static int mod_set_pub(const struct bt_mesh_model *mod, size_t len_rd, mod->pub->uuid = bt_mesh_va_get_uuid_by_idx(pub.uuidx); } -pub_base_set: mod->pub->addr = pub.base.addr; mod->pub->key = pub.base.key; mod->pub->cred = pub.base.cred;