diff mbox series

Bluetooth: hci_sync: Fix not indicating power state

Message ID 20220930201920.225767-1-luiz.dentz@gmail.com
State New
Headers show
Series Bluetooth: hci_sync: Fix not indicating power state | expand

Commit Message

Luiz Augusto von Dentz Sept. 30, 2022, 8:19 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

When setting power state using legacy/non-mgmt API
(e.g hcitool hci0 up) the likes of mgmt_set_powered_complete won't be
called causing clients of the MGMT API to not be notified of the change
of the state.

Fixes: cf75ad8b41d2 ("Bluetooth: hci_sync: Convert MGMT_SET_POWERED")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 net/bluetooth/hci_sync.c | 1 +
 1 file changed, 1 insertion(+)

Comments

bluez.test.bot@gmail.com Sept. 30, 2022, 9:13 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=682381

---Test result---

Test Summary:
CheckPatch                    PASS      1.58 seconds
GitLint                       PASS      0.74 seconds
SubjectPrefix                 PASS      0.66 seconds
BuildKernel                   PASS      33.38 seconds
BuildKernel32                 PASS      29.42 seconds
Incremental Build with patchesPASS      42.04 seconds
TestRunner: Setup             PASS      501.62 seconds
TestRunner: l2cap-tester      PASS      16.92 seconds
TestRunner: iso-tester        PASS      15.39 seconds
TestRunner: bnep-tester       PASS      6.08 seconds
TestRunner: mgmt-tester       PASS      99.46 seconds
TestRunner: rfcomm-tester     PASS      9.76 seconds
TestRunner: sco-tester        PASS      9.14 seconds
TestRunner: ioctl-tester      PASS      10.29 seconds
TestRunner: smp-tester        PASS      9.22 seconds
TestRunner: userchan-tester   PASS      6.38 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 15c75ef4c271..76c3107c9f91 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -4676,6 +4676,7 @@  int hci_dev_open_sync(struct hci_dev *hdev)
 		    hci_dev_test_flag(hdev, HCI_MGMT) &&
 		    hdev->dev_type == HCI_PRIMARY) {
 			ret = hci_powered_update_sync(hdev);
+			mgmt_power_on(hdev, ret);
 		}
 	} else {
 		/* Init failed, cleanup */