summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSudha Bheemanna <b.sudha@samsung.com>2016-09-08 14:54:54 +0530
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:53:18 +0900
commit727d8219a63dbbab5ff82eb2f0b8314fdaecb1c1 (patch)
tree317a2a3a8a27e8c377c607e8b9b9b0b28511b2e1 /net
parentc0b00e2c0edcf45eb905cee8846b9399d5526858 (diff)
Bluetooth: Enable inquiry and page scan
This patch enables the inquiry and page scan after ACL disconnection with one device and if there are no other devices connected. Change-Id: Ifb28be7d23f237d35112b2e0739ed55169baacf7 Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 4c03432bfdf4..b501d77a0832 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2635,6 +2635,22 @@ static void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
if (type == LE_LINK)
mgmt_reenable_advertising(hdev);
+#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);
}