This patch enables the inquiry and page scan after ACL
disconnection with one device and if there are no other
devices connected.
Change-Id: Iabe53b9191544f2db952c8bad988bb367696bd23
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
hci_conn_del(conn);
+#ifdef TIZEN_BT
+ if (conn->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);
}