switch (state) {
case DISCOVERY_STOPPED:
+#ifndef CONFIG_TIZEN_WIP
hci_update_background_scan(hdev);
+#endif
if (old_state != DISCOVERY_STARTING)
mgmt_discovering(hdev, 0);
switch (hdev->discovery.type) {
case DISCOV_TYPE_LE:
hci_dev_lock(hdev);
+#ifdef CONFIG_TIZEN_WIP
+ hci_le_discovery_set_state(hdev, DISCOVERY_STOPPED);
+#else
hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
+#endif
hci_dev_unlock(hdev);
break;
err = hci_req_run(&req, inquiry_complete);
if (err) {
BT_ERR("Inquiry request failed: err %d", err);
+#ifdef CONFIG_TIZEN_WIP
+ hci_le_discovery_set_state(hdev, DISCOVERY_STOPPED);
+#else
hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
+#endif
}
hci_dev_unlock(hdev);
if (!err && discov_stopped)
hci_discovery_set_state(hdev, DISCOVERY_STOPPING);
+#ifdef CONFIG_TIZEN_WIP
+ if (!err && discov_stopped)
+ hci_le_discovery_set_state(hdev, DISCOVERY_STOPPING);
+#endif
+
return err;
}