Bluetooth: Move L2CAP fixed channel creation into l2cap_conn_cfm
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 7 Aug 2014 19:56:47 +0000 (22:56 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 14 Aug 2014 06:49:14 +0000 (08:49 +0200)
commite760ec12134d5736065c4e88b0e783cc1fe0d20a
tree4e09ac921ef64f115fc1417276ca3782ee57450d
parentdc0f5088182b2e48ae47629a55bdf35ad5d6ed44
Bluetooth: Move L2CAP fixed channel creation into l2cap_conn_cfm

In order to remove special handling of fixed L2CAP channels we need to
start creating them in a single place instead of having per-channel
exceptions. The most natural place is the l2cap_conn_cfm() function
which is called whenever there is a new baseband link.

The only really special case so far has been the ATT socket, so in order
not to break the code in between this patch removes the ATT special
handling at the same time as it adds the generic fixed channel handling
from l2cap_le_conn_ready() into the hci_conn_cfm() function. As a
related change the channel locking in l2cap_conn_ready() becomes simpler
and we can thereby move the smp_conn_security() call into the
l2cap_le_conn_ready() function.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_core.c