All of lore.kernel.org
 help / color / mirror / Atom feed
* Small fix for L2CAP MTU
@ 2005-05-25 14:41 Stephen Crane
  2005-05-25 14:46 ` [Bluez-devel] " Marcel Holtmann
  2005-05-25 15:59 ` Marcel Holtmann
  0 siblings, 2 replies; 11+ messages in thread
From: Stephen Crane @ 2005-05-25 14:41 UTC (permalink / raw)
  To: bluez-devel; +Cc: marcel, jim.oleary


[-- 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 --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-05-27 18:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-25 14:41 Small fix for L2CAP MTU Stephen Crane
2005-05-25 14:46 ` [Bluez-devel] " 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

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.