Bluetooth: Enable sniff mode for incoming connection 30/87530/6
authorSudha Bheemanna <b.sudha@samsung.com>
Thu, 8 Sep 2016 11:10:50 +0000 (16:40 +0530)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 29 Sep 2016 05:32:16 +0000 (14:32 +0900)
Add provision to set the link poilicy to enable sniff mode
for incoming connection.

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

index 420ebf1aebcd98c28724aaface8d58c224705870..440ae7d6c65381bb715121242e2b97eed0dcb799 100644 (file)
@@ -479,6 +479,11 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst,
        conn->tx_power = HCI_TX_POWER_INVALID;
        conn->max_tx_power = HCI_TX_POWER_INVALID;
 
+#ifdef TIZEN_BT
+       /* enable sniff mode for incoming connection */
+       conn->link_policy = hdev->link_policy;
+#endif
+
        set_bit(HCI_CONN_POWER_SAVE, &conn->flags);
        conn->disc_timeout = HCI_DISCONN_TIMEOUT;