]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Declare le_conn_failed in hci_core.h
authorAndre Guedes <andre.guedes@openbossa.org>
Wed, 26 Feb 2014 23:21:41 +0000 (20:21 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 27 Feb 2014 03:41:33 +0000 (19:41 -0800)
This patch adds the "hci_" prefix to le_conn_failed() helper and
declares it in hci_core.h so it can be reused in hci_event.c.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_conn.c
net/bluetooth/hci_event.c

index bef65d0a14f0bc808e77d35486d6f5e5513d6df8..4253bdfc2f811d3bd36d766ee68e63bf83b70c78 100644 (file)
@@ -653,6 +653,8 @@ int hci_conn_switch_role(struct hci_conn *conn, __u8 role);
 
 void hci_conn_enter_active_mode(struct hci_conn *conn, __u8 force_active);
 
+void hci_le_conn_failed(struct hci_conn *conn, u8 status);
+
 /*
  * hci_conn_get() and hci_conn_put() are used to control the life-time of an
  * "hci_conn" object. They do not guarantee that the hci_conn object is running,
index 3d6b1cf07d234a9a606612e411f7909287a703de..dc8aad94642653f3bb7c3d4096ec58e3a2ef2ba4 100644 (file)
@@ -515,7 +515,7 @@ struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src)
 EXPORT_SYMBOL(hci_get_route);
 
 /* This function requires the caller holds hdev->lock */
-static void le_conn_failed(struct hci_conn *conn, u8 status)
+void hci_le_conn_failed(struct hci_conn *conn, u8 status)
 {
        struct hci_dev *hdev = conn->hdev;
 
@@ -545,7 +545,7 @@ static void create_le_conn_complete(struct hci_dev *hdev, u8 status)
        if (!conn)
                goto done;
 
-       le_conn_failed(conn, status);
+       hci_le_conn_failed(conn, status);
 
 done:
        hci_dev_unlock(hdev);
index 877cee844b9e77e94d606e9cafc543abe6661afe..eaa69650b1e55120dd138ba8e7965d56a3b22895 100644 (file)
@@ -3658,11 +3658,7 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
        }
 
        if (ev->status) {
-               mgmt_connect_failed(hdev, &conn->dst, conn->type,
-                                   conn->dst_type, ev->status);
-               hci_proto_connect_cfm(conn, ev->status);
-               conn->state = BT_CLOSED;
-               hci_conn_del(conn);
+               hci_le_conn_failed(conn, ev->status);
                goto unlock;
        }