linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Gix <bgix@codeaurora.org>
To: Bruna Moreira <bruna.moreira@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Fix MTU value used on MTU exchange response
Date: Thu, 24 Feb 2011 13:43:35 -0800	[thread overview]
Message-ID: <4D66D107.9000305@codeaurora.org> (raw)
In-Reply-To: <1298583454-18227-1-git-send-email-bruna.moreira@openbossa.org>

On 2/24/2011 1:37 PM, Bruna Moreira wrote:
> The new MTU value only should be applied in server side after sending
> the ATT_MTU_RESP so encode the response using the old MTU value.
> ---
>   src/attrib-server.c |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/src/attrib-server.c b/src/attrib-server.c
> index 62c10f4..9de4c81 100644
> --- a/src/attrib-server.c
> +++ b/src/attrib-server.c
> @@ -773,9 +773,11 @@ static uint16_t write_value(struct gatt_channel *channel, uint16_t handle,
>   static uint16_t mtu_exchange(struct gatt_channel *channel, uint16_t mtu,
>   		uint8_t *pdu, int len)
>   {
> +	guint old_mtu = channel->mtu;
> +
>   	channel->mtu = MIN(mtu, channel->mtu);
>
> -	return enc_mtu_resp(channel->mtu, pdu, len);
> +	return enc_mtu_resp(old_mtu, pdu, len);
>   }
>
>   static void channel_disconnect(void *user_data)


I don't think this is correct.  The change has us replying with our old 
MTU.  What part of the specification justifies this change?

-- 
Brian Gix
bgix@codeaurora.org
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

  reply	other threads:[~2011-02-24 21:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24 21:37 [PATCH] Fix MTU value used on MTU exchange response Bruna Moreira
2011-02-24 21:43 ` Brian Gix [this message]
2011-02-24 21:58   ` Bruna Moreira
2011-02-24 22:06     ` Brian Gix
2011-03-02 16:34 ` [PATCHv2 1/2] Use CID to infer transport type Bruna Moreira
2011-03-04 19:32   ` Bruna Moreira
2011-03-02 16:34 ` [PATCHv2 2/2] Fix MTU value used on MTU exchange response Bruna Moreira
2011-03-04 20:17   ` [PATCHv3 1/2] Use CID to infer transport type Bruna Moreira
2011-03-10  9:09     ` Johan Hedberg
2011-03-04 20:17   ` [PATCHv3 2/2] Fix MTU value used on MTU exchange response Bruna Moreira

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=4D66D107.9000305@codeaurora.org \
    --to=bgix@codeaurora.org \
    --cc=bruna.moreira@openbossa.org \
    --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;
as well as URLs for NNTP newsgroup(s).