Bluetooth: Cancel the Sniff timer
authorSudha Bheemanna <b.sudha@samsung.com>
Thu, 8 Sep 2016 11:31:39 +0000 (17:01 +0530)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 29 Apr 2025 03:38:26 +0000 (12:38 +0900)
This patch adds code to cancel the sniff timer.

Change-Id: I6d11324978fcbc10dbaf633512a81cad0003a8ca
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 0de51dcf3f07d4bc98b97d2de650b022660e3222..4a55f835ea67d3e614e533920774a03772e5afc7 100644 (file)
@@ -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 */