Linux bluetooth development
 help / color / mirror / Atom feed
From: Ville Tervo <ville.tervo@nokia.com>
To: ext Emeltchenko Andrei <Andrei.Emeltchenko.news@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH] Bluetooth: fix MTU L2CAP configuration parameter
Date: Thu, 2 Sep 2010 12:34:54 +0300	[thread overview]
Message-ID: <20100902093454.GC2041@null> (raw)
In-Reply-To: <1283343445-9328-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

On Wed, Sep 01, 2010 at 02:17:25PM +0200, ext Emeltchenko Andrei wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
> 
> When receiving L2CAP negative configuration response with respect
> to MTU parameter we modify wrong field. MTU here means proposed
> value of MTU that the remote device intends to transmit. So for local
> L2CAP socket it is pi->imtu.
> 

Yes imtu is negotiated in this phase.

> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>

Acked-by: Ville Tervo <ville.tervo@nokia.com>

> ---
>  net/bluetooth/l2cap.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
> index c784703..9fad312 100644
> --- a/net/bluetooth/l2cap.c
> +++ b/net/bluetooth/l2cap.c
> @@ -2771,10 +2771,10 @@ static int l2cap_parse_conf_rsp(struct sock *sk, void *rsp, int len, void *data,
>  		case L2CAP_CONF_MTU:
>  			if (val < L2CAP_DEFAULT_MIN_MTU) {
>  				*result = L2CAP_CONF_UNACCEPT;
> -				pi->omtu = L2CAP_DEFAULT_MIN_MTU;
> +				pi->imtu = L2CAP_DEFAULT_MIN_MTU;
>  			} else
> -				pi->omtu = val;
> -			l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->omtu);
> +				pi->imtu = val;
> +			l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu);
>  			break;
>  
>  		case L2CAP_CONF_FLUSH_TO:
> -- 
> 1.7.0.4


-- 
Ville

  reply	other threads:[~2010-09-02  9:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01 12:17 [PATCH] Bluetooth: fix MTU L2CAP configuration parameter Emeltchenko Andrei
2010-09-02  9:34 ` Ville Tervo [this message]
2010-09-02 19:49 ` Gustavo F. Padovan

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=20100902093454.GC2041@null \
    --to=ville.tervo@nokia.com \
    --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