Bluetooth: Enable sniff mode for incoming connection 85/306585/1
authorSudha Bheemanna <b.sudha@samsung.com>
Thu, 8 Sep 2016 11:10:50 +0000 (16:40 +0530)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 23 Feb 2024 02:14:36 +0000 (11:14 +0900)
Add provision to set the link poilicy to enable sniff mode
for incoming connection.

Change-Id: Iceec461cd620a328646df7889a89e41ce402b8ca
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>
net/bluetooth/hci_conn.c

index f22d277..eac7948 100644 (file)
@@ -982,6 +982,11 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst,
        conn->max_tx_power = HCI_TX_POWER_INVALID;
        conn->sync_handle = HCI_SYNC_HANDLE_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;