From: Sudha Bheemanna Date: Thu, 8 Sep 2016 11:10:50 +0000 (+0530) Subject: Bluetooth: Enable sniff mode for incoming connection X-Git-Tag: accepted/tizen/unified/riscv/20230725.071352~54 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a02c2b73726e55ee4ccedcccf8e17a32c03181e3;p=platform%2Fkernel%2Flinux-starfive.git Bluetooth: Enable sniff mode for incoming connection Add provision to set the link poilicy to enable sniff mode for incoming connection. Change-Id: Ifff9e9f0838f26a6c96d81f4cbaae43429aa231f Signed-off-by: Sudha Bheemanna Signed-off-by: Amit Purwar Signed-off-by: Wootak Jung --- diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 7e62a80f..b2eeac1 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -1023,6 +1023,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;