Bluetooth: Modify fast connectable type. 18/87518/6
authorSudha Bheemanna <b.sudha@samsung.com>
Thu, 8 Sep 2016 10:31:23 +0000 (16:01 +0530)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 29 Sep 2016 05:17:23 +0000 (14:17 +0900)
This patch modifies the fast connectable function
to just set the type.

Change-Id: I0cce96f85d823f9798ae7f147c4e33ce7b18e0e3
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
net/bluetooth/mgmt.c

index 934a7caea4061bbcff1abaaaf4d19ae37fe53b71..c6baa80c5efe9f7ab4c1bf57a10174784003a20e 100644 (file)
@@ -1952,7 +1952,9 @@ failed:
 static void write_fast_connectable(struct hci_request *req, bool enable)
 {
        struct hci_dev *hdev = req->hdev;
+#ifndef TIZEN_BT
        struct hci_cp_write_page_scan_activity acp;
+#endif
        u8 type;
 
        if (!hci_dev_test_flag(hdev, HCI_BREDR_ENABLED))
@@ -1961,6 +1963,12 @@ static void write_fast_connectable(struct hci_request *req, bool enable)
        if (hdev->hci_ver < BLUETOOTH_VER_1_2)
                return;
 
+#ifdef TIZEN_BT
+       if (enable)
+               type = PAGE_SCAN_TYPE_INTERLACED;
+       else
+               type = PAGE_SCAN_TYPE_STANDARD; /* default */
+#else
        if (enable) {
                type = PAGE_SCAN_TYPE_INTERLACED;
 
@@ -1979,6 +1987,7 @@ static void write_fast_connectable(struct hci_request *req, bool enable)
            __cpu_to_le16(hdev->page_scan_window) != acp.window)
                hci_req_add(req, HCI_OP_WRITE_PAGE_SCAN_ACTIVITY,
                            sizeof(acp), &acp);
+#endif
 
        if (hdev->page_scan_type != type)
                hci_req_add(req, HCI_OP_WRITE_PAGE_SCAN_TYPE, 1, &type);