if (!conn)
goto unlock;
+#ifdef TIZEN_BT
+ /* PIN or Key Missing patch */
+ BT_DBG("remote_auth %x, remote_cap %x, auth_type %x, io_capability %x",
+ conn->remote_auth, conn->remote_cap,
+ conn->auth_type, conn->io_capability);
+
+ if (ev->status == 0x06 && hci_conn_ssp_enabled(conn)) {
+ struct hci_cp_auth_requested cp;
+
+ BT_DBG("Pin or key missing");
+ hci_remove_link_key(hdev, &conn->dst);
+ cp.handle = cpu_to_le16(conn->handle);
+ hci_send_cmd(conn->hdev, HCI_OP_AUTH_REQUESTED,
+ sizeof(cp), &cp);
+ goto unlock;
+ }
+#endif
+
if (!ev->status) {
clear_bit(HCI_CONN_AUTH_FAILURE, &conn->flags);