From: Sudha Bheemanna Date: Thu, 8 Sep 2016 11:31:39 +0000 (+0530) Subject: Bluetooth: Cancel the Sniff timer X-Git-Tag: accepted/tizen/unified/20250514.114144~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ceb9be14b1fe2d70d3e87f5f7df6dd6d9172fa99;p=platform%2Fkernel%2Flinux-riscv.git Bluetooth: Cancel the Sniff timer This patch adds code to cancel the sniff timer. Change-Id: I6d11324978fcbc10dbaf633512a81cad0003a8ca Signed-off-by: Sudha Bheemanna Signed-off-by: Amit Purwar Signed-off-by: Wootak Jung Signed-off-by: Jaehoon Chung --- diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 0de51dcf3f07..4a55f835ea67 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -2562,9 +2562,18 @@ void hci_conn_enter_active_mode(struct hci_conn *conn, __u8 force_active) } timer: +#ifdef TIZEN_BT + if (hdev->idle_timeout > 0) { + /* Sniff timer cancel */ + cancel_delayed_work(&conn->idle_work); + queue_delayed_work(hdev->workqueue, &conn->idle_work, + msecs_to_jiffies(hdev->idle_timeout)); + } +#else if (hdev->idle_timeout > 0) queue_delayed_work(hdev->workqueue, &conn->idle_work, msecs_to_jiffies(hdev->idle_timeout)); +#endif } /* Drop all connection on the device */