Bluetooth: Replace L2CAP link mode with security level
[pandora-kernel.git] / net / bluetooth / hci_event.c
index f91ba69..014fc8b 100644 (file)
@@ -914,7 +914,8 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s
        if (ev->status) {
                hci_proto_connect_cfm(conn, ev->status);
                hci_conn_del(conn);
-       }
+       } else if (ev->link_type != ACL_LINK)
+               hci_proto_connect_cfm(conn, ev->status);
 
 unlock:
        hci_dev_unlock(hdev);
@@ -1600,7 +1601,8 @@ static inline void hci_remote_ext_features_evt(struct hci_dev *hdev, struct sk_b
 
                if (conn->state == BT_CONFIG) {
                        if (!ev->status && hdev->ssp_mode > 0 &&
-                                       conn->ssp_mode > 0 && conn->out) {
+                                       conn->ssp_mode > 0 && conn->out &&
+                                       conn->sec_level != BT_SECURITY_SDP) {
                                struct hci_cp_auth_requested cp;
                                cp.handle = ev->handle;
                                hci_send_cmd(hdev, HCI_OP_AUTH_REQUESTED,