public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] Report a bug against "l2cap_conf_output()" in "net/bluetooth/l2cap.c"
@ 2007-04-30  7:02 GAO LIANG-TAO-W20048
  2007-05-04  6:55 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: GAO LIANG-TAO-W20048 @ 2007-04-30  7:02 UTC (permalink / raw)
  To: bluez-devel
  Cc: Singer Catherine-CSINGER1, Jin Hong-Lei-W19971,
	Saeed Faisal-EFS015


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

 

Hi,

 

I want to report a bug against "l2cap_conf_output()" in BlueZ kernel
code "net/bluetooth/l2cap.c":

    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;

    }

I think it's wrong to enlarge the outgoing MTU value (by calling
"pi->omtu = pi->conf_mtu") when device B gets the MTU in device A's
configuration request. In fact, Page 1006/1200 of Bluetooth SPEC v1.2 or
Page 1038/1230 of Bluetooth SPEC v2.0 EDR both require a minimum of the
"If the remote device sends a positive configuration response it shall
include the actual MTU to be used on this channel for traffic flowing
into the local device. This is the minimum of the MTU in the
configuration request and the outgoing MTU capability of the device
sending the configuration response." Here I consider the original
"pi->omtu" as the "outgoing MTU capability".

 

I suggest to remove the "else" clause, and to apply l2cap_add_conf_opt()
to both cases:

    l2cap_add_conf_opt(ptr, L2CAP_CONF_MTU, 2, pi->omtu);

    if (pi->conf_mtu < pi->omtu) {

       result = L2CAP_CONF_UNACCEPT;

    }

 

Regards,

Gao Liangtao

 


[-- Attachment #1.2: Type: text/html, Size: 7074 bytes --]

[-- Attachment #2: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <AF7E222731C6614DAB496712B5768F2401EB332C@ct11exm65.ds.mot.com>]

end of thread, other threads:[~2007-05-16  1:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-30  7:02 [Bluez-devel] Report a bug against "l2cap_conf_output()" in "net/bluetooth/l2cap.c" GAO LIANG-TAO-W20048
2007-05-04  6:55 ` Marcel Holtmann
     [not found] <AF7E222731C6614DAB496712B5768F2401EB332C@ct11exm65.ds.mot.com>
2007-05-15 10:54 ` [Bluez-devel] Report a bug against "l2cap_conf_output()" in"net/bluetooth/l2cap.c" GAO LIANG-TAO-W20048
2007-05-16  1:40 ` GAO LIANG-TAO-W20048

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox