2022-09-30 20:29:19

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: [PATCH] Bluetooth: hci_sync: Fix not indicating power state

From: Luiz Augusto von Dentz <[email protected]>

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 <[email protected]>
---
net/bluetooth/hci_sync.c | 1 +
1 file changed, 1 insertion(+)

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 */
--
2.37.3


2022-09-30 21:14:55

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: hci_sync: Fix not indicating power state

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

2022-10-01 01:00:49

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: hci_sync: Fix not indicating power state

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Fri, 30 Sep 2022 13:19:20 -0700 you wrote:
> From: Luiz Augusto von Dentz <[email protected]>
>
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html