summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorVille Tervo <ville.tervo@nokia.com>2011-02-10 22:38:50 -0300
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-16 16:33:02 -0300
commitb62f328b8f20abe97cdbaaf44c6e4f5e7a610f18 (patch)
tree85788ac51ee97fc12765e715f679c447f27ba5ac /net/bluetooth/hci_event.c
parentacd7d3708555b3da7522e23c183cc21efc785f72 (diff)
downloadlinux-b62f328b8f20abe97cdbaaf44c6e4f5e7a610f18.tar.bz2
Bluetooth: Add server socket support for LE connection
Add support for LE server sockets. Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 3155ad588076..74f04a27734d 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2405,8 +2405,14 @@ static inline void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &ev->bdaddr);
- if (!conn)
- goto unlock;
+ if (!conn) {
+ conn = hci_conn_add(hdev, LE_LINK, &ev->bdaddr);
+ if (!conn) {
+ BT_ERR("No memory for new connection");
+ hci_dev_unlock(hdev);
+ return;
+ }
+ }
if (ev->status) {
hci_proto_connect_cfm(conn, ev->status);