Bluetooth: Enable sniff mode for incoming connection
authorSudha Bheemanna <b.sudha@samsung.com>
Thu, 8 Sep 2016 11:10:50 +0000 (16:40 +0530)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 29 Apr 2025 03:38:26 +0000 (12:38 +0900)
Add provision to set the link poilicy to enable sniff mode
for incoming connection.

Change-Id: I3dfd9d94cd00a9244c9330181290a0e457522faf
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 3e1370b6494f5c33f8dfe853eeac3b3a225da5a2..0de51dcf3f07d4bc98b97d2de650b022660e3222 100644 (file)
@@ -957,6 +957,11 @@ static struct hci_conn *__hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t
        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;