<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/bluetooth/l2cap.c, branch master</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Bluetooth: Rename l2cap.c to l2cap_core.c</title>
<updated>2011-02-08T03:43:15+00:00</updated>
<author>
<name>Gustavo F. Padovan</name>
<email>padovan@profusion.mobi</email>
</author>
<published>2011-02-03T20:58:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0a708f8fc46fde3be2116b8d79f7469a24097c90'/>
<id>0a708f8fc46fde3be2116b8d79f7469a24097c90</id>
<content type='text'>
In a preparation to the the L2CAP code split in many files.

Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a preparation to the the L2CAP code split in many files.

Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Do not use assignments in IF conditions</title>
<updated>2011-02-08T03:40:08+00:00</updated>
<author>
<name>Andrei Emeltchenko</name>
<email>andrei.emeltchenko@nokia.com</email>
</author>
<published>2011-01-11T15:20:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5a08eccedaa1e12b74cf3afea9e11a9aefc29f73'/>
<id>5a08eccedaa1e12b74cf3afea9e11a9aefc29f73</id>
<content type='text'>
Fix checkpatch warnings concerning assignments in if conditions.

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@nokia.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix checkpatch warnings concerning assignments in if conditions.

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@nokia.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix setting of MTU for ERTM and Streaming Mode</title>
<updated>2011-02-08T03:40:04+00:00</updated>
<author>
<name>Gustavo F. Padovan</name>
<email>padovan@profusion.mobi</email>
</author>
<published>2011-01-24T18:01:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7990681c409e8a31eac122342e64da6c3b77a249'/>
<id>7990681c409e8a31eac122342e64da6c3b77a249</id>
<content type='text'>
The desired MTU should be sent in an Config_Req for all modes.

Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The desired MTU should be sent in an Config_Req for all modes.

Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Use non-flushable by default L2CAP data packets</title>
<updated>2011-02-08T03:40:04+00:00</updated>
<author>
<name>Andrei Emeltchenko</name>
<email>andrei.emeltchenko@nokia.com</email>
</author>
<published>2011-01-03T09:14:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e702112ff68a554bcac16bb03ddc2b8e5425bcbf'/>
<id>e702112ff68a554bcac16bb03ddc2b8e5425bcbf</id>
<content type='text'>
Modification of Nick Pelly &lt;npelly@google.com&gt; patch.

With Bluetooth 2.1 ACL packets can be flushable or non-flushable. This commit
makes ACL data packets non-flushable by default on compatible chipsets, and
adds the BT_FLUSHABLE socket option to explicitly request flushable ACL
data packets for a given L2CAP socket. This is useful for A2DP data which can
be safely discarded if it can not be delivered within a short time (while
other ACL data should not be discarded).

Note that making ACL data flushable has no effect unless the automatic flush
timeout for that ACL link is changed from its default of 0 (infinite).

Default packet types (for compatible chipsets):
Frame 34: 13 bytes on wire (104 bits), 13 bytes captured (104 bits)
Bluetooth HCI H4
Bluetooth HCI ACL Packet
    .... 0000 0000 0010 = Connection Handle: 0x0002
    ..00 .... .... .... = PB Flag: First Non-automatically Flushable Packet (0)
    00.. .... .... .... = BC Flag: Point-To-Point (0)
    Data Total Length: 8
Bluetooth L2CAP Packet

After setting BT_FLUSHABLE
(sock.setsockopt(274 /*SOL_BLUETOOTH*/, 8 /* BT_FLUSHABLE */, 1 /* flush */))
Frame 34: 13 bytes on wire (104 bits), 13 bytes captured (104 bits)
Bluetooth HCI H4
Bluetooth HCI ACL Packet
    .... 0000 0000 0010 = Connection Handle: 0x0002
    ..10 .... .... .... = PB Flag: First Automatically Flushable Packet (2)
    00.. .... .... .... = BC Flag: Point-To-Point (0)
    Data Total Length: 8
Bluetooth L2CAP Packet

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@nokia.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modification of Nick Pelly &lt;npelly@google.com&gt; patch.

With Bluetooth 2.1 ACL packets can be flushable or non-flushable. This commit
makes ACL data packets non-flushable by default on compatible chipsets, and
adds the BT_FLUSHABLE socket option to explicitly request flushable ACL
data packets for a given L2CAP socket. This is useful for A2DP data which can
be safely discarded if it can not be delivered within a short time (while
other ACL data should not be discarded).

Note that making ACL data flushable has no effect unless the automatic flush
timeout for that ACL link is changed from its default of 0 (infinite).

Default packet types (for compatible chipsets):
Frame 34: 13 bytes on wire (104 bits), 13 bytes captured (104 bits)
Bluetooth HCI H4
Bluetooth HCI ACL Packet
    .... 0000 0000 0010 = Connection Handle: 0x0002
    ..00 .... .... .... = PB Flag: First Non-automatically Flushable Packet (0)
    00.. .... .... .... = BC Flag: Point-To-Point (0)
    Data Total Length: 8
Bluetooth L2CAP Packet

After setting BT_FLUSHABLE
(sock.setsockopt(274 /*SOL_BLUETOOTH*/, 8 /* BT_FLUSHABLE */, 1 /* flush */))
Frame 34: 13 bytes on wire (104 bits), 13 bytes captured (104 bits)
Bluetooth HCI H4
Bluetooth HCI ACL Packet
    .... 0000 0000 0010 = Connection Handle: 0x0002
    ..10 .... .... .... = PB Flag: First Automatically Flushable Packet (2)
    00.. .... .... .... = BC Flag: Point-To-Point (0)
    Data Total Length: 8
Bluetooth L2CAP Packet

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@nokia.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Set conn state to BT_DISCONN to avoid multiple responses</title>
<updated>2011-02-02T14:47:59+00:00</updated>
<author>
<name>Bao Liang</name>
<email>tim.bao@gmail.com</email>
</author>
<published>2011-01-29T13:39:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e733fb62082b3b187870dfba28d5f6730b8436c4'/>
<id>e733fb62082b3b187870dfba28d5f6730b8436c4</id>
<content type='text'>
This patch fixes a minor issue that two connection responses will be sent
for one L2CAP connection request. If the L2CAP connection request is first
blocked due to security reason and responded with reason "security block",
the state of the connection remains BT_CONNECT2. If a pairing procedure
completes successfully before the ACL connection is down, local host will
send another connection complete response. See the following packets
captured by hcidump.

2010-12-07 22:21:24.928096 &lt; ACL data: handle 12 flags 0x00 dlen 16
    0000: 0c 00 01 00 03 19 08 00  41 00 53 00 03 00 00 00  ........A.S.....
... ...

2010-12-07 22:21:35.791747 &gt; HCI Event: Auth Complete (0x06) plen 3
    status 0x00 handle 12
... ...

2010-12-07 22:21:35.872372 &gt; ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0054 scid 0x0040 result 0 status 0
      Connection successful

Signed-off-by: Liang Bao &lt;tim.bao@gmail.com&gt;
Acked-by: Ville Tervo &lt;ville.tervo@nokia.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a minor issue that two connection responses will be sent
for one L2CAP connection request. If the L2CAP connection request is first
blocked due to security reason and responded with reason "security block",
the state of the connection remains BT_CONNECT2. If a pairing procedure
completes successfully before the ACL connection is down, local host will
send another connection complete response. See the following packets
captured by hcidump.

2010-12-07 22:21:24.928096 &lt; ACL data: handle 12 flags 0x00 dlen 16
    0000: 0c 00 01 00 03 19 08 00  41 00 53 00 03 00 00 00  ........A.S.....
... ...

2010-12-07 22:21:35.791747 &gt; HCI Event: Auth Complete (0x06) plen 3
    status 0x00 handle 12
... ...

2010-12-07 22:21:35.872372 &gt; ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0054 scid 0x0040 result 0 status 0
      Connection successful

Signed-off-by: Liang Bao &lt;tim.bao@gmail.com&gt;
Acked-by: Ville Tervo &lt;ville.tervo@nokia.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix authentication request for L2CAP raw sockets</title>
<updated>2011-01-19T16:40:43+00:00</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@nokia.com</email>
</author>
<published>2011-01-19T06:36:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d00ef24fc2923b65fdd440dc6445903e965841ac'/>
<id>d00ef24fc2923b65fdd440dc6445903e965841ac</id>
<content type='text'>
When there is an existing connection l2cap_check_security needs to be
called to ensure that the security level of the new socket is fulfilled.
Normally l2cap_do_start takes care of this, but that function doesn't
get called for SOCK_RAW type sockets. This patch adds the necessary
l2cap_check_security call to the appropriate branch in l2cap_do_connect.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@nokia.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When there is an existing connection l2cap_check_security needs to be
called to ensure that the security level of the new socket is fulfilled.
Normally l2cap_do_start takes care of this, but that function doesn't
get called for SOCK_RAW type sockets. This patch adds the necessary
l2cap_check_security call to the appropriate branch in l2cap_do_connect.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@nokia.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Create a unified auth_type evaluation function</title>
<updated>2011-01-19T16:40:43+00:00</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@nokia.com</email>
</author>
<published>2011-01-19T06:36:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8556edd32f01c50a3c99e44dc2c3b1252ea59605'/>
<id>8556edd32f01c50a3c99e44dc2c3b1252ea59605</id>
<content type='text'>
The logic for determining the needed auth_type for an L2CAP socket is
rather complicated and has so far been duplicated in
l2cap_check_security as well as l2cap_do_connect. Additionally the
l2cap_check_security code was completely missing the handling of
SOCK_RAW type sockets. This patch creates a unified function for the
evaluation and makes l2cap_do_connect and l2cap_check_security use that
function.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@nokia.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The logic for determining the needed auth_type for an L2CAP socket is
rather complicated and has so far been duplicated in
l2cap_check_security as well as l2cap_do_connect. Additionally the
l2cap_check_security code was completely missing the handling of
SOCK_RAW type sockets. This patch creates a unified function for the
evaluation and makes l2cap_do_connect and l2cap_check_security use that
function.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@nokia.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: l2cap: fix misuse of logical operation in place of bitop</title>
<updated>2011-01-19T16:40:42+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.cz</email>
</author>
<published>2011-01-14T13:59:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4571928fc73589e9c5217cd069d2c0b4ff1818a8'/>
<id>4571928fc73589e9c5217cd069d2c0b4ff1818a8</id>
<content type='text'>
CC: Marcel Holtmann &lt;marcel@holtmann.org&gt;
CC: "Gustavo F. Padovan" &lt;padovan@profusion.mobi&gt;
CC: João Paulo Rechi Vita &lt;jprvita@profusion.mobi&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CC: Marcel Holtmann &lt;marcel@holtmann.org&gt;
CC: "Gustavo F. Padovan" &lt;padovan@profusion.mobi&gt;
CC: João Paulo Rechi Vita &lt;jprvita@profusion.mobi&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Don't accept ConfigReq if we aren't in the BT_CONFIG state</title>
<updated>2010-12-06T17:37:50+00:00</updated>
<author>
<name>Gustavo F. Padovan</name>
<email>padovan@profusion.mobi</email>
</author>
<published>2010-06-14T05:26:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=df6bd743b6f06b066c1c3ba7f2853a6e8d61468c'/>
<id>df6bd743b6f06b066c1c3ba7f2853a6e8d61468c</id>
<content type='text'>
If such event happens we shall reply with a Command Reject, because we are
not expecting any configure request.

Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If such event happens we shall reply with a Command Reject, because we are
not expecting any configure request.

Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: clean up l2cap code</title>
<updated>2010-12-01T23:04:43+00:00</updated>
<author>
<name>Andrei Emeltchenko</name>
<email>andrei.emeltchenko@nokia.com</email>
</author>
<published>2010-12-01T14:58:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=894718a6be69d8cfd191dc291b42be32a1e4851b'/>
<id>894718a6be69d8cfd191dc291b42be32a1e4851b</id>
<content type='text'>
Do not initialize static vars to zero, macros with complex values
shall be enclosed with (), remove unneeded braces.

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@nokia.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not initialize static vars to zero, macros with complex values
shall be enclosed with (), remove unneeded braces.

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@nokia.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
</feed>
