From: Marcel Holtmann <marcel@holtmann.org>
To: Emeltchenko Andrei <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Correct structures for AMP Assoc Read
Date: Thu, 15 Dec 2011 17:27:59 +0100 [thread overview]
Message-ID: <1323966479.1965.81.camel@aeonflux> (raw)
In-Reply-To: <1323942483-24779-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
Hi Andrei,
> Make struct names similar to kernel and remove static array since
> fragment length can be other size than HCI_MAX_NAME_LENGTH, which
> is for totally different purpose.
> ---
> lib/hci.h | 11 +++++------
> 1 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/lib/hci.h b/lib/hci.h
> index 51184ee..48692fa 100644
> --- a/lib/hci.h
> +++ b/lib/hci.h
> @@ -1382,17 +1382,16 @@ typedef struct {
> #define OCF_READ_LOCAL_AMP_ASSOC 0x000A
> typedef struct {
> uint8_t handle;
> - uint16_t length_so_far;
> - uint16_t assoc_length;
> + uint16_t len_so_far;
> + uint16_t max_len;
> } __attribute__ ((packed)) read_local_amp_assoc_cp;
> -#define READ_LOCAL_AMP_ASSOC_CP_SIZE 5
> +
> typedef struct {
> uint8_t status;
> uint8_t handle;
> - uint16_t length;
> - uint8_t fragment[HCI_MAX_NAME_LENGTH];
> + uint16_t rem_len;
> + uint8_t frag[0];
> } __attribute__ ((packed)) read_local_amp_assoc_rp;
> -#define READ_LOCAL_AMP_ASSOC_RP_SIZE 252
>
> #define OCF_WRITE_REMOTE_AMP_ASSOC 0x000B
> typedef struct {
I am fine with these changes.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
next prev parent reply other threads:[~2011-12-15 16:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 9:48 [PATCH] Correct structures for AMP Assoc Read Emeltchenko Andrei
2011-12-15 16:27 ` Marcel Holtmann [this message]
2011-12-16 8:14 ` Emeltchenko Andrei
2012-01-05 9:50 ` Emeltchenko Andrei
2012-01-05 10:40 ` Johan Hedberg
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=1323966479.1965.81.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=Andrei.Emeltchenko.news@gmail.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