All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stotland, Inga" <inga.stotland@intel.com>
To: "a.rai@samsung.com" <a.rai@samsung.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>
Cc: "anupam.r@samsung.com" <anupam.r@samsung.com>,
	"sachin.dev@samsung.com" <sachin.dev@samsung.com>
Subject: Re: [PATCH v3] Mesh: add 'node-reset' command
Date: Tue, 20 Mar 2018 15:11:48 +0000	[thread overview]
Message-ID: <1521558707.3681.6.camel@intel.com> (raw)
In-Reply-To: <1521445336-15582-1-git-send-email-a.rai@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 1767 bytes --]

Hi Atul,

On Mon, 2018-03-19 at 13:12 +0530, Atul Rai wrote:
> This patch adds 'node-reset' command which can be used to reset a
> node (other than a Provisioner) and remove it from the network.
> ---
>  mesh/config-client.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/mesh/config-client.c b/mesh/config-client.c
> index 19e617d..a6cd87e 100644
> --- a/mesh/config-client.c
> +++ b/mesh/config-client.c
> @@ -342,6 +342,17 @@ static bool client_msg_recvd(uint16_t src,
> uint8_t *data,
>  		bt_shell_printf("Min Hops\t%2.2x\n", data[7]);
>  		bt_shell_printf("Max Hops\t%2.2x\n", data[8]);
>  		break;
> +
> +	/* Per Mesh Profile 4.3.2.54 */
> +	case OP_NODE_RESET_STATUS:
> +		bt_shell_printf("Node %4.4x reset status %s\n",
> +				src, mesh_status_str(data[0]));
> +
> +		net_release_address(node_get_primary(node),
> +				(node_get_num_elements(node)));
> +		/* TODO: Remove node info from database */
> +		node_free(node);
> +		break;
>  	}
>  
>  	return true;
> @@ -1124,6 +1135,11 @@ static void cmd_ttl_get(int argc, char
> *argv[])
>  	cmd_default(OP_CONFIG_DEFAULT_TTL_GET);
>  }
>  
> +static void cmd_node_reset(int argc, char *argv[])
> +{
> +	cmd_default(OP_NODE_RESET);
> +}
> +
>  static const struct bt_shell_menu cfg_menu = {
>  	.name = "config",
>  	.desc = "Configuration Model Submenu",
> @@ -1179,6 +1195,8 @@ static const struct bt_shell_menu cfg_menu = {
>  				cmd_sub_add,    "Add subscription"},
>  	{"sub-get", "<ele_addr> <model id>",
>  				cmd_sub_get,    "Get subscription"},
> +	{"node-reset",		NULL,                    cmd_n
> ode_reset,
> +				"Reset a node and remove it from
> network"},
>  	{} },
>  };
>  
This looks fine.
Thanks,
Inga

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3266 bytes --]

  reply	other threads:[~2018-03-20 15:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180319074231epcas2p40d1a1ce4df102b678bf18c95af49a4c4@epcas2p4.samsung.com>
2018-03-19  7:42 ` [PATCH v3] Mesh: add 'node-reset' command Atul Rai
2018-03-20 15:11   ` Stotland, Inga [this message]
2018-03-27 13:19     ` Atul Kumar Rai
2018-03-27 14:08       ` Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1521558707.3681.6.camel@intel.com \
    --to=inga.stotland@intel.com \
    --cc=a.rai@samsung.com \
    --cc=anupam.r@samsung.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=sachin.dev@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.