Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1334303 > unrolled thread

[PATCH] Bluetooth: hci_core: cancel power off delayed work properly

Started byWei-Ning Huang <wnhuang@chromium.org>
First post2016-02-15 10:20 +0100
Last post2016-02-20 09:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Bluetooth: hci_core: cancel power off delayed work properly Wei-Ning Huang <wnhuang@chromium.org> - 2016-02-15 10:20 +0100
    Re: [PATCH] Bluetooth: hci_core: cancel power off delayed work properly Marcel Holtmann <marcel@holtmann.org> - 2016-02-20 09:20 +0100

#1334303 — [PATCH] Bluetooth: hci_core: cancel power off delayed work properly

FromWei-Ning Huang <wnhuang@chromium.org>
Date2016-02-15 10:20 +0100
Subject[PATCH] Bluetooth: hci_core: cancel power off delayed work properly
Message-ID<r2nu1-7kC-1@gated-at.bofh.it>
From: Wei-Ning Huang <wnhuang@chromium.org>

When the HCI_AUTO_OFF flag is cleared, the power_off delayed work need
to be cancel or HCI will be powered off even if it's managed.

Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org>
---
 net/bluetooth/hci_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 47bcef7..f42305a 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2017,6 +2017,7 @@ static void hci_power_on(struct work_struct *work)
 	if (test_bit(HCI_UP, &hdev->flags) &&
 	    hci_dev_test_flag(hdev, HCI_MGMT) &&
 	    hci_dev_test_and_clear_flag(hdev, HCI_AUTO_OFF)) {
+		cancel_delayed_work(&hdev->power_off);
 		hci_req_sync_lock(hdev);
 		err = __hci_req_hci_power_on(hdev);
 		hci_req_sync_unlock(hdev);
-- 
2.7.0.rc3.207.g0ac5344

[toc] | [next] | [standalone]


#1338663

FromMarcel Holtmann <marcel@holtmann.org>
Date2016-02-20 09:20 +0100
Message-ID<r4aVH-2bU-1@gated-at.bofh.it>
In reply to#1334303
Hi Wei-Ning,

> When the HCI_AUTO_OFF flag is cleared, the power_off delayed work need
> to be cancel or HCI will be powered off even if it's managed.
> 
> Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org>
> ---
> net/bluetooth/hci_core.c | 1 +
> 1 file changed, 1 insertion(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web