diff options
author | Ville Tervo <ville.tervo@nokia.com> | 2011-02-10 20:38:50 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-16 14:33:02 -0500 |
commit | b62f328b8f20abe97cdbaaf44c6e4f5e7a610f18 (patch) | |
tree | 85788ac51ee97fc12765e715f679c447f27ba5ac /net/bluetooth/hci_event.c | |
parent | acd7d3708555b3da7522e23c183cc21efc785f72 (diff) |
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.c | 10 |
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 | |||
2405 | hci_dev_lock(hdev); | 2405 | hci_dev_lock(hdev); |
2406 | 2406 | ||
2407 | conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &ev->bdaddr); | 2407 | conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &ev->bdaddr); |
2408 | if (!conn) | 2408 | if (!conn) { |
2409 | goto unlock; | 2409 | conn = hci_conn_add(hdev, LE_LINK, &ev->bdaddr); |
2410 | if (!conn) { | ||
2411 | BT_ERR("No memory for new connection"); | ||
2412 | hci_dev_unlock(hdev); | ||
2413 | return; | ||
2414 | } | ||
2415 | } | ||
2410 | 2416 | ||
2411 | if (ev->status) { | 2417 | if (ev->status) { |
2412 | hci_proto_connect_cfm(conn, ev->status); | 2418 | hci_proto_connect_cfm(conn, ev->status); |