From: Szymon Janc <szymon.janc@tieto.com>
To: Gu Chaojie <chao.jie.gu@intel.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v5 2/3] shared/gatt-client:Add CSRK part to support signed write
Date: Tue, 16 Dec 2014 13:43:33 +0100 [thread overview]
Message-ID: <3207826.Qk1HKCf0LW@uw000953> (raw)
In-Reply-To: <1415351073-4362-3-git-send-email-chao.jie.gu@intel.com>
Hi Gu Chaojie,
There should be space after ":" in commit prefix.
On Friday 07 of November 2014 17:04:32 Gu Chaojie wrote:
> ---
> src/shared/gatt-client.c | 21 ++++++++++++++++-----
> src/shared/gatt-client.h | 4 ++++
> 2 files changed, 20 insertions(+), 5 deletions(-)
>
> diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
> index 8689368..0d406f5 100644
> --- a/src/shared/gatt-client.c
> +++ b/src/shared/gatt-client.c
> @@ -1987,19 +1987,20 @@ bool bt_gatt_client_read_long_value(struct bt_gatt_client *client,
> bool bt_gatt_client_write_without_response(struct bt_gatt_client *client,
> uint16_t value_handle,
> bool signed_write,
> - uint8_t *value, uint16_t length) {
> + uint8_t *value, uint16_t length)
> +{
Code style fixes should be in separate patch.
> uint8_t pdu[2 + length];
>
> if (!client)
> return 0;
>
> - /* TODO: Support this once bt_att_send supports signed writes. */
> - if (signed_write)
> - return 0;
> -
> put_le16(value_handle, pdu);
> memcpy(pdu + 2, value, length);
>
> + if (signed_write)
> + return bt_att_send(client->att, BT_ATT_OP_SIGNED_WRITE_CMD,
> + pdu, sizeof(pdu), NULL, NULL, NULL);
> +
> return bt_att_send(client->att, BT_ATT_OP_WRITE_CMD, pdu, sizeof(pdu),
> NULL, NULL, NULL);
> }
> @@ -2480,3 +2481,13 @@ bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
> client->need_notify_cleanup = true;
> return true;
> }
> +
> +bool bt_gatt_client_set_local_csrk(struct bt_gatt_client *client,
> + uint32_t local_sign_cnt,
> + uint8_t local_key[16])
> +{
> + if (!client)
> + return false;
> +
> + return bt_att_set_local_csrk(client->att, local_sign_cnt, local_key);
> +}
> diff --git a/src/shared/gatt-client.h b/src/shared/gatt-client.h
> index adccfc5..5429576 100644
> --- a/src/shared/gatt-client.h
> +++ b/src/shared/gatt-client.h
> @@ -171,3 +171,7 @@ bool bt_gatt_client_register_notify(struct bt_gatt_client *client,
> bt_gatt_client_destroy_func_t destroy);
> bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
> unsigned int id);
> +
> +bool bt_gatt_client_set_local_csrk(struct bt_gatt_client *client,
> + uint32_t local_sign_cnt,
> + uint8_t local_key[16]);
just name those sign_cnt and key.
--
Best regards,
Szymon Janc
next prev parent reply other threads:[~2014-12-16 12:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 9:04 [PATCH v5 0/3] support signed write command Gu Chaojie
2014-11-07 9:04 ` [PATCH v5 1/3] shared/att.c:Add signed command outgoing and CSRK function Gu Chaojie
2014-12-16 12:43 ` Szymon Janc
2014-11-07 9:04 ` [PATCH v5 2/3] shared/gatt-client:Add CSRK part to support signed write Gu Chaojie
2014-12-16 12:43 ` Szymon Janc [this message]
2014-11-07 9:04 ` [PATCH v5 3/3] tools/btgatt-client:Add signed write with CSRK option Gu Chaojie
2014-12-16 12:43 ` Szymon Janc
2014-12-15 16:41 ` [PATCH v5 0/3] support signed write command Arman Uguray
2015-02-17 13:24 ` Luiz Augusto von Dentz
2015-02-20 3:33 ` Gu, Chao Jie
2015-02-20 3:37 ` Arman Uguray
-- strict thread matches above, loose matches on Subject: below --
2014-11-06 6:42 Gu Chaojie
2014-11-06 6:42 ` [PATCH v5 2/3] shared/gatt-client:Add CSRK part to support signed write Gu Chaojie
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=3207826.Qk1HKCf0LW@uw000953 \
--to=szymon.janc@tieto.com \
--cc=chao.jie.gu@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox