<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/net/bluetooth/l2cap.h, branch v3.10.47</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.10.47</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.10.47'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2013-04-17T06:03:43+00:00</updated>
<entry>
<title>Bluetooth: l2cap: add l2cap_user sub-modules</title>
<updated>2013-04-17T06:03:43+00:00</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2013-04-06T18:28:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c8e1411e93391c5a78f55b09697a997474a4707'/>
<id>urn:sha1:2c8e1411e93391c5a78f55b09697a997474a4707</id>
<content type='text'>
Several sub-modules like HIDP, rfcomm, ... need to track l2cap
connections. The l2cap_conn-&gt;hcon-&gt;dev object is used as parent for sysfs
devices so the sub-modules need to be notified when the hci_conn object is
removed from sysfs.

As submodules normally use the l2cap layer, the l2cap_user objects are
registered there instead of on the underlying hci_conn object. This avoids
any direct dependency on the HCI layer and lets the l2cap core handle any
specifics.

This patch introduces l2cap_user objects which contain a "probe" and
"remove" callback. You can register them on any l2cap_conn object and if
it is active, the "probe" callback will get called. Otherwise, an error is
returned.

The l2cap_conn object will call your "remove" callback directly before it
is removed from user-space. This allows you to remove your submodules
_before_ the parent l2cap_conn and hci_conn object is removed.

At any time you can asynchronously unregister your l2cap_user object if
your submodule vanishes before the l2cap_conn object does.

There is no way around l2cap_user. If we want wire-protocols in the
kernel, we always want the hci_conn object as parent in the sysfs tree. We
cannot use a channel here since we might need multiple channels for a
single protocol.
But the problem is, we _must_ get notified when an l2cap_conn object is
removed. We cannot use reference-counting for object-removal! This is not
how it works. If a hardware is removed, we should immediately remove the
object from sysfs. Any other behavior would be inconsistent with the rest
of the system. Also note that device_del() might sleep, but it doesn't
wait for user-space or block very long. It only _unlinks_ the object from
sysfs and the whole device-tree. Everything else is handled by ref-counts!
This is exactly what the other sub-modules must do: unlink their devices
when the "remove" l2cap_user callback is called. They should not do any
cleanup or synchronous shutdowns.

Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: l2cap: introduce l2cap_conn ref-counting</title>
<updated>2013-04-17T06:02:10+00:00</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2013-04-06T18:28:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9c903e373c11f62d62bce1209f662ca92589a075'/>
<id>urn:sha1:9c903e373c11f62d62bce1209f662ca92589a075</id>
<content type='text'>
If we want to use l2cap_conn outside of l2cap_core.c, we need refcounting
for these objects. Otherwise, we cannot synchronize l2cap locks with
outside locks and end up with deadlocks.

Hence, introduce ref-counting for l2cap_conn objects. This doesn't affect
l2cap internals at all, as they use a direct synchronization.
We also keep a reference to the parent hci_conn for locking purposes as
l2cap_conn depends on this. This doesn't affect the connection itself but
only the lifetime of the (dead) object.

Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: hidp: verify l2cap sockets</title>
<updated>2013-04-06T02:44:14+00:00</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2013-04-05T12:57:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b3916db32c4a3124eee9f3742a2f4723731d7602'/>
<id>urn:sha1:b3916db32c4a3124eee9f3742a2f4723731d7602</id>
<content type='text'>
We need to verify that the given sockets actually are l2cap sockets. If
they aren't, we are not supposed to access bt_sk(sock) and we shouldn't
start the session if the offsets turn out to be valid local BT addresses.

That is, if someone passes a TCP socket to HIDCONNADD, then we access some
random offset in the TCP socket (which isn't even guaranteed to be valid).

Fix this by checking that the socket is an l2cap socket.

Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: remove an unused variable in a header file</title>
<updated>2013-01-09T19:05:05+00:00</updated>
<author>
<name>Rami Rosen</name>
<email>ramirose@gmail.com</email>
</author>
<published>2012-12-18T09:48:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7952861f4a8d67b6624b2e6c92cd63bd11a332ce'/>
<id>urn:sha1:7952861f4a8d67b6624b2e6c92cd63bd11a332ce</id>
<content type='text'>
This patch removes srej_queue_next from include/net/bluetooth/l2cap.h as it
is not used.

Signed-off-by: Rami Rosen &lt;ramirose@gmail.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: trivial: Change NO_FCS_RECV to RECV_NO_FCS</title>
<updated>2012-12-03T18:00:01+00:00</updated>
<author>
<name>Andrei Emeltchenko</name>
<email>andrei.emeltchenko@intel.com</email>
</author>
<published>2012-11-29T15:46:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f2592d3ee3c5817981f343b90bfb9c5612f38d23'/>
<id>urn:sha1:f2592d3ee3c5817981f343b90bfb9c5612f38d23</id>
<content type='text'>
Make code more readable by changing CONF_NO_FCS_RECV which is read
as "No L2CAP FCS option received" to CONF_RECV_NO_FCS which means
"Received L2CAP option NO_FCS". This flag really means that we have
received L2CAP FRAME CHECK SEQUENCE (FCS) OPTION with value "No FCS".

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Refactor locking in amp_physical_cfm</title>
<updated>2012-11-19T21:30:00+00:00</updated>
<author>
<name>Andrei Emeltchenko</name>
<email>andrei.emeltchenko@intel.com</email>
</author>
<published>2012-11-14T15:39:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a514b17fab51c1433db920d76cf8ddda959e5da0'/>
<id>urn:sha1:a514b17fab51c1433db920d76cf8ddda959e5da0</id>
<content type='text'>
Remove locking from l2cap_physical_cfm and lock chan inside
amp_physical_cfm.

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@intel.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Rename ctrl_id to remote_amp_id</title>
<updated>2012-11-01T22:27:11+00:00</updated>
<author>
<name>Andrei Emeltchenko</name>
<email>andrei.emeltchenko@intel.com</email>
</author>
<published>2012-11-01T13:37:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fffadc08ebf1f4c61bb8f9be0f1d8c3c053d815f'/>
<id>urn:sha1:fffadc08ebf1f4c61bb8f9be0f1d8c3c053d815f</id>
<content type='text'>
Since we have started to use local_amp_id for local AMP
Controller Id it makes sense to rename ctrl_id to remote_amp_id
since it represents remote AMP controller Id.

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: AMP: Use l2cap_physical_cfm in phylink complete evt</title>
<updated>2012-11-01T22:27:10+00:00</updated>
<author>
<name>Andrei Emeltchenko</name>
<email>andrei.emeltchenko@intel.com</email>
</author>
<published>2012-10-31T13:46:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf70ff220a918b25d383510f913de52308d04bb2'/>
<id>urn:sha1:cf70ff220a918b25d383510f913de52308d04bb2</id>
<content type='text'>
When receiving HCI Phylink Complete event run amp_physical_cfm
which initialize BR/EDR L2CAP channel associated with High Speed
link and run l2cap_physical_cfm which shall send L2CAP Create
Chan Request.

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@intel.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: AMP: Process Logical Link complete evt</title>
<updated>2012-11-01T22:27:02+00:00</updated>
<author>
<name>Andrei Emeltchenko</name>
<email>andrei.emeltchenko@intel.com</email>
</author>
<published>2012-10-25T12:20:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=27695fb415ab150e1972a882c2538bf9bf130cb0'/>
<id>urn:sha1:27695fb415ab150e1972a882c2538bf9bf130cb0</id>
<content type='text'>
After receiving HCI Logical Link Complete event finish EFS
configuration by sending L2CAP Conf Response with success code.

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@intel.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Start channel move when socket option is changed</title>
<updated>2012-10-24T02:26:30+00:00</updated>
<author>
<name>Mat Martineau</name>
<email>mathewm@codeaurora.org</email>
</author>
<published>2012-10-23T22:24:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f7a56c4ff438f4727439cb048034f56320dd228'/>
<id>urn:sha1:3f7a56c4ff438f4727439cb048034f56320dd228</id>
<content type='text'>
Channel moves are triggered by changes to the BT_CHANNEL_POLICY
sockopt when an ERTM or streaming-mode channel is connected.

Moves are only started if enable_hs is true.

Signed-off-by: Mat Martineau &lt;mathewm@codeaurora.org&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
</feed>
