Skip to content

Commit

Permalink
Bluetooth: Mesh: Remove dependency on BT_MESH_IV_UPDATE_TEST in shell
Browse files Browse the repository at this point in the history
Only enable the IV update commands when CONFIG_BT_MESH_IV_UPDATE_TEST
is defined.

Signed-off-by: Tobias Svehagen <[email protected]>
  • Loading branch information
tsvehagen authored and carlescufi committed Aug 22, 2019
1 parent 6f473e9 commit 9f2d364
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions subsys/bluetooth/mesh/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ static int cmd_net_send(const struct shell *shell, size_t argc, char *argv[])
return 0;
}

#if defined(CONFIG_BT_MESH_IV_UPDATE_TEST)
static int cmd_iv_update(const struct shell *shell, size_t argc, char *argv[])
{
if (bt_mesh_iv_update()) {
Expand Down Expand Up @@ -744,6 +745,7 @@ static int cmd_iv_update_test(const struct shell *shell, size_t argc,

return 0;
}
#endif /* CONFIG_BT_MESH_IV_UPDATE_TEST */

static int cmd_rpl_clear(const struct shell *shell, size_t argc, char *argv[])
{
Expand Down Expand Up @@ -1936,9 +1938,11 @@ SHELL_STATIC_SUBCMD_SET_CREATE(mesh_cmds,

/* Commands which access internal APIs, for testing only */
SHELL_CMD_ARG(net-send, NULL, "<hex string>", cmd_net_send, 2, 0),
#if defined(CONFIG_BT_MESH_IV_UPDATE_TEST)
SHELL_CMD_ARG(iv-update, NULL, NULL, cmd_iv_update, 1, 0),
SHELL_CMD_ARG(iv-update-test, NULL, "<value: off, on>",
cmd_iv_update_test, 2, 0),
#endif
SHELL_CMD_ARG(rpl-clear, NULL, NULL, cmd_rpl_clear, 1, 0),

/* Configuration Client Model operations */
Expand Down

0 comments on commit 9f2d364

Please sign in to comment.