diff mbox series

Bluetooth: hci_sync: Fix not indicating power state

Message ID 20220930201920.225767-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit 6abf0dae8c3c927f54e62c46faf8aba580ba0d04
Headers show
Series Bluetooth: hci_sync: Fix not indicating power state | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/subjectprefix success PASS
tedd_an/buildkernel success Build Kernel PASS
tedd_an/buildkernel32 success Build Kernel32 PASS
tedd_an/incremental_build success Pass
tedd_an/testrunnersetup success Test Runner Setup PASS
tedd_an/testrunnerl2cap-tester success Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneriso-tester success Total: 55, Passed: 55 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerbnep-tester success Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnermgmt-tester success Total: 494, Passed: 494 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerrfcomm-tester success Total: 11, Passed: 11 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersco-tester success Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerioctl-tester success Total: 28, Passed: 28 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersmp-tester success Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneruserchan-tester success Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0

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
patchwork-bot+bluetooth@kernel.org Oct. 1, 2022, 12:40 a.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Fri, 30 Sep 2022 13:19:20 -0700 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - Bluetooth: hci_sync: Fix not indicating power state
    https://git.kernel.org/bluetooth/bluetooth-next/c/6abf0dae8c3c

You are awesome, thank you!
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 */