aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-02-18 14:53:57 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-02-19 08:44:29 +0100
commit539c496d88f7f96d42abde4e9d901c8f8167d615 (patch)
treeb46fdad2015a84dc049766ae31f893e974a08c6a /net/bluetooth/l2cap_core.c
parentBluetooth: Convert L2CAP security callback to use hci_cb (diff)
downloadlinux-dev-539c496d88f7f96d42abde4e9d901c8f8167d615.tar.xz
linux-dev-539c496d88f7f96d42abde4e9d901c8f8167d615.zip
Bluetooth: Convert connect_cfm to be triggered through hci_cb
This patch moves all the connect_cfm callbacks to be based on the hci_cb list. This means making l2cap_connect_cfm private to l2cap_core.c and sco_connect_cb private to sco.c respectively. Since the hci_conn type filtering isn't done any more on the wrapper level the callbacks themselves need to check that they were passed a relevant type of connection. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 424fcc5c4980..6e2c3bdda7d3 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -7252,13 +7252,16 @@ static struct l2cap_chan *l2cap_global_fixed_chan(struct l2cap_chan *c,
return NULL;
}
-void l2cap_connect_cfm(struct hci_conn *hcon, u8 status)
+static void l2cap_connect_cfm(struct hci_conn *hcon, u8 status)
{
struct hci_dev *hdev = hcon->hdev;
struct l2cap_conn *conn;
struct l2cap_chan *pchan;
u8 dst_type;
+ if (hcon->type != ACL_LINK && hcon->type != LE_LINK)
+ return;
+
BT_DBG("hcon %p bdaddr %pMR status %d", hcon, &hcon->dst, status);
if (status) {
@@ -7543,6 +7546,7 @@ drop:
static struct hci_cb l2cap_cb = {
.name = "L2CAP",
+ .connect_cfm = l2cap_connect_cfm,
.security_cfm = l2cap_security_cfm,
};