diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2012-07-27 14:10:12 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-08-06 14:05:51 -0400 |
commit | 847012c5e04544aef485dfec29c1c07dc90615a4 (patch) | |
tree | fc29aa74043ad65cbc629dccf8816e18f4749360 /net/bluetooth | |
parent | b9b343d25484bbceaee454ab422daafb1c5eda96 (diff) |
Bluetooth: Remove unneeded code
This patch removes some unneeded code from hci_cs_le_create_conn.
If the hci_conn is not found, it means this LE connection attempt
was triggered by a thrid-party tool (e.g. hcitool). We should not
create this new hci_conn in LE Create Connection command status
event since it is already properly handled in LE Connection
Complete event.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_event.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 8b13cccd50cd..27064beda10d 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -1638,16 +1638,6 @@ static void hci_cs_le_create_conn(struct hci_dev *hdev, __u8 status) | |||
1638 | hci_proto_connect_cfm(conn, status); | 1638 | hci_proto_connect_cfm(conn, status); |
1639 | hci_conn_del(conn); | 1639 | hci_conn_del(conn); |
1640 | } | 1640 | } |
1641 | } else { | ||
1642 | if (!conn) { | ||
1643 | conn = hci_conn_add(hdev, LE_LINK, &cp->peer_addr); | ||
1644 | if (conn) { | ||
1645 | conn->dst_type = cp->peer_addr_type; | ||
1646 | conn->out = true; | ||
1647 | } else { | ||
1648 | BT_ERR("No memory for new connection"); | ||
1649 | } | ||
1650 | } | ||
1651 | } | 1641 | } |
1652 | 1642 | ||
1653 | hci_dev_unlock(hdev); | 1643 | hci_dev_unlock(hdev); |