bt_dev_dbg(hdev, "status 0x%2.2x", rp->status);
if (rp->status)
+#ifndef TIZEN_BT
return rp->status;
+#else
+ goto unblock;
+#endif
sent = hci_sent_cmd_data(hdev, HCI_OP_LE_WRITE_DEF_DATA_LEN);
if (!sent)
+#ifndef TIZEN_BT
return rp->status;
+#else
+ goto unblock;
+#endif
hdev->le_def_tx_len = le16_to_cpu(sent->tx_len);
hdev->le_def_tx_time = le16_to_cpu(sent->tx_time);
return rp->status;
+#ifdef TIZEN_BT
+unblock:
+ mgmt_le_write_host_suggested_data_length_complete(hdev, rp->status);
+ return rp->status;
+#endif
}
static u8 hci_cc_le_add_to_resolv_list(struct hci_dev *hdev, void *data,
bt_dev_dbg(hdev, "status 0x%2.2x", rp->status);
+#ifndef TIZEN_BT
if (rp->status)
return rp->status;
+#else
+ hci_dev_lock(hdev);
+#endif
hdev->le_max_tx_len = le16_to_cpu(rp->tx_len);
hdev->le_max_tx_time = le16_to_cpu(rp->tx_time);
hdev->le_max_rx_len = le16_to_cpu(rp->rx_len);
hdev->le_max_rx_time = le16_to_cpu(rp->rx_time);
+#ifdef TIZEN_BT
+ mgmt_le_read_maximum_data_length_complete(hdev, rp->status);
+ hci_dev_unlock(hdev);
+#endif
+
return rp->status;
}
hci_conn_del(conn);
+#ifdef TIZEN_BT
+ if (type == ACL_LINK && !hci_conn_num(hdev, ACL_LINK)) {
+ int iscan;
+ int pscan;
+
+ iscan = test_bit(HCI_ISCAN, &hdev->flags);
+ pscan = test_bit(HCI_PSCAN, &hdev->flags);
+ if (!iscan && !pscan) {
+ u8 scan_enable = SCAN_PAGE;
+
+ hci_send_cmd(hdev, HCI_OP_WRITE_SCAN_ENABLE,
+ sizeof(scan_enable), &scan_enable);
+ }
+ }
+#endif
+
unlock:
hci_dev_unlock(hdev);
}
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);