aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_conn.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index de7df88a396b..2e7b7765e0ea 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -568,13 +568,16 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst,
568{ 568{
569 BT_DBG("%s dst %s", hdev->name, batostr(dst)); 569 BT_DBG("%s dst %s", hdev->name, batostr(dst));
570 570
571 if (type == LE_LINK) 571 switch (type) {
572 case LE_LINK:
572 return hci_connect_le(hdev, dst, dst_type, sec_level, auth_type); 573 return hci_connect_le(hdev, dst, dst_type, sec_level, auth_type);
573 574 case ACL_LINK:
574 if (type == ACL_LINK)
575 return hci_connect_acl(hdev, dst, sec_level, auth_type); 575 return hci_connect_acl(hdev, dst, sec_level, auth_type);
576 case SCO_LINK:
577 return hci_connect_sco(hdev, dst, sec_level, auth_type);
578 }
576 579
577 return hci_connect_sco(hdev, dst, sec_level, auth_type); 580 return ERR_PTR(-EINVAL);
578} 581}
579 582
580/* Check link security requirement */ 583/* Check link security requirement */