From aa1771fb153d8f44216115488dab7ee7a9de60bb Mon Sep 17 00:00:00 2001 From: Mariusz Skamra Date: Thu, 21 Jul 2022 08:15:42 +0200 Subject: [PATCH] Bluetooth: shell: Remove redundant `name` parameter from adv-data cmd The `name` parameter is redundant, as the `name` and `name-ad` options are available already as `adv-create` and `adv-param` command parameters. Signed-off-by: Mariusz Skamra --- subsys/bluetooth/shell/bt.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/subsys/bluetooth/shell/bt.c b/subsys/bluetooth/shell/bt.c index 962bbff746b..cdb9519ff0a 100644 --- a/subsys/bluetooth/shell/bt.c +++ b/subsys/bluetooth/shell/bt.c @@ -1463,13 +1463,6 @@ static int cmd_adv_data(const struct shell *sh, size_t argc, char *argv[]) data[*data_len].data_len = sizeof(discov_data); data[*data_len].data = &discov_data; (*data_len)++; - } else if (!strcmp(arg, "name")) { - const char *name = bt_get_name(); - - data[*data_len].type = BT_DATA_NAME_COMPLETE; - data[*data_len].data_len = strlen(name); - data[*data_len].data = name; - (*data_len)++; } else if (!strcmp(arg, "scan-response")) { if (data == sd) { shell_print(sh, "Failed to set advertising data: " @@ -3366,7 +3359,7 @@ SHELL_STATIC_SUBCMD_SET_CREATE(bt_cmds, SHELL_CMD_ARG(adv-create, NULL, EXT_ADV_PARAM, cmd_adv_create, 2, 11), SHELL_CMD_ARG(adv-param, NULL, EXT_ADV_PARAM, cmd_adv_param, 2, 11), SHELL_CMD_ARG(adv-data, NULL, " [scan-response ] " - "", cmd_adv_data, + "", cmd_adv_data, 1, 16), SHELL_CMD_ARG(adv-start, NULL, "[timeout ] [num-events ]",