mesh: Fix missing IVU normal mode timer when provisioning
If the network is in IV Update In Progress state when we get
provisioned we should set a timer so we eventually transition back to
Normal mode (otherwise we may end up in IVU In Progress indefinitely).
@@ -492,6 +492,12 @@ int bt_mesh_net_create(u16_t idx, u8_t flags, const u8_t key[16],
/* Set initial IV Update procedure state time-stamp */
bt_mesh.last_update = IV_UPDATE_UNKNOWN;
+ /* Set a timer to transition back to normal mode */
+ if (bt_mesh.iv_update) {
+ k_delayed_work_submit(&bt_mesh.ivu_complete,
+ IV_UPDATE_TIMEOUT);
+ }
+
/* Make sure we have valid beacon data to be sent */
bt_mesh_net_beacon_update(sub);
