All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Crane <steve.crane@rococosoft.com>
To: bluez-devel@lists.sourceforge.net
Cc: marcel@holtmann.org, jim.oleary@rococosoft.com
Subject: Small fix for L2CAP MTU
Date: Wed, 25 May 2005 15:41:39 +0100	[thread overview]
Message-ID: <1117032099.5854.56.camel@baroque.rococosoft.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 737 bytes --]

Hi Marcel,
I've attached a small change to the L2CAP layer which causes it to
better adhere to a sender's choice of MTU.

The background is that we have a test here where the client asks for an
omtu of 50 and tries to send more than this to the server, which in turn
checks that only 50 bytes were sent.

With the current kernel code, the omtu is always returned as the default
MTU (672) which causes our test to fail.

I've attached a patch against 2.6.11.10 (proposed by my colleague Jim
O'Leary) which assigns omtu from that proposed by the peer, iff we don't
care about the omtu.

Thanks,
Steve
-- 
Stephen Crane, Rococo Software Ltd. http://www.rococosoft.com
steve.crane@rococosoft.com +353-1-6601315 (ext 209)

[-- Attachment #1.2: l2cap.patch --]
[-- Type: text/x-patch, Size: 513 bytes --]

1359,1364c1359,1365
< 	if (pi->conf_mtu < pi->omtu) {
< 		l2cap_add_conf_opt(ptr, L2CAP_CONF_MTU, 2, pi->omtu);
< 		result = L2CAP_CONF_UNACCEPT;
< 	} else {
< 		pi->omtu = pi->conf_mtu;
< 	}
---
> 	if (pi->omtu == 0) {
> 		/* If we don't care about the MTU, use peer's proposal */
>                 pi->omtu = pi->conf_mtu;
> 	} else if (pi->conf_mtu < pi->omtu) {
>                 l2cap_add_conf_opt(ptr, L2CAP_CONF_MTU, 2, pi->omtu);
>                 result = L2CAP_CONF_UNACCEPT;
>         }

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2005-05-25 14:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-25 14:41 Stephen Crane [this message]
2005-05-25 14:46 ` [Bluez-devel] Re: Small fix for L2CAP MTU Marcel Holtmann
2005-05-25 15:02   ` Stephen Crane
2005-05-25 15:59 ` Marcel Holtmann
2005-05-26 10:13   ` Stephen Crane
2005-05-26 10:31     ` Marcel Holtmann
2005-05-26 10:45       ` [Bluez-devel] Output power Pieter De Mil
2005-05-26 10:48         ` Marcel Holtmann
2005-05-27 18:34           ` Pieter De Mil
2005-05-27 18:44             ` Marcel Holtmann
2005-05-26 13:55       ` [Bluez-devel] Re: Small fix for L2CAP MTU Stephen Crane

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=1117032099.5854.56.camel@baroque.rococosoft.com \
    --to=steve.crane@rococosoft.com \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=jim.oleary@rococosoft.com \
    --cc=marcel@holtmann.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 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.