Bluetooth: Fix l2cap conn failures for ssp devices
[pandora-kernel.git] / net / bluetooth / hci_conn.c
index c1c597e..98bfbd5 100644 (file)
@@ -608,6 +608,10 @@ static int hci_conn_auth(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
 
        if (!test_and_set_bit(HCI_CONN_AUTH_PEND, &conn->pend)) {
                struct hci_cp_auth_requested cp;
+
+               /* encrypt must be pending if auth is also pending */
+               set_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend);
+
                cp.handle = cpu_to_le16(conn->handle);
                hci_send_cmd(conn->hdev, HCI_OP_AUTH_REQUESTED,
                                                        sizeof(cp), &cp);